×

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

Bi-monthly release with minor bug fixes and improvements

compile indi-gphoto on Raspberry pi ERROR | SOLVED

  • Posts: 19
  • Thank you received: 1
Hi all,
i am trying to compile the needed stuff for an indiserver on my raspberry pi
in order to control my gear through kstars / Ekos.

If i connect my gear directly to the laptop with kstars bleeding on ubuntu 14.04
everyting is working fine. Here i use EQ6, Canon DSLR

On the Raspberry i use indi_eqmod_telescope, indi_gphoto.
If i try to connect to gphoto it wont work. It says:
"2014-06-19T18:20:22: Can not open camera: Power OK? "
Everything is connected through a powered Hub

So i try to compile newest version of gphoto like described here:
"www.indilib.org/forum/general/215-ekos-i...on-rasbperry-pi.html"
"cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/trunk/3rdparty/indi-gphoto"
gives no Errors
make gives:
Scanning dependencies of target indi_gphoto_ccd
[ 33%] Building CXX object CMakeFiles/indi_gphoto_ccd.dir/gphoto_ccd.o
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_ccd.cpp: In member function ‘virtual bool GPhotoCCD::ISNewSwitch(const char*, const char*, ISState*, char**, int)’:
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_ccd.cpp:389:36: warning: the address of ‘int gphoto_auto_focus(gphoto_driver*)’ will never be NULL [-Waddress]
[ 66%] Building C object CMakeFiles/indi_gphoto_ccd.dir/gphoto_driver.o
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_driver.c: In function ‘gphoto_open’:
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_driver.c:685:2: warning: passing argument 2 of ‘gp_log_add_func’ from incompatible pointer type [enabled by default]
/usr/include/gphoto2/gphoto2-port-log.h:71:6: note: expected ‘GPLogFunc’ but argument is of type ‘void (*)(enum GPLogLevel, const char *, const char *, void *)’
[100%] Building C object CMakeFiles/indi_gphoto_ccd.dir/gphoto_readimage.o
Linking CXX executable indi_gphoto_ccd
CMakeFiles/indi_gphoto_ccd.dir/gphoto_ccd.o: In function `GPhotoCCD::initProperties()':
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_ccd.cpp:219: undefined reference to `CCDChip::setCCDInfoWritable()'
collect2: ld returned 1 exit status
make[2]: *** [indi_gphoto_ccd] Fehler 1
make[1]: *** [CMakeFiles/indi_gphoto_ccd.dir/all] Fehler 2
make: *** [all] Fehler 2

Any Suggestions?

Sorry for my english

CS Jens
CS Jens
Last edit: 9 years 9 months ago by Jens.
9 years 9 months ago #1328

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

You need to install latest libindi as well on the PI.
9 years 9 months ago #1329

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

  • Posts: 19
  • Thank you received: 1
Is this giving the latest Version of libindi?

$ svn co svn://svn.code.sf.net/p/indi/code/trunk/
$ cd build/libindi
$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/trunk/libindi
$ sudo make install

If yes i did it.

CS Jens
CS Jens
9 years 9 months ago #1330

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

Then that means that previous installation of the INDI Library is still lurking on the PI and they are getting linked to gphoto instead of the updated libindi. Before recompiling libindi again, try removing existing libindi0 debian package, or just delete the old libraries:
cd /usr/lib/arm-linux-gnueabihf
sudo rm libAlignmentDriver.so  libindidriver.so.0  libindidriver.so.0.9.8  libindimain.so.0  libindimain.so.0.9.8  libindi.so.0  libindi.so.0.9.8

Then recompile and reinstall libindi again, and then recompile GPhoto but make sure to delete the build directory of gphoto to clear the cache and run cmake again. It should now link to the latest libindi libraries. I will release updated packages soon for the PI as well.
The following user(s) said Thank You: Jens
Last edit: 9 years 9 months ago by Jasem Mutlaq.
9 years 9 months ago #1331

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

  • Posts: 19
  • Thank you received: 1
OK I did remove the lib's, compile and install libindi new.
I removed the folder ~/Projects/bulid/indi-gphoto
Try to build indi-gphoto in a new folder but no luck
here are the new Errors:
pi@raspberrypi ~/Projects/build $ make
Scanning dependencies of target indi_gphoto_ccd
[ 33%] Building CXX object CMakeFiles/indi_gphoto_ccd.dir/gphoto_ccd.o
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_ccd.cpp: In member function ‘virtual bool GPhotoCCD::ISNewSwitch(const char*, const char*, ISState*, char**, int)’:
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_ccd.cpp:389:36: warning: the address of ‘int gphoto_auto_focus(gphoto_driver*)’ will never be NULL [-Waddress]
[ 66%] Building C object CMakeFiles/indi_gphoto_ccd.dir/gphoto_driver.o
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_driver.c: In function ‘gphoto_open’:
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_driver.c:685:2: warning: passing argument 2 of ‘gp_log_add_func’ from incompatible pointer type [enabled by default]
/usr/include/gphoto2/gphoto2-port-log.h:71:6: note: expected ‘GPLogFunc’ but argument is of type ‘void (*)(enum GPLogLevel, const char *, const char *, void *)’
[100%] Building C object CMakeFiles/indi_gphoto_ccd.dir/gphoto_readimage.o
make[2]: *** Keine Regel vorhanden, um das Target »/usr/lib/arm-linux-gnueabihf/libindidriver.so«,
benötigt von »indi_gphoto_ccd«, zu erstellen. Schluss.
make[1]: *** [CMakeFiles/indi_gphoto_ccd.dir/all] Fehler 2
make: *** [all] Fehler 2

I think i will start from scratch

