OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: desertrat on January 15, 2006, 02:01:47 pm
-
I've compiled gphoto2 (http://www.gphoto.org/) (and its associated dependencies - libexif, libgphoto2, libusb), but it doesn't quite work. What happened is that when I compiled them, to prevent make install from putting files directly into my system, I used something like:
./configure --prefix=/mnt/hd/ipkg-tmp/usr/local
Unfortunately this had the effect of hardcoding that path into some of the libraries with the result that after installation the libraries are looking in the wrong place for the list of supported cameras and hence finding none: # grep ipkg ./*
Binary file ./libexif.a matches
./libexif.la:libdir='/mnt/hd/ipkg-libexif/usr/lib'
Binary file ./libexif.so matches
Binary file ./libexif.so.12 matches
Binary file ./libexif.so.12.0.1 matches
Binary file ./libgphoto2.a matches
./libgphoto2.la:dependency_libs=' /mnt/hd/ipkg-tmp/usr/local/lib/libgphoto2_port.la -ldl -lm'
./libgphoto2.la:libdir='/mnt/hd/ipkg-tmp/usr/local/lib'
Binary file ./libgphoto2.so matches
Binary file ./libgphoto2.so.2 matches
Binary file ./libgphoto2.so.2.0.3 matches
Binary file ./libgphoto2_port.a matches
./libgphoto2_port.la:libdir='/mnt/hd/ipkg-tmp/usr/local/lib'
Binary file ./libgphoto2_port.so matches
Binary file ./libgphoto2_port.so.0 matches
Binary file ./libgphoto2_port.so.0.5.2 matches
The making an ipk howto (http://mail.pdaxrom.org/contrib/docs/making_ipkg_howto.html) suggests one workaround, ie use "--prefix=/usr/local" then "mount a partition over /usr/local". I was wondering whether there are any other ways to overcome this problem?
-- cheers
-
did you try
make DESTDIR=/my/path/ipkg install
?
-
did you try
make DESTDIR=/my/path/ipkg install
?
Well kind of. But as you point out it the howto not all "Makefile"s support it. I was looking for a generic solution that can be used in all cases.
I notice that "./configure" sometimes allows "--disable-rpath" which means "do not hardcode runtime library paths". Does this do what I want -- ie to be able to use an arbitary --prefix (so that make install doesn't put anything into my system).
-- cheers
-
Can u try
$ make install > install.log
And move all fite to ipkg_temp .... not good but works
-
Can u try
$ make install > install.log
I use make install 2>&1 > installation.log
as suggested by the howto. But the problem is, is there an automated way to parse that logfile to extract the directories/files that were created/copied?
-- cheers
-
I've recompiled everything to use "--prefix=/usr/local" and things are working slightly better. Eg. "gphoto2 --list-cameras" works. Unfortunately when I use any of these:
gphoto2 --auto-detect
gphoto2 -L
etc
I get a segfault
Searching this forum I find a few mentions of strace but I can't find it in the official feeds. Any idea where I can get it? Or how I might go about finding out what is going wrong with gphoto2?
-- cheers
-
In case anyone wants to play with it to see whether they get any better results here are all the required packages (you need to install all the non *-devel packages).
NB the libgphoto2 needs to overwrite the file /etc/hotplug/usb.usermap. It will make a backup before doing so (although on a fresh install of pdaXrom there is nothing of note in that file), and will restore it when you uninstall.
Also I've had too much trouble trying to not use "/usr/local", so these all install into "/usr/local" where applicable.
Examples of usage:
gphoto2 --help
gphoto2 --list-cameras
gphoto2 --auto-detect
gphoto2 -L
add the "--debug" option for a running commentary on what gphoto2 is doing. On my setup, as soon as gphoto2 has identified my camera it segfaults.
-- cheers
-
I get a segfault
I managed to compile strace and used in on gphoto2. Here are the interesting parts just before the segfault:
open("/proc/bus/usb/001/001", O_RDWR) = -1 EACCES (Permission denied)
open("/proc/bus/usb/001/001", O_RDONLY) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfffb408) = -1 EPERM (Operation not permitted)
read(4, "\22\1\20\1\t\0\0\10\0\0\0\0\0\0\0\2\1\1\t\2", 20) = 20
read(4, "\31\0\1\1\0@\0\t", 8) = 8
read(4, "\4\0\0\1\t\0\0\0\7\5\201\3\2\0\377", 249) = 15
close(4) = 0
open("/proc/bus/usb/001/003", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfffb408) = 0
read(4, "\22\1\20\1\377\377\377 \251\4X0\1\0\1\2\0\1\t\2", 20) = 20
read(4, "\'\0\1\1\0\3002\t", 8) = 8
read(4, "\4\0\0\3\377\377\377\0\7\5\201\2@\0\0\7\5\2\2@\0\0\7\5"..., 249) = 29
close(4) = 0
getdents64(3, /* 0 entries */, 4096) = 0
close(3) = 0
open("/proc/bus/usb/001/001", O_RDWR) = -1 EACCES (Permission denied)
open("/proc/bus/usb/001/001", O_RDONLY) = 3
ioctl(3, USBDEVFS_IOCTL, 0xbfffd014) = -1 EPERM (Operation not permitted)
close(3) = 0
open("/proc/bus/usb/001/003", O_RDWR) = 3
ioctl(3, USBDEVFS_IOCTL, 0xbfffd014) = -1 ENOSYS (Function not implemented)
close(3) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Can any experts tell me what is going wrong?
-- cheers
-
Hi,
Any news on gphoto ?
I'm compiling "gthumb" http://gthumb.sourceforge.net/screenshots.html (http://gthumb.sourceforge.net/screenshots.html) and I've got it working with jpeg-support, tiff-support, exif-support.
Gphoto2-support can also be included. I don't really need it myself, but it could be nice if we get it working to complete the app.
Have fun,
Chero.
-
Hello
I compiled gphoto2 and it seems to work for me with Canon S2 IS.
# ./gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Canon PowerShot S2 IS (PTP mode) usb:
# ./gphoto2 -L
There are no files in folder '/'.
There are no files in folder '/store_00010001'.
There are no files in folder '/store_00010001/DCIM'.
There are 11 files in folder '/store_00010001/DCIM/100CANON':
#1 IMG_0046.JPG 1268 KB 2592x1944 image/jpeg
#2 IMG_0047.JPG 1323 KB 2592x1944 image/jpeg
#3 IMG_0048.JPG 1359 KB 2592x1944 image/jpeg
#4 IMG_0049.JPG 1243 KB 2592x1944 image/jpeg
#5 IMG_0050.JPG 564 KB 2592x1944 image/jpeg
#6 IMG_0051.JPG 1128 KB 2592x1944 image/jpeg
#7 IMG_0052.JPG 1068 KB 2592x1944 image/jpeg
#8 IMG_0053.JPG 1291 KB 2592x1944 image/jpeg
#9 IMG_0054.JPG 1340 KB 2592x1944 image/jpeg
#10 IMG_0055.JPG 1086 KB 2592x1944 image/jpeg
#11 IMG_0056.JPG 1117 KB 2592x1944 image/jpeg
There are no files in folder '/store_00010001/MISC'.
There are no files in folder '/store_80000001'.
Enjoy them and give me feedback.
UPDATE:
I recompiled libgphoto2 libraries ... I had error with hardcoded paths to libs. When I tried camera I had libraries installed in /usr and also where --prefix were used /home/root/libgphoto2. When I deleted /home/root/libgphoto2 directory, gphoto2 stopped working. I recompiled libgphoto2 with --prefix=/usr.
Now it is working from scratch with my camera.
I just plugged my Canon S2 IS and run: "gphoto2 -L" and I got actual list of files from camera. This camera working without active usb hub.no hotplug files installed
I also added new libreadline
Please try now
I read post that some gui is now compiled :-)
-
I'll try to add gphoto support to gthumb, then it should be possible to browse the pictures on the camera using gthumb.
I'll be on the train for an hour or two this evening, so plenty of time to compile. Testing will be for tomorrow evening.
Chero.
-
I compiled gphoto2 and it seems to work for me with Canon S2 IS.
That's good, at least I know gphoto2 does work on the Z.
Enjoy them and give me feedback.
I notice that you've compiled it against a newer readline - it wants libreadline.so.5 and I've only got libreadline.so.4. As a quick and dirty fix I created a symlink. I also note that there is no usb.usermap so I ran /usr/lib/libgphoto2/print-usb-usermap, but that gave no output at all.
I'll play with it a bit more tomorrow.
Update
On further examination, I see that there is no provision for hotplug to recognise when a supported camera is plugged in. In my libgphoto2 package I have:
/etc/hotplug/usb.usermap which allows hotplug to recognise camera
and
/etc/hotplug/usb/usbcam which sets up correct permissions for camera
Both these files seems to be missing from your packages I would appreciate it if you could post some info on how to your packages to work
Update
I copied the above 2 missing files from my own package, now hotplug detects camera and does the right thing. However now gphoto2 is looking for the libgphoto2 stuff in /home/root ! I created some suitable symlinks and now gphoto2 works - thanks Merli.
Is it possible for you to repackage your stuff (it probably only involves libgphoto2) so that:
1) it includes the hotplug stuff
2) looks for the libgphoto2 stuff in the right place
If you don't have the time or inclination could you please tell me:
1) what ./configure options you used on all the packages
2) and any other particular tweaks/patches/fixes etc you had to use
Also any reason why you used readline 5.X? Even 1.10beta2 still use readline 4.3 (same as 1.10beta1).
-- cheers
-
I compiled gphoto2 and it seems to work for me with Canon S2 IS.
That's good, at least I know gphoto2 does work on the Z.
Enjoy them and give me feedback.
I notice that you've compiled it against a newer readline - it wants libreadline.so.5 and I've only got libreadline.so.4. As a quick and dirty fix I created a symlink. I also note that there is no usb.usermap so I ran /usr/lib/libgphoto2/print-usb-usermap, but that gave no output at all.
I'll play with it a bit more tomorrow.
Update
On further examination, I see that there is no provision for hotplug to recognise when a supported camera is plugged in. In my libgphoto2 package I have:
/etc/hotplug/usb.usermap which allows hotplug to recognise camera
and
/etc/hotplug/usb/usbcam which sets up correct permissions for camera
Both these files seems to be missing from your packages I would appreciate it if you could post some info on how to your packages to work
Update
I copied the above 2 missing files from my own package, now hotplug detects camera and does the right thing. However now gphoto2 is looking for the libgphoto2 stuff in /home/root ! I created some suitable symlinks and now gphoto2 works - thanks Merli.
Is it possible for you to repackage your stuff (it probably only involves libgphoto2) so that:
1) it includes the hotplug stuff
2) looks for the libgphoto2 stuff in the right place
If you don't have the time or inclination could you please tell me:
1) what ./configure options you used on all the packages
2) and any other particular tweaks/patches/fixes etc you had to use
Also any reason why you used readline 5.X? Even 1.10beta2 still use readline 4.3 (same as 1.10beta1).
-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119666\"][{POST_SNAPBACK}][/a][/div]
Updated post ... please read.
I compiled libreadline in some other project, and from that time I have it on Z :-) and compile with it. Anyway my cam seems working without hotplug files. If you post them I will repackage libreadline2 ipk.
-
I read post that some gui is now compiled :-)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119539\"][{POST_SNAPBACK}][/a][/div]
Not exactly, but i think this newly compiled lib can help to bring gphoto2 support to gthumb. Thanks. I'll try to add it this evening.
Chero.
-
Updated post ... please read.
I compiled libreadline in some other project, and from that time I have it on Z :-) and compile with it. Anyway my cam seems working without hotplug files. If you post them I will repackage libreadline2 ipk.
OK, I removed my hotplug stuff and installed your updated libgphoto2 and gphoto2 still works nicely.
It begs the question WTF are the hotplug files for?
-- cheers
-
Updated post ... please read.
I compiled libreadline in some other project, and from that time I have it on Z :-) and compile with it. Anyway my cam seems working without hotplug files. If you post them I will repackage libreadline2 ipk.
OK, I removed my hotplug stuff and installed your updated libgphoto2 and gphoto2 still works nicely.
It begs the question WTF are the hotplug files for?
-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119923\"][{POST_SNAPBACK}][/a][/div]
I'm glad it works ... I will upload packages to contrib :-)
-
Thank you both so much for gphoto and gthumb...
zaurus -> usb -> canon powershot g5
it just works, gthumb can see the camera and download the piccies...
what more could I ask
(crappy piccy from phone camera added just to prove the point
[ You are not allowed to view attachments ]
-
Thanks Chero, gthumbs and gphoto2 works fine together - I'm able to download photos from my camera.
BUT the odd thing is that once gthumbs has downloaded the photos (it auto creates a directory with a name based on the current date/time), it doesn't "see" the photos in the newly created directory. The files are there and are viewable in eg xzgv. In fact it doesn't recognise any image files in any of my directories.
Any ideas?
-
Thanks Chero, gthumbs and gphoto2 works fine together - I'm able to download photos from my camera.
BUT the odd thing is that once gthumbs has downloaded the photos (it auto creates a directory with a name based on the current date/time), it doesn't "see" the photos in the newly created directory. The files are there and are viewable in eg xzgv. In fact it doesn't recognise any image files in any of my directories.
Any ideas?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120497\"][{POST_SNAPBACK}][/a][/div]
I don't have a clue.
I installed to / cause I had a broken lib when running from /mnt/ide, maybe that's why ?
-
New versions of gphoto2 and libgphoto2 are out. I am new to cross compiling and have no luck. I can't seem to explain to ./configure where to find usb.h:
checking for LIBUSB... yes
checking usb.h usability... no
checking usb.h presence... no
checking for usb.h... no
configure: error:
PKG_CONFIG_PATH=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib/pkgconfig
LIBUSB_LIBS=-lusb
LIBUSB_CFLAGS=
* Fatal: libgphoto2_port by default requires libusb >= 0.1.5 to build.
File usb.h can be found at
/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include/linux/usb.h
and I've tried using ./configure with both
--x-includes=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include
--x-includes=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include/linux
to no avail. How do I make ./configure recognize it?
-
New versions of gphoto2 and libgphoto2 are out. I am new to cross compiling and have no luck. I can't seem to explain to ./configure where to find usb.h:
checking for LIBUSB... yes
checking usb.h usability... no
checking usb.h presence... no
checking for usb.h... no
configure: error:
PKG_CONFIG_PATH=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib/pkgconfig
LIBUSB_LIBS=-lusb
LIBUSB_CFLAGS=
* Fatal: libgphoto2_port by default requires libusb >= 0.1.5 to build.
File usb.h can be found at
/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include/linux/usb.h
and I've tried using ./configure with both
--x-includes=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include
--x-includes=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include/linux
to no avail. How do I make ./configure recognize it?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=132136\"][{POST_SNAPBACK}][/a][/div]
you need to compile and install libusb
the usb.h you found is the usb header for the usb kernel. you need the usb.h for the user mode usb library.
-
Thanks a lot for clarifying. Now I added libusb (new v.0.1.12) and libexif to my cross compiling environment using:
CC=gcc CXX=g++ F77=g77 ./configure --host=armv5tel-cacko-linux --build=i686-linux prefix=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux
This didn't work with libgphoto2. ./configure completes, but then running make I get:gcc -g -O2 -Wall -g -o .libs/test-gp-port test_gp_port-test-gp-port.o ../libgphoto2_port/.libs/libgphoto2_port.so ../libltdl/.libs/libltdlc.a -ldl -Wl,--rpath -Wl,/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib
../libltdl/.libs/libltdlc.a: could not read symbols: Archive has no index; run ranlib to add one
Running ranlib (native or arm version) on libltdlc.a doesn't help.
Creating the libgphoto2 arm binaries by removing flags CC/CXX/F77/prefix fails already at ./configure:checking for LIBUSB... yes
checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes
checking for function usb_busses in libusb... no
configure: error:
PKG_CONFIG_PATH=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib/pkgconfig
LIBUSB_LIBS=-L/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib -lusb
LIBUSB_CFLAGS=-I/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include
* Fatal: libgphoto2_port by default requires libusb >= 0.1.5 to build.
What am I doing wrong?
-
I compiled gphoto2 and it seems to work for me with Canon S2 IS.
That's good, at least I know gphoto2 does work on the Z.
Enjoy them and give me feedback.
I notice that you've compiled it against a newer readline - it wants libreadline.so.5 and I've only got libreadline.so.4. As a quick and dirty fix I created a symlink. I also note that there is no usb.usermap so I ran /usr/lib/libgphoto2/print-usb-usermap, but that gave no output at all.
I'll play with it a bit more tomorrow.
Update
On further examination, I see that there is no provision for hotplug to recognise when a supported camera is plugged in. In my libgphoto2 package I have:
/etc/hotplug/usb.usermap which allows hotplug to recognise camera
and
/etc/hotplug/usb/usbcam which sets up correct permissions for camera
Both these files seems to be missing from your packages I would appreciate it if you could post some info on how to your packages to work
Update
I copied the above 2 missing files from my own package, now hotplug detects camera and does the right thing. However now gphoto2 is looking for the libgphoto2 stuff in /home/root ! I created some suitable symlinks and now gphoto2 works - thanks Merli.
Is it possible for you to repackage your stuff (it probably only involves libgphoto2) so that:
1) it includes the hotplug stuff
2) looks for the libgphoto2 stuff in the right place
If you don't have the time or inclination could you please tell me:
1) what ./configure options you used on all the packages
2) and any other particular tweaks/patches/fixes etc you had to use
Also any reason why you used readline 5.X? Even 1.10beta2 still use readline 4.3 (same as 1.10beta1).
-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119666\"][{POST_SNAPBACK}][/a][/div]
Would you be able to tell me where I can get libreadline.so.4? Thanks.
cycle_55