tpoechtrager / cctools-port

Apple cctools port for Linux and *BSD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error building iOS toolchain

muratmat opened this issue · comments

Debian 64bit (gcc 6.3.0, clang 3.9 both installed as well as all needed dependencies like llvm-devel, uuid-devel, xar-devel), I'm trying to build the toolchain:

mkdir -p "/tmp/ioscross"
cd "/tmp/ioscross"
wget http://<myxcode-sdk-dir>/iPhoneOS9.3.sdk.tbz2 -O iPhoneOS9.3.sdk.tar.bz2
git clone https://github.com/tpoechtrager/cctools-port.git
cd cctools-port/usage_examples/ios_toolchain
./build.sh /tmp/ioscross/iPhoneOS9.3.sdk.tar.bz2 arm64

Compilation process is ok until libtapi (that is compiled successfuly). Problems arise when bulding cctools / ld64:

*** building cctools / ld64 ***

libtoolize:   error: './config.guess' is newer: use '--force' to overwrite
libtoolize:   error: './config.sub' is newer: use '--force' to overwrite
libtoolize:   error: './install-sh' is newer: use '--force' to overwrite
libtoolize:   error: './ltmain.sh' is newer: use '--force' to overwrite
...
config.status: executing libtool commands
Making all in libobjc2
make[1]: Entering directory '/tmp/ioscross/cctools-port/usage_examples/ios_toolchain/tmp/cctools/libobjc2'
/bin/bash ../libtool    --mode=compile clang -DPACKAGE_NAME=\"cctools\" -DPACKAGE_TARNAME=\"cctools\" -DPACKAGE_VERSION=\"921\" -DPACKAGE_STRING=\"cctools\ 921\" -DPACKAGE_BUGREPORT=\"t.poechtrager@gmail.com\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DEMULATED_HOST_CPU_TYPE=12 -DEMULATED_HOST_CPU_SUBTYPE=0 -D__STDC_LIMIT_MACROS=1 -D__STDC_CONSTANT_MACROS=1 -DHAVE_EXECINFO_H=1 -DHAVE_UUID_UUID_H=1 -DHAVE_UTIMENSAT=1 -DHAVE_STAT_ST_MTIM=1 -DHAVE_XAR_XAR_H=1 -I. -I../../../../../cctools/libobjc2  -DTYPE_DEPENDENT_DISPATCH -DGNUSTEP -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_SOURCE=500 -D__BSD_VISIBLE=1 -D_DEFAULT_SOURCE=1 -DNO_SELECTOR_MISMATCH_WARNINGS -isystem /tmp/ioscross/cctools-port/usage_examples/ios_toolchain/target/include -std=gnu99 -Wall -Wno-objc-root-class -Wno-deprecated-objc-isa-usage -O3 -c -o libobjc_la-NSBlocks.lo `test -f 'NSBlocks.m' || echo '../../../../../cctools/libobjc2/'`NSBlocks.m
libtool: Version mismatch error.  This is libtool 2.4.6.42-b88ce, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6.42-b88ce
libtool: and run autoconf again.
Makefile:558: recipe for target 'libobjc_la-NSBlocks.lo' failed
make[1]: *** [libobjc_la-NSBlocks.lo] Error 63
make[1]: Leaving directory '/tmp/ioscross/cctools-port/usage_examples/ios_toolchain/tmp/cctools/libobjc2'
Makefile:415: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

*** checking toolchain ***

/usr/bin/ld: unrecognized option '-dynamic'
/usr/bin/ld: use the --help option for usage information
clang: error: linker command failed with exit code 1 (use -v to see invocation)

On my system /usr/bin/ld points to:

developer@BuildBox:~$ ll /usr/bin/ld
lrwxrwxrwx 1 root root 19 Mar  7  2017 /usr/bin/ld -> x86_64-linux-gnu-ld

Any guess? Many thanks in advance!

I have pushed a "fix". Please try again.

Now it works, many thanks!