tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.81k stars 320 forks source link

Can't build osxcross under WSL #357

Open Xottab-DUTY opened 1 year ago

Xottab-DUTY commented 1 year ago

I'm trying to build osxcross using Ubuntu 20.04 under WSL: I've tried SDKs 11.0 and 11.3 from this repository. Also tried to download Xcode 10.1 from Apple and package its SDK, no luck - I'm getting this error:

libcodedirectory.c:241:56: error: use of undeclared identifier 'DISPATCH_QUEUE_SERIAL'
        log_queue = dispatch_queue_create("libcd_log", DISPATCH_QUEUE_SERIAL);
                                                       ^
libcodedirectory.c:947:40: error: use of undeclared identifier 'DISPATCH_APPLY_AUTO'
            dispatch_apply(page_count, DISPATCH_APPLY_AUTO, ^(size_t page_no) {
                                       ^
2 errors generated.
make[4]: *** [Makefile:581: ld-libcodedirectory.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/xottab_duty/osxcross/osxcross/build/cctools-port/cctools/ld64/src/ld'
make[3]: *** [Makefile:668: all-recursive] Error 1
make[3]: Leaving directory '/home/xottab_duty/osxcross/osxcross/build/cctools-port/cctools/ld64/src/ld'
make[2]: *** [Makefile:385: all-recursive] Error 1
make[2]: Leaving directory '/home/xottab_duty/osxcross/osxcross/build/cctools-port/cctools/ld64/src'
make[1]: *** [Makefile:386: all-recursive] Error 1
make[1]: Leaving directory '/home/xottab_duty/osxcross/osxcross/build/cctools-port/cctools/ld64'
make: *** [Makefile:421: all-recursive] Error 1

exiting with abnormal exit code (2)
run 'OCDEBUG=1 ./build.sh' to enable debug messages

I tried to package SDK from Command Line Tools - getting another error:

Unpacking ~/osxcross/osxcross/Command_Line_Tools_for_Xcode_12.5.1.dmg ...
/home/xottab_duty/osxcross/osxcross/target/SDK/tools/bin/7z e -so "~/osxcross/osxcross/Command_Line_Tools_for_Xcode_12.5.1.dmg"  "Command Line Developer Tools/Command Line Tools*.pkg" > "Command Line Tools.pkg"

7-Zip [64] 9.38 beta  Copyright (c) 1999-2014 Igor Pavlov  2015-01-03
p7zip Version 9.38.1 (locale=C,Utf16=off,HugeFiles=on,4 CPUs)

Command Line Error:
Cannot find archive
~
Removing /home/xottab_duty/osxcross/osxcross/build/tmp_13715 ...