OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Help Needed Compiling Gphoto2
desertrat
post Jan 15 2006, 11:01 AM
Post #1





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



I've compiled gphoto2 (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:
CODE
./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:
CODE
# 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 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
Go to the top of the page
 
+Quote Post
pgas
post Jan 15 2006, 01:06 PM
Post #2





Group: Members
Posts: 1,099
Joined: 17-December 03
From: Athens, Greece
Member No.: 1,210



did you try
QUOTE
make DESTDIR=/my/path/ipkg install


?
Go to the top of the page
 
+Quote Post
desertrat
post Jan 16 2006, 04:21 AM
Post #3





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(pgas @ Jan 15 2006, 09:06 PM)
did you try
QUOTE
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
Go to the top of the page
 
+Quote Post
anunakin
post Jan 16 2006, 07:35 AM
Post #4





Group: Members
Posts: 340
Joined: 22-August 04
From: Belem, Brasil
Member No.: 4,358



Can u try

$ make install > install.log

And move all fite to ipkg_temp .... not good but works blink.gif
Go to the top of the page
 
+Quote Post
desertrat
post Jan 16 2006, 12:16 PM
Post #5





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(anunakin @ Jan 16 2006, 03:35 PM)
Can u try

$ make install > install.log


I use
CODE
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
Go to the top of the page
 
+Quote Post
desertrat
post Jan 16 2006, 12:26 PM
Post #6





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



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:
CODE
gphoto2 --auto-detect
gphoto2 -L
etc

I get a segfault mad.gif

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
Go to the top of the page
 
+Quote Post
desertrat
post Jan 17 2006, 12:52 AM
Post #7





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



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:
CODE
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
Attached File(s)
Attached File  libexif_0.6.13_armv5tel.ipk ( 56.56K ) Number of downloads: 87
Attached File  libexif_devel_0.6.13_armv5tel.ipk ( 71.3K ) Number of downloads: 50
Attached File  libusb_0.1.10a_armv5tel.ipk ( 27.89K ) Number of downloads: 57
Attached File  libusb_devel_0.1.10a_armv5tel.ipk ( 36.7K ) Number of downloads: 42
Attached File  libgphoto2_2.1.99_armv5tel.ipk ( 542.94K ) Number of downloads: 65
Attached File  libgphoto2_devel_2.1.99_armv5tel.ipk ( 591.39K ) Number of downloads: 44
Attached File  gphoto2_2.1.99_armv5tel.ipk ( 40.92K ) Number of downloads: 51
 
Go to the top of the page
 
+Quote Post
desertrat
post Jan 17 2006, 02:40 AM
Post #8





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(desertrat @ Jan 16 2006, 08:26 PM)
I get a segfault  mad.gif


I managed to compile strace and used in on gphoto2. Here are the interesting parts just before the segfault:
CODE
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
Go to the top of the page
 
+Quote Post
Chero
post Mar 20 2006, 11:08 PM
Post #9





Group: Members
Posts: 1,141
Joined: 22-April 04
From: Belgium
Member No.: 2,962



Hi,

Any news on gphoto ?

I'm compiling "gthumb" 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.
Go to the top of the page
 
+Quote Post
merli
post Mar 21 2006, 01:40 AM
Post #10





Group: Members
Posts: 227
Joined: 27-April 05
Member No.: 7,008



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 :-)
Attached File(s)
Attached File  libusb_0.1.12_armv5tel.ipk ( 18.38K ) Number of downloads: 80
Attached File  libusb_devel_0.1.12_armv5tel.ipk ( 20.75K ) Number of downloads: 64
Attached File  libexif_0.6.13_armv5tel.ipk ( 49.11K ) Number of downloads: 138
Attached File  libexif_devel_0.6.13_armv5tel.ipk ( 104.44K ) Number of downloads: 70
Attached File  gphoto2_2.1.99_armv5tel.ipk ( 32.78K ) Number of downloads: 84
Attached File  gphoto2_doc_2.1.99_armv5tel.ipk ( 130.13K ) Number of downloads: 55
Attached File  libgphoto2_devel_2.1.99_armv5tel.ipk ( 841.21K ) Number of downloads: 64
Attached File  libgphoto2_2.1.99_armv5tel.ipk ( 551.66K ) Number of downloads: 83
Attached File  libreadline5_5.0_armv5tel.ipk ( 83.98K ) Number of downloads: 87
Attached File  libreadline5_devel_5.0_armv5tel.ipk ( 65.06K ) Number of downloads: 52
 
Go to the top of the page
 
+Quote Post
Chero
post Mar 21 2006, 06:50 AM
Post #11





Group: Members
Posts: 1,141
Joined: 22-April 04
From: Belgium
Member No.: 2,962



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.
Go to the top of the page
 
+Quote Post
desertrat
post Mar 21 2006, 11:59 AM
Post #12





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(merli @ Mar 21 2006, 09:40 AM)
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.

QUOTE
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 smile.gif I would appreciate it if you could post some info on how to your packages to work blink.gif


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 blink.gif ! 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
Go to the top of the page
 
+Quote Post
merli
post Mar 23 2006, 01:33 AM
Post #13





Group: Members
Posts: 227
Joined: 27-April 05
Member No.: 7,008



QUOTE(desertrat @ Mar 21 2006, 09:59 PM)
QUOTE(merli @ Mar 21 2006, 09:40 AM)
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.

QUOTE
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 smile.gif I would appreciate it if you could post some info on how to your packages to work blink.gif


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 blink.gif ! 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
*



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.
Go to the top of the page
 
+Quote Post
Chero
post Mar 23 2006, 02:12 AM
Post #14





Group: Members
Posts: 1,141
Joined: 22-April 04
From: Belgium
Member No.: 2,962



QUOTE(merli @ Mar 21 2006, 10:40 AM)
I read post that some gui is now compiled :-)
*


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.
Go to the top of the page
 
+Quote Post
desertrat
post Mar 23 2006, 03:34 AM
Post #15





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(merli @ Mar 23 2006, 09:33 AM)
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
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th October 2014 - 03:57 AM