michelcandido / btstack

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

Unable to build btstack #165

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Checkout btstack
2. Follow all instructions in Getting Started page 
(http://code.google.com/p/btstack/wiki/GettingStarted)

When I try to build btstack from the checked out folder I get a lot of errors, 
and I cannot build it.
However I precisely followed every step of the getting started page from the 
wiki.
For making configure.sh i wrote "./configure --target=iphone 
--with-sdk-version=3.2" (my Xcode version is 3.2
What's the problem ?

What version of the product are you using? On what operating system?
I use the last version of btstack from the svn repository (r1113) and my OS is 
Mac OSX 10.6.7

Please provide any additional information below.
This is the log : 
http://cy.itmfr.net/error_log.txt

Thank You,
Tiz38

Original issue reported on code.google.com by izarn.th...@gmail.com on 31 May 2011 at 5:40

GoogleCodeExporter commented 8 years ago
Ok I'm stupid, my SDK is 4.2 and not 3.2^^

So I configured for 4.2 but when I try to compile i still get errors !
-----------------------

/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 test test.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 -lBTstack -L../src
ld: library not found for -lBTstack
collect2: ld returned 1 exit status
make: *** [test] Error 1
-----------------------------

Please Help me !
Thank You !

Original comment by izarn.th...@gmail.com on 4 Jun 2011 at 3:43

GoogleCodeExporter commented 8 years ago
in the main folder, try "make clean' and then "make" again

Original comment by matthias.ringwald@gmail.com on 4 Jun 2011 at 3:51

GoogleCodeExporter commented 8 years ago
Thank you but this not worked...

This is the terminal output :

Tiz:btstack Thomas$ make clean
Making clean in PatchBlueTool
rm -f PatchBlueTool
Making clean in SpringBoardAccess
rm -f SpringBoardAccess.dylib SpringBoardAccess-test
Making clean in example
rm -f test mitm rfcomm-cat rfcomm-echo inquiry l2cap-server l2cap-throughput 
obex
Making clean in src
rm -rf libBTstack* BTdaemon *.o
Making clean in .
make[1]: Nothing to be done for `clean-am'.
Tiz:btstack Thomas$ cd example
Tiz:example Thomas$ make
/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 test test.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 -lBTstack -L../src
ld: library not found for -lBTstack
collect2: ld returned 1 exit status
make: *** [test] Error 1

Thank you :)

Original comment by izarn.th...@gmail.com on 4 Jun 2011 at 3:54

GoogleCodeExporter commented 8 years ago
it doesn't work because your ran "make" inside the "example" folder. I didn't 
tell you that.

run "make" in the main folder. also try to read & understand the error output: 
it says " library not found for -lBTstack". libBTstack.dylib is build in "src" 
btw. later you can build examples in "examples" folder. 

Original comment by matthias.ringwald@gmail.com on 4 Jun 2011 at 4:01

GoogleCodeExporter commented 8 years ago
OK...

Sorry for my stupidity.
Indeed it's working nice, but i can't find the line where to place the 
wiimote's MAC adress in test.c :)

Thank you again,
Tiz38

Original comment by izarn.th...@gmail.com on 4 Jun 2011 at 4:03

GoogleCodeExporter commented 8 years ago
line 48

Original comment by matthias.ringwald@gmail.com on 4 Jun 2011 at 4:10

GoogleCodeExporter commented 8 years ago
Thank you, i replace "0x76, 0x6d, 0x62, 0xdb, 0xca, 0x73 " by my MAC adress ?

But where can I fond this adresse on the wiimote ?

Sorry for theses stupid questions...

Original comment by izarn.th...@gmail.com on 4 Jun 2011 at 4:17

GoogleCodeExporter commented 8 years ago
make WiiMote discoverable (1+2 at the same time -> blinking), run inquiry 
example. .. or pair with a computer and check there.

Original comment by matthias.ringwald@gmail.com on 4 Jun 2011 at 4:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thank you I finally suceed and the test tool work fine!

Now i tried to launch the wiimote opengl xcode project file but i get 16 errors 
when I compile!
------------------------------------------
ld: warning: ignoring file /Users/Thomas/btstack/src/libbtstack.dylib, file was 
built for unsupported file format which is not the architecture being linked 
(i386)
ld: warning: ignoring file /Users/Thomas/btstack/src/libBTstack.dylib, file was 
built for unsupported file format which is not the architecture being linked 
(i386)
Undefined symbols for architecture i386:
  "_bt_flip_addr", referenced from:
      -[WiiMoteOpenGLDemoAppDelegate btstackManager:handlePacketWithType:forChannel:andData:withLen:] in WiiMoteOpenGLDemoAppDelegate.o
      -[BTstackManager handleRemoteNameCached:] in BTstackManager.o
      -[BTstackManager handleRemoteName:] in BTstackManager.o
      -[BTstackManager discoveryHandleEvent:withLen:] in BTstackManager.o
  "_bt_send_cmd", referenced from:
      -[WiiMoteOpenGLDemoAppDelegate btstackManager:handlePacketWithType:forChannel:andData:withLen:] in WiiMoteOpenGLDemoAppDelegate.o
      -[WiiMoteOpenGLDemoAppDelegate discoveryStoppedBTstackManager:] in WiiMoteOpenGLDemoAppDelegate.o
      -[BTstackManager activate] in BTstackManager.o
      -[BTstackManager deactivate] in BTstackManager.o
      -[BTstackManager startDiscovery] in BTstackManager.o
      -[BTstackManager stopDiscovery] in BTstackManager.o
      -[BTstackManager activationHandleEvent:withLen:] in BTstackManager.o
      ...
  "_bt_send_l2cap", referenced from:
      -[WiiMoteOpenGLDemoAppDelegate btstackManager:handlePacketWithType:forChannel:andData:withLen:] in WiiMoteOpenGLDemoAppDelegate.o
  "_l2cap_create_channel", referenced from:
      -[WiiMoteOpenGLDemoAppDelegate btstackManager:handlePacketWithType:forChannel:andData:withLen:] in WiiMoteOpenGLDemoAppDelegate.o
      -[WiiMoteOpenGLDemoAppDelegate discoveryStoppedBTstackManager:] in WiiMoteOpenGLDemoAppDelegate.o
  "_OBJC_CLASS_$_CAEAGLLayer", referenced from:
      objc-class-ref in EAGLView.o
  "_run_loop_init", referenced from:
      -[BTstackManager init] in BTstackManager.o
  "_bt_register_packet_handler", referenced from:
      -[BTstackManager init] in BTstackManager.o
  "_bt_open", referenced from:
      -[BTstackManager activate] in BTstackManager.o
  "_hci_remote_name_request", referenced from:
      -[BTstackManager discoveryRemoteName] in BTstackManager.o
  "_hci_write_inquiry_mode", referenced from:
      -[BTstackManager startDiscovery] in BTstackManager.o
      -[BTstackManager discoveryHandleEvent:withLen:] in BTstackManager.o
  "_hci_inquiry", referenced from:
      -[BTstackManager discoveryRemoteName] in BTstackManager.o
      -[BTstackManager discoveryHandleEvent:withLen:] in BTstackManager.o
  "_btstack_set_system_bluetooth_enabled", referenced from:
      -[BTstackManager activationHandleEvent:withLen:] in BTstackManager.o
  "_btstack_get_system_bluetooth_enabled", referenced from:
      -[BTstackManager activate] in BTstackManager.o
  "_hci_remote_name_request_cancel", referenced from:
      -[BTstackManager stopDiscovery] in BTstackManager.o
      -[BTstackManager discoveryHandleEvent:withLen:] in BTstackManager.o
  "_btstack_set_power_mode", referenced from:
      -[BTstackManager deactivate] in BTstackManager.o
      -[BTstackManager activationHandleEvent:withLen:] in BTstackManager.o
  "_hci_inquiry_cancel", referenced from:
      -[BTstackManager stopDiscovery] in BTstackManager.o
      -[BTstackManager discoveryHandleEvent:withLen:] in BTstackManager.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
---------------------------

But my architecture in project settings is arm !
What's the problem pls?

Thank you for your full help :)

Original comment by izarn.th...@gmail.com on 4 Jun 2011 at 4:49

Attachments:

GoogleCodeExporter commented 8 years ago
Ok I compiled the project on my real device, & I still get one error !

Look at this screen for more infos :)

Thank you very much,
Tiz38

Original comment by izarn.th...@gmail.com on 6 Jun 2011 at 7:59

Attachments:

GoogleCodeExporter commented 8 years ago
I have the same issue I tried copying the the header files into my project 
along with the .m files for inquiry and discovery and and I am getting an the 
same errors .'

As below :

ld: warning: ignoring file /Users/naderelnino/Documents/Xcode 
projects/Bluetoothapptest/Bluetoothapptest/libBTstack.dylib, file was built for 
unsupported file format ( 0xce 0xfa 0xed 0xfe 0x c 0x 0 0x 0 0x 0 0x 0 0x 0 0x 
0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): 
/Users/naderelnino/Documents/Xcode 
projects/Bluetoothapptest/Bluetoothapptest/libBTstack.dylib

Original comment by nadermel...@gmail.com on 21 Sep 2012 at 2:30

GoogleCodeExporter commented 8 years ago
you should use the CFLAGS to help Xcode find the header files instead of 
copying it.
Your error indicates your mixing architectures - like using the iOS build for 
the simulator.

Original comment by matthias.ringwald@gmail.com on 25 Sep 2012 at 1:01