×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Building 3rd party drivers and libftdi-dev

  • Posts: 86
  • Thank you received: 5
Hi there. I have indiserver running and next I need to add the 3rdparty drivers. I've successfully retrieved the 3rdparty files but when I run cmake on them it complains that libftdi-dev isn't present. Unfortunately I can't just install libftdi as the armv7h version is not available for my distribution (Arch Linux) according to pacman. So I've built libftdi from the source but this only gives me libftdi1 libs in usr/local, no sign of a libftdi-dev.

Does anyone have any advice as to how I should resolve this issue?

Rob
9 years 3 weeks ago #3806

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

  • Posts: 171
  • Thank you received: 41
Can you paste the cmake output? Does it happen @libqsi? I had a similar problem when packaging for Fedora (we do not have the old libftdi0 there) and got it working with a patch in cmake stuff: build.opensuse.org/package/view_file/hom..._ftdi.patch?expand=1
9 years 3 weeks ago #3807

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

  • Posts: 86
  • Thank you received: 5
Hi: I'm not near the machine at the moment, I'll post the detail when I get back there later today.
9 years 3 weeks ago #3808

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

  • Posts: 86
  • Thank you received: 5
Right, I have actually managed to install libftdi but that doesn't seem to have helped (it certainly hasn't brought into existence a /usr/lib/libftdi-dev, just a /usr/lib/libftdi1 and /usr/lib/libftdipp1). As you say, it happens in @libqsi. However I also note that CMake can't find pthread and I wonder if that might actually be the problem, not libftdi at all; I have GCC installed and libpthread appears to be present:

/usr/lib/libpthread-2.20.so  /usr/lib/libpthread.so.0
/usr/lib/libpthread.a        /usr/lib/libpthread_nonshared.a
/usr/lib/libpthread.so

I've attached CMakeError.txt and CMakeOutput.txt. Here is the output of cmake -L:

[rob@AstroOne 3rdparty]$ cmake -L
-- Found INDI: /usr/lib/libindi.so
-- Found libnova: /usr/lib/libnova.so
-- Found CFITSIO: /usr/lib/libcfitsio.so
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/libusb-1.0.so
-- Found INDI: /usr/lib/libindi.so
-- Found INDI: /usr/lib/libindi.so
-- Found libnova: /usr/lib/libnova.so
-- Found CFITSIO: /usr/lib/libcfitsio.so
-- Found INDI: /usr/lib/libindi.so
-- Found libnova: /usr/lib/libnova.so
-- Found INDI: /usr/lib/libindi.so
CMake Error at libqsi/cmake_modules/FindFTDI.cmake:43 (message):
  FTDI not found.  Please install libftdi-dev
Call Stack (most recent call first):
  libqsi/CMakeLists.txt:6 (FIND_PACKAGE)
 
 
-- Configuring incomplete, errors occurred!
-- Cache values
CFITSIO_DIR:PATH=CFITSIO_DIR-NOTFOUND
CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4
CMAKE_BUILD_TYPE:STRING=
CMAKE_INSTALL_PREFIX:PATH=/usr
EXECUTABLE_OUTPUT_PATH:PATH=
FTDI_INCLUDE_DIR:PATH=FTDI_INCLUDE_DIR-NOTFOUND
FTDI_LIBRARIES:FILEPATH=FTDI_LIBRARIES-NOTFOUND
LIBRARY_OUTPUT_PATH:PATH=
LIBUSB_1_INCLUDE_DIR:PATH=/usr/include/libusb-1.0
LIBUSB_1_LIBRARY:FILEPATH=/usr/lib/libusb-1.0.so
STOP_WHEN_MOTION_CHANGED:BOOL=ON
WITH_ALIGN_GEEHALEL:BOOL=ON
WITH_APOGEE:BOOL=ON
WITH_ASICAM:BOOL=ON
WITH_CLOUDWATCHER:BOOL=ON
WITH_DSI:BOOL=ON
WITH_DUINO:BOOL=ON
WITH_EQMOD:BOOL=ON
WITH_FISHCAMP:BOOL=ON
WITH_FLI:BOOL=ON
WITH_GPHOTO:BOOL=ON
WITH_MAXDOME:BOOL=ON
WITH_NOFMANY:BOOL=ON
WITH_QHY:BOOL=ON
WITH_QSI:BOOL=ON
WITH_SBIG:BOOL=ON
WITH_SCOPE_LIMITS:BOOL=ON
WITH_SIMULATOR:BOOL=ON
WITH_SPECTRACYBER:BOOL=ON
WITH_SX:BOOL=ON

