Open GoogleCodeExporter opened 9 years ago
This seems to be an issue with the order of link arguments. Putting
"-lbluetooth" further down in build.xml resolves this issue.
Original comment by s...@home-area.net
on 23 May 2014 at 10:14
I encountered the same problem and what u suggest "Putting -bluetooth further
down" cannot resolve the problem.
Original comment by angusca...@gmail.com
on 24 May 2014 at 10:11
I had the same issue. Putting -L<lib path> -lbluetooth arguments last when
linking solved the problem (using custom makefile to build the lib).
Original comment by mar...@tilljorden.com
on 1 Sep 2014 at 9:54
Even after moving the parameter to the end, I still get this:
compile-native-lib:
[echo] compiling .c -> .o
[apply] /home/inventmarine/bluecove/bluecove-gpl-2.1.0/src/main/c/BlueCoveBlueZ_SDPServer.c: In function ‘bluecove_sdp_extract_pdu’:
[apply] /home/inventmarine/bluecove/bluecove-gpl-2.1.0/src/main/c/BlueCoveBlueZ_SDPServer.c:94:47: warning: assignment from incompatible pointer type [enabled by default]
[echo] linking .o -> libbluecove_arm.so
[echo] ldd libbluecove_arm.so
[exec] libbluetooth.so.3 => /usr/lib/arm-linux-gnueabihf/libbluetooth.so.3 (0xb6ee6000)
[exec] libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e01000)
[exec] /lib/ld-linux-armhf.so.3 (0xb6f21000)
[exec]
[exec] Version information:
[exec] /usr/lib/arm-linux-gnueabihf/libbluetooth.so.3:
[exec] ld-linux-armhf.so.3 (GLIBC_2.4) => /lib/ld-linux-armhf.so.3
[exec] libc.so.6 (GLIBC_2.7) => /lib/arm-linux-gnueabihf/libc.so.6
[exec] libc.so.6 (GLIBC_2.15) => /lib/arm-linux-gnueabihf/libc.so.6
[exec] libc.so.6 (GLIBC_2.4) => /lib/arm-linux-gnueabihf/libc.so.6
[exec] /lib/arm-linux-gnueabihf/libc.so.6:
[exec] ld-linux-armhf.so.3 (GLIBC_2.4) => /lib/ld-linux-armhf.so.3
[exec] ld-linux-armhf.so.3 (GLIBC_PRIVATE) => /lib/ld-linux-armhf.so.3
[copy] Copying 1 file to /home/inventmarine/bluecove/bluecove-gpl-2.1.0/src/main/resources
[copy] Copying 1 file to /home/inventmarine/bluecove/bluecove-gpl-2.1.0/target/classes
native-lib:
Also, that is how my build.xml looks like:
<apply executable="${CC}" parallel="true" failonerror="true">
<arg value="-shared"/>
<!--
This is used on Build Server to create Universal binary
ldd libbluecove.so
linux-gate.so.1 =>
libbluetooth.so =>
The directory should contain libbluetooth.so binary edited to remove version from name e.g.
libbluetooth.so.2 -> libbluetooth.so
libbluetooth.so.3 -> libbluetooth.so
-->
<arg value="-nodefaultlibs"/>
<arg value="-o"/>
<arg value="${target}/${library_name}"/>
<fileset dir='${build_native}' includes="*.o"/>
<srcfile/>
<arg value="-L${libs-universal}"/>
<arg value="-lbluetooth"/>
</apply>
Original comment by fsa...@gmail.com
on 19 Sep 2014 at 9:02
I've also tried:
<arg value="-nodefaultlibs"/>
<arg value="-L${libs-universal}"/>
<arg value="-lbluetooth"/>
<arg value="-o"/>
<arg value="${target}/${library_name}"/>
<fileset dir='${build_native}' includes="*.o"/>
<srcfile/>
Original comment by fsa...@gmail.com
on 19 Sep 2014 at 10:37
I got the same error under Ubuntu. The issue is in version of gcc. Different versions have different default parametrs. I had to update build.xml for bluecove-gpl-2.1.1-SNAPSHOT.jar to make it work.
1) <property name=»bluecove.native.linker.options» value=»-nodefaultlibs«/> => <property name=»bluecove.native.linker.options» value=»»/> 2) <arg value=»-Wl,-soname,libbluecove${library_sufix}-${product_version}»/> => <arg value=»-Wl,--no-as-needed,-soname,libbluecove${library_sufix}-${product_version}»/> 3) <arg value=»-L${libs-universal}»/> <arg value=»-lbluetooth»/> <arg line=»${bluecove.native.linker.options}»/> <arg value=»-Wl,-soname,libbluecove${library_sufix}-${product_version}»/> => <arg value=»-L${libs-universal}»/> <arg line=»${bluecove.native.linker.options}»/> <arg value=»-Wl,—no-as-needed,-soname,libbluecove${library_sufix}-${product_version}»/> <arg value=»-lbluetooth»/>
http://privateblog.info/raspberry-pi-kak-rabotat-s-bluetooth-na-java/
Original issue reported on code.google.com by
m...@dknox.co.uk
on 20 Jun 2012 at 10:40Attachments: