Export to GitHub

btstack - issue #213

Cannot compile libBTStack.dylib in Xcode 4.2


Posted on Nov 15, 2011 by Happy Hippo

What steps will reproduce the problem? 1. svn checkout 2. ./configure --target=iphone --with-sdk-version=5.0 3. make

What is the expected? compiled libBTStack.dylib

What do you see instead? [angelius@angelius-imac:/opt/sources/btstack]$ ./configure --target=iphone --with-sdk-version=5.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... config/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking build system type... i386-apple-darwin11.2.0 checking host system type... i386-apple-darwin11.2.0 checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... none checking how to run the C preprocessor... gcc -E checking for gcc... gcc checking whether we are using the GNU Objective C compiler... yes checking whether gcc accepts -g... yes checking dependency style of gcc... none checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes

BTstack configured for HCI H4 Transport Cross-compiling for iPhone/iPod touch using Apple's iPhone SDK 5.0, GCC 4.2.1 SDK path: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk iPhone IP for install-iphone target: USE_BLUETOOL: yes USE_LDID: no CC: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1 CPPFLAGS: -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -Werror -Wall -Wpointer-arith LDFLAGS: -framework CoreFoundation -framework Foundation -framework Foundation -framework CoreFoundation -framework UIKit -lobjc -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/IOKit.framework/Versions/A -lIOKit /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager UART_DEVICE: /dev/tty.bluetooth UART_SPEED: 115200 PLATFORM_SOURCES: bt_control_iphone.m platform_iphone.m USE_LAUNCHD: no USE_SPRINGBOARD: yes USE_PREFSBUNDLE: no USE_POWERMANAGEMENT: yes USE_COCOA_RUN_LOOP: yes REMOTE_DEVICE_DB: remote_device_db_iphone HAVE_SO_NOSIGPIPE: yes

configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating example/Makefile config.status: creating PatchBlueTool/Makefile config.status: creating SpringBoardAccess/Makefile config.status: executing depfiles commands

[angelius@angelius-imac:/opt/sources/btstack]$ make Making all in src ./get_version.sh /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -Werror -Wall -Wpointer-arith -I.. -I../include -dynamiclib -install_name /usr/local/lib/libBTstack.dylib -o libBTstack.dylib btstack.c hci_cmds.c linked_list.c run_loop.c run_loop_posix.c run_loop_cocoa.m sdp_util.c socket_connection.c utils.c -framework CoreFoundation -framework Foundation -framework Foundation -framework CoreFoundation -framework UIKit -lobjc -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/IOKit.framework/Versions/A -lIOKit /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager make[1]: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1: No such file or directory make[1]: * [libBTstack.dylib] Error 1 make: * [all-recursive] Error 1

Comment #1

Posted on Nov 16, 2011 by Happy Hippo

My bad, correct method to build this under Xcode 4.2: ./configure --target=iphone --with-sdk-version=5.0 --with-gcc-version=4.2

Comment #2

Posted on Nov 16, 2011 by Swift Ox

np. Apple's constantly, well every year, changing the tools, and my self-made build system doesn't catch that.

Status: Done

Labels:
Type-Defect Priority-Medium