Nuand / bladeRF

bladeRF USB 3.0 Superspeed Software Defined Radio Source Code
http://nuand.com
Other
1.15k stars 459 forks source link

bladeRF-cli: symbol lookup error: bladeRF-cli: undefined symbol: bladerf_log_set_verbosity #214

Closed Yinette closed 10 years ago

Yinette commented 10 years ago

This has popped up when trying to run bladerf-flash and bladerf-cli

defining verbose to try and keep it happy isn't successful:

# bladeRF-cli -v critical
bladeRF-cli: symbol lookup error: bladeRF-cli: undefined symbol: bladerf_log_set_verbosity
# bladeRF-cli -v error
bladeRF-cli: symbol lookup error: bladeRF-cli: undefined symbol: bladerf_log_set_verbosity
# bladeRF-cli -v debug
bladeRF-cli: symbol lookup error: bladeRF-cli: undefined symbol: bladerf_log_set_verbosity
# bladeRF-cli -v verbose
bladeRF-cli: symbol lookup error: bladeRF-cli: undefined symbol: bladerf_log_set_verbosity

none of the cmake cflags seem to change the behaviour, even with the CMAKE_BUILD_TYPE set to Debug.

Am I missing something here?

Thanks.

bpadalino commented 10 years ago

It looks like you don't have /usr/local/lib in your LD_LIBRARY_PATH. Check out the wiki about editing some system files and running ldconfig.

Did you do that?

Yinette commented 10 years ago

Yep, just stepped through that, getting the same error.

bpadalino commented 10 years ago

If you run ldd on the bladeRF-cli executable, what does it show?

jynik commented 10 years ago

This sounds like you may have built against one version of the library, but an older version is lurking "earlier" in the search path. I recommend reviewing this forum thread for some tips on tracking which library is being used at runtime.

In the future, please use the forums instead for some initial troubleshooting. As far as bugs go, we generally like to reserve the tracker for items that are definitely defects. (No worries this time...just a request for any future issues..)

Cheers!

Yinette commented 10 years ago

Hi, you are most certainly correct.

When I compile and make install the binaries and libs (over an already compiled and installed to show locations of where it wants to throw libraries to)

Install the project...
-- Install configuration: "Release"
>-- Installing: /usr/local/lib/x86_64-linux-gnu/pkgconfig/libbladeRF.pc
>-- Installing: /usr/local/lib/x86_64-linux-gnu/libbladeRF.so.0
>-- Up-to-date: /usr/local/lib/x86_64-linux-gnu/libbladeRF.so
-- Removed runtime path from "/usr/local/lib/x86_64-linux-gnu/libbladeRF.so.0"
-- Up-to-date: /usr/local/include/libbladeRF.h
-- Installing: /etc/udev/rules.d/88-nuand.rules
-- Installing: /usr/local/bin/bladeRF-cli
-- Removed runtime path from "/usr/local/bin/bladeRF-cli"
-- Installing: /usr/local/bin/bladeRF-flash
-- Removed runtime path from "/usr/local/bin/bladeRF-flash"

However, an ldd on bladeRF-cli shows:

# ldd bladeRF-cli 
    linux-vdso.so.1 =>  (0x00007fff687fe000)
>   libbladeRF.so.0 => /usr/lib/libbladeRF.so.0 (0x00007f8b39125000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8b38f09000)
    libtecla.so.1 => /usr/lib/libtecla.so.1 (0x00007f8b38ce4000)
    libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f8b38ace000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8b38744000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8b3853b000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8b3935a000)
    libudev.so.0 => /lib/x86_64-linux-gnu/libudev.so.0 (0x00007f8b3832c000)

It's trying to load an old library as you said. A simple symlink should fix this up.

# bladeRF-cli -p
probe: No devices found.

\o/ it works! (my blade RF is indeed not plugged in, that message is correct)

Apologies about that, I'll use the forums in the future.

The help is much appreciated, cheers!

jynik commented 10 years ago

Before we had a CMake-based build, the default install prefix was /usr, so you might have and older lib in /usr/lib and an old header file in /usr/include.

No need to symlink -- it should be safe to remove the bladeRF items in /usr/lib and /usr/include.

Glad to hear you're up and running. Time to have some fun!