Jump to content


Photo

Cross-Compile Gphoto2 And Libgphoto2 For Gp2X-Wiz


  • Please log in to reply
9 replies to this topic

#1 jpleveillee

jpleveillee

    Member

  • Members
  • PipPip
  • 11 posts

Posted 17 May 2010 - 09:51 PM

Did someone found a way to cross-compile Gphoto2 with libgphoto2 and make it work on the gp2x-wiz?

Thanks
JP

#2 crow_riot

crow_riot

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1133 posts
  • Gender:Male
  • Location:.at
  • Interests:music & programming

Posted 18 May 2010 - 12:55 PM

i'm struggling myself with cross compilation at the moment :( i'm doing little steps to get the hang of it, so if i make any progression i might can help you, but at the moment not.
i've seen there is an ARM port, though, so it should be possible, but maybe there are libraries missing in the toolchain - i mean - the openwiz toolchain, not the one released by GPH. maybe GPH's toolchain contains more? ... i think i need to check that by myself ... :)

#3 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 18 May 2010 - 01:49 PM

First these programs dont really seem ideal on the wiz, since you need the usb/serial. From the research I did looking at the INSTALL file, seems libusb is the dependency thats needed to get an use of this app. I dont recall if that lib is shipped in the firmware, if not then you would have to build it first and hope it works.
I think once libusb and libgphoto2 are done then gphoto2 would be simple.

#4 jpleveillee

jpleveillee

    Member

  • Members
  • PipPip
  • 11 posts

Posted 18 May 2010 - 08:33 PM

I found a simple alternative to gphoto2.
It's called multican : http://multican.sourceforge.net/ , a small program for controlling Canon cameras from USB.
I compiled libusb and multican for arm-linux with open-wiz and put it on the wiz.

But when I run ./multican.gpe , I get this error message :
./multican.gpe: error while loading shared libraries:
libusb-0.1.so.4: cannot open shared object file: No such file or directory

All the libusb libs are in /lib on the wiz and in the application directory.

I tried to make a .gpu script like this with no success:
#!/bin/sh
LD_LIBRARY_PATH=/lib:.:$LD_LIBRARY_PATH
./multican.gpe


any idea ?

Thanks
JP

#5 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 18 May 2010 - 10:58 PM

I found a simple alternative to gphoto2.
It's called multican : http://multican.sourceforge.net/ , a small program for controlling Canon cameras from USB.
I compiled libusb and multican for arm-linux with open-wiz and put it on the wiz.

But when I run ./multican.gpe , I get this error message :
./multican.gpe: error while loading shared libraries:
libusb-0.1.so.4: cannot open shared object file: No such file or directory

All the libusb libs are in /lib on the wiz and in the application directory.

I tried to make a .gpu script like this with no success:
#!/bin/sh
LD_LIBRARY_PATH=/lib:.:$LD_LIBRARY_PATH
./multican.gpe


any idea ?

Thanks
JP


Easiest way is to copy libusb-0.1.so.4 right with your binary

#6 jpleveillee

jpleveillee

    Member

  • Members
  • PipPip
  • 11 posts

Posted 19 May 2010 - 02:43 PM

I tried to copy libusb-0.1.so.4 (a symbolic link to libusb-0.1.so.4.4.4) with all libusb lib in the binary folder but it does not work..
I get the same error message: libusb-0.1.so.4: cannot open shared object file: No such file or directory
Did someone tried to compile application using libusb for the wiz?

Thanks
JP


I found a simple alternative to gphoto2.
It's called multican : http://multican.sourceforge.net/ , a small program for controlling Canon cameras from USB.
I compiled libusb and multican for arm-linux with open-wiz and put it on the wiz.

But when I run ./multican.gpe , I get this error message :
./multican.gpe: error while loading shared libraries:
libusb-0.1.so.4: cannot open shared object file: No such file or directory

All the libusb libs are in /lib on the wiz and in the application directory.

I tried to make a .gpu script like this with no success:
#!/bin/sh
LD_LIBRARY_PATH=/lib:.:$LD_LIBRARY_PATH
./multican.gpe


any idea ?

Thanks
JP


Easiest way is to copy libusb-0.1.so.4 right with your binary



#7 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 19 May 2010 - 03:07 PM

I tried to copy libusb-0.1.so.4 (a symbolic link to libusb-0.1.so.4.4.4) with all libusb lib in the binary folder but it does not work..
I get the same error message: libusb-0.1.so.4: cannot open shared object file: No such file or directory
Did someone tried to compile application using libusb for the wiz?

Thanks
JP



I found a simple alternative to gphoto2.
It's called multican : http://multican.sourceforge.net/ , a small program for controlling Canon cameras from USB.
I compiled libusb and multican for arm-linux with open-wiz and put it on the wiz.

But when I run ./multican.gpe , I get this error message :
./multican.gpe: error while loading shared libraries:
libusb-0.1.so.4: cannot open shared object file: No such file or directory

All the libusb libs are in /lib on the wiz and in the application directory.

I tried to make a .gpu script like this with no success:
#!/bin/sh
LD_LIBRARY_PATH=/lib:.:$LD_LIBRARY_PATH
./multican.gpe


any idea ?

Thanks
JP


Easiest way is to copy libusb-0.1.so.4 right with your binary


Sorry, you took it too literal, you need the binary lib.
So copy libusb-0.1.so.4.4.4 and rename it to libusb-0.1.so.4

#8 jpleveillee

jpleveillee

    Member

  • Members
  • PipPip
  • 11 posts

Posted 19 May 2010 - 04:46 PM

I tried that too but does not work.. get the same error no such file or directory .. I dont understand why
Maybe my libusb is not compiled correctly.
I will try another version of the lib.

Thanks for the help :)
JP


I tried to copy libusb-0.1.so.4 (a symbolic link to libusb-0.1.so.4.4.4) with all libusb lib in the binary folder but it does not work..
I get the same error message: libusb-0.1.so.4: cannot open shared object file: No such file or directory
Did someone tried to compile application using libusb for the wiz?

Thanks
JP



I found a simple alternative to gphoto2.
It's called multican : http://multican.sourceforge.net/ , a small program for controlling Canon cameras from USB.
I compiled libusb and multican for arm-linux with open-wiz and put it on the wiz.

But when I run ./multican.gpe , I get this error message :
./multican.gpe: error while loading shared libraries:
libusb-0.1.so.4: cannot open shared object file: No such file or directory

All the libusb libs are in /lib on the wiz and in the application directory.

I tried to make a .gpu script like this with no success:
#!/bin/sh
LD_LIBRARY_PATH=/lib:.:$LD_LIBRARY_PATH
./multican.gpe


any idea ?

Thanks
JP


Easiest way is to copy libusb-0.1.so.4 right with your binary


Sorry, you took it too literal, you need the binary lib.
So copy libusb-0.1.so.4.4.4 and rename it to libusb-0.1.so.4



#9 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 19 May 2010 - 04:54 PM

Try without setting LD_LIBRARY_PATH in your startup script

#10 jpleveillee

jpleveillee

    Member

  • Members
  • PipPip
  • 11 posts

Posted 19 May 2010 - 05:28 PM

I replaced the libusb with another version precompiled for arm and the app start with no error :)
I see that my canon camera is detected by the Wiz in dmesg .. but my camera is not recognized by multican..
but it's a good start :)

JP

Try without setting LD_LIBRARY_PATH in your startup script