hyperionjv / bluecove

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

undefined symbol: sdp_extract_pdu #132

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Grabbed latest gpl code and bluecove binary file. Followed developer readme 
instructions.
2. Installed libbluetooth-dev and libbluetooth3 as well as bluez
3. ant build. Then copied succesffuly compiled binary file and shared native 
files to java program.

What is the expected output? What do you see instead?
Expecting bluecove library to run, however it errors about: undefined symbol: 
sdp_extract_pdu

Running ldd on the produced native file ".so" only displays "statically linked"

What BlueCove version are you using (include build number for SNAPSHOT)? On 
what operating system and jvm? Is this 64-bit or 32-bit OS and jvm?
bluecove-2.1.1-SNAPSHOT
Ubuntu 12.04
arm7 
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)

Please provide any additional information below.
Please use "Attach a file" when uploading stack traces or other big files!

Original issue reported on code.google.com by m...@dknox.co.uk on 20 Jun 2012 at 10:40

Attachments:

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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