...and here is the output of cmake -DCMAKE_INSTALL_PREFIX=/usr .:

[rob@AstroOne 3rdparty]$ cmake -DCMAKE_INSTALL_PREFIX=/usr .
-- Found INDI: /usr/lib/libindi.so
-- Found libnova: /usr/lib/libnova.so
-- Found CFITSIO: /usr/lib/libcfitsio.so
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/libusb-1.0.so
-- Found INDI: /usr/lib/libindi.so
-- Found INDI: /usr/lib/libindi.so
-- Found libnova: /usr/lib/libnova.so
-- Found CFITSIO: /usr/lib/libcfitsio.so
-- Found INDI: /usr/lib/libindi.so
-- Found libnova: /usr/lib/libnova.so
-- Found INDI: /usr/lib/libindi.so
CMake Error at libqsi/cmake_modules/FindFTDI.cmake:43 (message):
  FTDI not found.  Please install libftdi-dev
Call Stack (most recent call first):
  libqsi/CMakeLists.txt:6 (FIND_PACKAGE)
 
 
-- Configuring incomplete, errors occurred!

I hope you can help me, this should be one-off installation problem.

Rob
Last edit: 9 years 3 weeks ago by Rob Meades.
9 years 3 weeks ago #3812
Attachments:

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

  • Posts: 86
  • Thank you received: 5
FYI, CMake is testing for -lpthreads (with an 's') rather than -lpthread. As an experiment, if I run gcc on the command line as follows:

gcc -lpthreads

...it says:

/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status

...whereas if I say:

gcc -lpthread

...I get:

/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/4.9.2/../../../crt1.o: In function `_start':
init.c:(.text+0x34): undefined reference to `main'
collect2: error: ld returned 1 exit status

...which makes me think gcc doesn't understand the 's' version. There is some discussion on the topic here:

www.cmake.org/Bug/view.php?id=14767

Was this to do with the CMake patch you applied?
Last edit: 9 years 3 weeks ago by Rob Meades.
9 years 3 weeks ago #3815

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

  • Posts: 86
  • Thank you received: 5
There seems to be a THREADS_PREFER_PTHREAD_FLAG flag one can apply to cmake which could help (see FindThread.cmake attached, but with a .txt extension to satisfy the attachments process for posting), I just don't know how to apply it.

[EDIT: no that's to do the pthread verus lpthread]
Last edit: 9 years 3 weeks ago by Rob Meades.
9 years 3 weeks ago #3823
Attachments:

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

RobMeades, you don't need to install ALL the 3rd party drivers. Which 3rd party driver do _you_ need? Just go to the driver and run cmake there for that specific driver. Also, libqsi require libftdi not libftdi1 which doesn't appear to be on ArchLinux.
9 years 3 weeks ago #3825

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

  • Posts: 86
  • Thank you received: 5
True, I only want the asicam at the moment, I was just trying to prove that my build environment was good for everything Indi on Arch and trying to avoid a recursive "but you'll need to build another lib..." loop. Mind you, maybe that was overreaching.

I can build just indi_asi_ccd so will move on with that.

Rob
Last edit: 9 years 3 weeks ago by Rob Meades.
9 years 3 weeks ago #3827

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

Time to create page: 0.678 seconds