Error while compiling kernel with Docker Ubuntu 18.04 Image

I try to build an Jetson Nano Kernel in a Docker Ubuntu 18.04 Container. I get following compiler error while compiling the kernel modules:
make -C kernel/kernel-4.9/ O=$KERNEL_OUT -j2 --output-sync=target modules

CC [M] net/netfilter/xt_mark.o
/home/user/nano_b01_32.4.4/Linux_for_Tegra/source/public/kernel/kernel-4.9/net/netfilter/xt_mark.c: In function ‘mark_tg’:
/home/user/nano_b01_32.4.4/Linux_for_Tegra/source/public/kernel/kernel-4.9/net/netfilter/xt_mark.c:33:32: error: dereferencing pointer to incomplete type ‘const struct xt_mark_tginfo2’
skb->mark = (skb->mark & ~info->mask) ^ info->mark;
^~
/home/user/nano_b01_32.4.4/Linux_for_Tegra/source/public/kernel/kernel-4.9/net/netfilter/xt_mark.c: In function ‘mark_mt’:
/home/user/nano_b01_32.4.4/Linux_for_Tegra/source/public/kernel/kernel-4.9/net/netfilter/xt_mark.c:42:27: error: dereferencing pointer to incomplete type ‘const struct xt_mark_mtinfo1’
return ((skb->mark & info->mask) == info->mark) ^ info->invert;

I think the preprocessor uses a wrong include file.

Has anyone tried to compile the kernel with Docker?

I got this error today with 32.6.1 (SDK 4.6). Is the fix known?

I think something went wrong with the git checkout from source_sync.sh because of filename case sensitivity.

I have run that script 4 times and each time it makes a dated branch. That’s probably okay, but after I sync and make the kernel, dtbs, and modules, I see this:

% git status
On branch mybranch_2021-11-16-1637086423
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   xt_connmark.h
	modified:   xt_dscp.h
	modified:   xt_mark.h
	modified:   xt_rateest.h
	modified:   xt_tcpmss.h
	modified:   ../netfilter_ipv4/ipt_ecn.h
	modified:   ../netfilter_ipv4/ipt_ttl.h
	modified:   ../netfilter_ipv6/ip6t_hl.h
	modified:   ../../../../net/netfilter/xt_dscp.c
	modified:   ../../../../net/netfilter/xt_hl.c
	modified:   ../../../../net/netfilter/xt_rateest.c
	modified:   ../../../../net/netfilter/xt_tcpmss.c

no changes added to commit (use "git add" and/or "git commit -a")

% git diff xt_mark.h
diff --git a/include/uapi/linux/netfilter/xt_mark.h b/include/uapi/linux/netfilter/xt_mark.h
index ecadc40d5cde..41c456deba22 100644
--- a/include/uapi/linux/netfilter/xt_mark.h
+++ b/include/uapi/linux/netfilter/xt_mark.h
@@ -1,15 +1,6 @@
-#ifndef _XT_MARK_H
-#define _XT_MARK_H
+#ifndef _XT_MARK_H_target
+#define _XT_MARK_H_target
 
-#include <linux/types.h>
+#include <linux/netfilter/xt_mark.h>
 
-struct xt_mark_tginfo2 {
-       __u32 mark, mask;
-};
-
-struct xt_mark_mtinfo1 {
-       __u32 mark, mask;
-       __u8 invert;
-};
-
-#endif /*_XT_MARK_H*/
+#endif /*_XT_MARK_H_target */

As you can see, the xt_MARK.h file overwrote the xt_mark.h file. The filesystem is HGFS (a mount point on a MacBook Pro running Ubuntu in VMware Fusion).

The solution is going to be to restore the two files and insure that the filesystem is case-sensitive.