MacOS build failure. `missing separator` error

Hello. Sorry for a bit of amateurish question but it won't let me go any further.

I'm trying to build OpenWrt on MacOS 10.14.6 but make kernel_menuconfig exits with with an error Makefile:37: *** missing separator. Stop. upon building u-boot.

Here's the last lines of make -j1 V=sc kernel_menuconfig:

time: tools/mtd-utils/compile#0.06#0.06#0.18
make[3]: Entering directory `/Volumes/OpenWrt/openwrt/tools/mkimage'
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Volumes/OpenWrt/openwrt/build_dir/host/u-boot-2020.04 HOSTCFLAGS="-O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include " HOSTLDFLAGS="-L/Volumes/OpenWrt/openwrt/staging_dir/host/lib " no-dot-config-targets=tools-only CONFIG_MKIMAGE_DTC_PATH=dtc CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 tools-only
Makefile:37: *** missing separator.  Stop.
make[3]: *** [/Volumes/OpenWrt/openwrt/build_dir/host/u-boot-2020.04/.built] Error 2

I've tried to replace every leading space in u-boot Makefile with tab to no avail.

The Xcode bundled version of make is quite old (3.81/82 can't remember). Install make from homebrew 'brew install make' and then link /usr/local/bin/make to /usr/local/bin/gmake and try again.

Thank you. That solved the missing separator error.

Now I'm facing multiple error: unknown type name '__u64'; did you mean '__s64' errors. Is there a way to fix them?

make[3]: Entering directory '/Volumes/OpenWrt/openwrt/package/boot/uboot-mediatek'
rm -f /Volumes/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7622/u-boot-2020.04/.built
touch /Volumes/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7622/u-boot-2020.04/.built_check
make  -C /Volumes/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7622/u-boot-2020.04 CROSS_COMPILE=aarch64-openwrt-linux-musl- DTC="/Volumes/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-5.4.39/scripts/dtc/dtc" HOSTCC="gcc" HOSTCFLAGS="-O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include -I/Volumes/OpenWrt/openwrt/staging_dir/hostpkg/include -I/Volumes/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/host/include -I/Volumes/OpenWrt/openwrt/staging_dir/host/include -I/Volumes/OpenWrt/openwrt/staging_dir/hostpkg/include -I/Volumes/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/host/include -std=gnu11" HOSTLDFLAGS="-L/Volumes/OpenWrt/openwrt/staging_dir/host/lib -L/Volumes/OpenWrt/openwrt/staging_dir/hostpkg/lib -L/Volumes/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/host/lib" u-boot-mtk.bin
make[4]: Entering directory '/Volumes/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7622/u-boot-2020.04'
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  CHK     include/generated/generic-asm-offsets.h
  CHK     include/generated/asm-offsets.h
  HOSTCC  tools/lib/crc8.o
  HOSTLD  tools/gen_ethaddr_crc
ld: warning: directory not found for option '-L/Volumes/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/host/lib'
  HOSTCC  tools/lib/crc32.o
  HOSTLD  tools/mkenvimage
ld: warning: directory not found for option '-L/Volumes/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/host/lib'
  HOSTCC  tools/aisimage.o
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:13:
include/linux/types.h:146:9: error: unknown type name '__u64'; did you mean '__s64'?
typedef __u64 __bitwise __le64;
        ^
/Volumes/OpenWrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
                                           ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:13:
include/linux/types.h:147:9: error: unknown type name '__u64'; did you mean '__s64'?
typedef __u64 __bitwise __be64;
        ^
/Volumes/OpenWrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
                                           ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:125:42: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
                                         ^
/Volumes/OpenWrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
                                           ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:125:58: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
                                                         ^
/Volumes/OpenWrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
                                           ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:130:12: error: use of undeclared identifier '__u64'
        return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));
                  ^
include/linux/byteorder/swab.h:130:42: error: use of undeclared identifier '__u64'
        return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));
                                                ^
include/linux/byteorder/swab.h:135:19: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __u64 __swab64p(const __u64 *x)
                  ^
/Volumes/OpenWrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
                                           ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:135:41: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __u64 __swab64p(const __u64 *x)
                                        ^
/Volumes/OpenWrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
                                           ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
        return __arch__swab64p(x);
               ^
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:89:24: note: expanded from macro '__swab64'
(__builtin_constant_p((__u64)(x)) ? \
                       ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:32:4: note: expanded from macro '___swab64'
        ((__u64)( \
          ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:33:4: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
                 ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:33:13: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
                          ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:33:26: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
                                       ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:34:4: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
                 ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:34:13: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
                          ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:34:26: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
                                       ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:35:4: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
                 ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:35:13: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
                          ^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
#  define __arch__swab64p(x) __swab64(*(x))
                             ^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
 ___swab64((x)) : \
 ^
include/linux/byteorder/swab.h:35:26: note: expanded from macro '___swab64'
                (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
                                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.