CS Jens
CS Jens
9 years 9 months ago #1332

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

  • Posts: 19
  • Thank you received: 1
OK i started from the beginning.

Here is the output of make

pi@raspberrypi ~/Projects/build $ make
Scanning dependencies of target indi_gphoto_ccd
[ 33%] Building CXX object CMakeFiles/indi_gphoto_ccd.dir/gphoto_ccd.o
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_ccd.cpp: In member function ‘virtual bool GPhotoCCD::ISNewSwitch(const char*, const char*, ISState*, char**, int)’:
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_ccd.cpp:389:36: warning: the address of ‘int gphoto_auto_focus(gphoto_driver*)’ will never be NULL [-Waddress]
[ 66%] Building C object CMakeFiles/indi_gphoto_ccd.dir/gphoto_driver.o
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_driver.c: In function ‘gphoto_open’:
/home/pi/Projects/trunk/3rdparty/indi-gphoto/gphoto_driver.c:685:2: warning: passing argument 2 of ‘gp_log_add_func’ from incompatible pointer type [enabled by default]
/usr/include/gphoto2/gphoto2-port-log.h:71:6: note: expected ‘GPLogFunc’ but argument is of type ‘void (*)(enum GPLogLevel, const char *, const char *, void *)’
[100%] Building C object CMakeFiles/indi_gphoto_ccd.dir/gphoto_readimage.o
Linking CXX executable indi_gphoto_ccd
[100%] Built target indi_gphoto_ccd
pi@raspberrypi ~/Projects/build $

I will see if this works for my setup.
I will report here soon

CS Jens
CS Jens
9 years 9 months ago #1334

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

  • Posts: 19
  • Thank you received: 1
Yes this did the trick.

I was just able to control my mount (EQ6), the CCD (Canon 1000d) and the webcam
through Kstars/Ekos over indiserver on Raspberry Pi.

Thank a lot. Now i have to wait for clear skies and ny guidingcam back from repair.

CS Jens
CS Jens
9 years 9 months ago #1336

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

  • Posts: 34
  • Thank you received: 0
Hi,
I've just came across you posting and I'm also having the exact same issue, I feel like i'm going round in circles doing this.
Can you explain what you did to right this issue?
Was the problem with the Indi Lib on the laptop or the Pi?
Thanks
Campbell
9 years 7 months ago #1747

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

Did you follow the instructions in the last few posts? what do you get when you run
ldd /usr/bin/indi_gphoto_ccd
9 years 7 months ago #1748

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

  • Posts: 34
  • Thank you received: 0
Hi Knro,
I've been looking at the previous posts and have entered the line you gave in your last post, when I enter it into thr terminal on my Ubuntu machine I get this:
campbell@campbell-Compaq-CQ58-Notebook-PC:~$ ldd /usr/bin/indi_gphoto_ccd
linux-vdso.so.1 => (0x00007fff459fe000)
libindidriver.so.0 => /usr/lib/x86_64-linux-gnu/libindidriver.so.0 (0x00007f2c90b98000)
libcfitsio.so.3 => /usr/lib/x86_64-linux-gnu/libcfitsio.so.3 (0x00007f2c907e1000)
libgphoto2.so.6 => /usr/lib/x86_64-linux-gnu/libgphoto2.so.6 (0x00007f2c90560000)
libgphoto2_port.so.10 => /usr/lib/x86_64-linux-gnu/libgphoto2_port.so.10 (0x00007f2c90356000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2c90139000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f2c8fee3000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2c8fbdf000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2c8f8db000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2c8f6c4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2c8f2fc000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f2c8f0e6000)
libnova-0.14.so.0 => /usr/lib/x86_64-linux-gnu/libnova-0.14.so.0 (0x00007f2c8eb5e000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2c8e945000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f2c8e73b000)
libexif.so.12 => /usr/lib/x86_64-linux-gnu/libexif.so.12 (0x00007f2c8e4f5000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2c90e1b000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f2c8e2e4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2c8e0df000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2c8ded7000)

And when I enter it into the Pi:
pi@raspberrypi ~ $ ldd /usr/bin/indi_gphoto_ccd
/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0xb6fba000)
libindidriver.so.0 => not found
libcfitsio.so.3 => /usr/lib/arm-linux-gnueabihf/libcfitsio.so.3 (0xb6e10000)
libgphoto2.so.2 => /usr/lib/arm-linux-gnueabihf/libgphoto2.so.2 (0xb6d8f000)
libgphoto2_port.so.0 => /usr/lib/arm-linux-gnueabihf/libgphoto2_port.so.0 (0xb6d7f000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6d60000)
libjpeg.so.8 => /usr/lib/arm-linux-gnueabihf/libjpeg.so.8 (0xb6d25000)
libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6d07000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6c3a000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6bc9000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6ba0000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6a71000)
/lib/ld-linux-armhf.so.3 (0xb6fc8000)
libltdl.so.7 => /usr/lib/arm-linux-gnueabihf/libltdl.so.7 (0xb6a62000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6a57000)
libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0xb6a1b000)
pi@raspberrypi ~ $
When I run the list command I gan see the indi library there and my zwo camera works fine.
I can appreciate that this may be quite tedious but any advice is greatly appreciated.
Thanks
Campbell
9 years 7 months ago #1760

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

There is your problem:
libindidriver.so.0 => not found

So assuming you built and installed the latest libindi in Pi, just go to the gphoto build direcotory:
rm -rf *
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug   /path/to/3rdparty/indi-gphoto
sudo make install
9 years 7 months ago #1761

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

  • Posts: 34
  • Thank you received: 0
This sounds promising but exactly hoe to I get to that directory from command line?
9 years 7 months ago #1762

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

Time to create page: 0.982 seconds