×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

[Solved] 3rdParty Build Failure

  • Posts: 7
  • Thank you received: 0
I'm having trouble building the 3rdparty code. I've tried on two different Ubuntu systems, one running 14.04 and the other 16.04.

The linker fails with
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libindidriver.so: undefined reference to `libusb_error_name'
whether I try to compile all 3rdparty code, or just indi-gphoto.

If I call ldd on /usr/lib/x86_64-linux-gnu/libindidriver.so, this is the result
	linux-vdso.so.1 =>  (0x00007ffc4a159000)
	libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f4b3b4e1000)
	libnova-0.14.so.0 => /usr/lib/x86_64-linux-gnu/libnova-0.14.so.0 (0x00007f4b3af5a000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4b3ad3c000)
	libcfitsio.so.3 => /usr/lib/x86_64-linux-gnu/libcfitsio.so.3 (0x00007f4b3a984000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4b3a76b000)
	libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f4b3a516000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4b3a212000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4b39f0c000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4b39cf6000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4b39931000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4b39729000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f4b3ba38000)

libindi was built and installed from the git commit, 6240aaa , which is the same commit used to attempt to compile the 3rdparty modules.

I followed the README.md instructions line-by-line, and have triple checked the pre-requisites.

It looks like libusb-1.0 is there. Am I missing something?
-Louis
Last edit: 7 years 6 months ago by Louis McCarthy. Reason: Added "Solved" to the subject
7 years 6 months ago #10259

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic 3rdParty Build Failure

linker fails during building which driver?

EDIT: just built 3rd party, all builds fine.
Last edit: 7 years 6 months ago by Jasem Mutlaq.
7 years 6 months ago #10262

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
Thanks for the reply. Here is the result from running make:
compeoree@Midnight:~/indi/build/3rdparty$ make
[  0%] Linking CXX executable indi_eqmod_telescope
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libindidriver.so: undefined reference to `libusb_error_name'
collect2: error: ld returned 1 exit status
indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/build.make:384: recipe for target 'indi-eqmod/indi_eqmod_telescope' failed
make[2]: *** [indi-eqmod/indi_eqmod_telescope] Error 1
CMakeFiles/Makefile2:85: recipe for target 'indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/all' failed
make[1]: *** [indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
7 years 6 months ago #10264

Please Log in or Create an account to join the conversation.

  • Posts: 226
  • Thank you received: 88

Replied by Jean-Luc on topic 3rdParty Build Failure

Hi,
I already had the same error, it was the microchip mplab ide putting its own libusb library in /usr/local/lib.
It seems the case is similar here as your ldd shows
libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (
Look in /usr/local/lib, generally libusb-1.0.so.0 is a symbolic link, I simply delete/rename it (to use /usr/lib/libusb instead),
and in my case the link is again there on each reboot.
Jean-Luc.
The following user(s) said Thank You: Louis McCarthy
7 years 6 months ago #10272

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
Thanks Jean-Luc,
I think you're on to something!
I do have MPLAB installed on both computers. On my previous post, I pasted the ldd from Ubuntu 14. When I ran ldd from Ubuntu 16 machine this morning, it points to a different libusb.so file (/lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fb3b928f000)). I did quite a bit of hacking on that system last night, though, so let me try to get back to a clean slate and see if I can get it to work.

I also have some ARM cross compile toolchains installed, I'll have to see if those are "helping" too.
Thanks again,
Louis
7 years 6 months ago #10277

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
Thanks to Jean-Luc it's now compiling under Ubuntu 14.04. I moved the special mchp libusb link:
cd  /usr/local/lib/
sudo mv libusb-1.0.so.0 libusb-1.0-special.so.0
and libindi found the correct library without a recompile.

I'll try to get 16.04 working before marking this solved.
7 years 6 months ago #10281

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
I guess I saw warnings and thought it wasn't compiling on 16.04, but now that I cleaned the build folders, and reran cmake and make, everything compiles fine.

Thanks for the help,
Louis
7 years 6 months ago #10289

Please Log in or Create an account to join the conversation.

Time to create page: 0.272 seconds