SUSHMITAH / btstack

Automatically exported from code.google.com/p/btstack
0 stars 0 forks source link

Building for iOS 4.2 #110

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Following instructions from 
http://code.google.com/p/btstack/wiki/GettingStarted
2. ./configure --target=iphone --with-sdk-version=4.2 
3. make

What is the expected output? What do you see instead?

Making all in src
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-
4.2.1 
-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/incl
ude 
-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib/
gcc/arm-apple-darwin10/4.2.1/include 
-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/L
ibrary/Frameworks -Werror -I../include -o BTdaemon btstack.c hci_cmds.c 
linked_list.c run_loop.c run_loop_posix.c run_loop_embedded.c run_loop_cocoa.m 
sdp_util.c socket_connection.c utils.c bt_control_iphone.m daemon.c hci.c 
hci_dump.c hci_transport_h4.c  l2cap.c l2cap_signaling.c 
remote_device_db_iphone.m platform_iphone.c sdp.c 
../SpringBoardAccess/SpringBoardAccess.c -framework CoreFoundation -framework 
Foundation 
-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/L
ibrary/Frameworks 
-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib 
-framework Foundation -framework CoreFoundation -framework UIKit 
-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/L
ibrary/Frameworks/IOKit.framework/Versions/A 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Lib
rary/PrivateFrameworks/BluetoothManager.framework/BluetoothManager -lIOKit 
-lobjc
In file included from 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/mach/mach_types.h:98,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach.h:66,
                 from daemon.c:85:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/mach/clock_types.h:84:1: error: "NSEC_PER_USEC" redefined
In file included from 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/dispatch/dispatch.h:48,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFMessagePort.h:11,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:53,
                 from daemon.c:80:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/dispatch/time.h:51:1: error: this is the location of the previous definition
In file included from 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/mach/mach_types.h:98,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach.h:66,
                 from daemon.c:85:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/mach/clock_types.h:85:1: error: "USEC_PER_SEC" redefined
In file included from 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/dispatch/dispatch.h:48,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFMessagePort.h:11,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:53,
                 from daemon.c:80:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/dispatch/time.h:50:1: error: this is the location of the previous definition
In file included from 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/mach/mach_types.h:98,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach.h:66,
                 from daemon.c:85:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/mach/clock_types.h:86:1: error: "NSEC_PER_SEC" redefined
In file included from 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/dispatch/dispatch.h:48,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFMessagePort.h:11,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:53,
                 from daemon.c:80:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/includ
e/dispatch/time.h:48:1: error: this is the location of the previous definition
make[1]: *** [BTdaemon] Error 1
make: *** [all-recursive] Error 1

What version of the product are you using? On what operating system?
Mac OS 10.6.5 ios sdk 4.2 jailbroken iPod Touch 4G

Please provide any additional information below.
The fix applied to issue 82 must also be applied to daemon.c to build for iOS 
4.2:
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0
#undef NSEC_PER_USEC
#undef USEC_PER_SEC
#undef NSEC_PER_SEC

Original issue reported on code.google.com by doaducao@gmail.com on 5 Jan 2011 at 3:59

GoogleCodeExporter commented 8 years ago
thanks for reporting. that's part of the upcoming power notification handling 
code (to allow iPhone sleep and wakeup). fixed the compiled problem in r832. 
BTstack in Cydia is/will always be compiled against SDK 2.0 (that's why I 
didn't get an error)

Original comment by matthias.ringwald@gmail.com on 6 Jan 2011 at 9:19