[sane-devel] Compiling sane-backends on FC8 64bit

Mattias Ellert mattias.ellert at tsl.uu.se
Wed Jan 16 12:36:38 UTC 2008

ons 2008-01-16 klockan 10:41 +0000 skrev Chris:
> Mattias Ellert wrote:
> > ons 2008-01-16 klockan 09:22 +0000 skrev Chris:
> >  
> >> Thank you Mattias - we're getting somewhere now. Still got problems 
> >> though:
> >>
> >> I installed libieee1284-devel x86_64 and then noticed that config.log 
> >> was showing it couldn't find "libusb.so" so I have symlinked 
> >> /usr/lib64/libusb.so -> /usr/lib64/libusb-0.1.so.4.4.4 and that error 
> >> is now gone. I trust this was the correct thing to do?
> >>     
> >
> > That link should be there if you have libusb-devel x86_64 installed. It
> > is normally not a good idea to add symlinks by hand in the system
> > directories - installing the right RPM is a better idea.
> >
> >   
> You are quite right, that link should be there. I didn't have 
> libusb-devel x86_64 installed, and trying to install it causes a 
> conflict with the installed libusb-devel i386. This conflict is only 
> resolved by "yum remove libusb-devel"  and then "yum install 
> libusb-devel". (For information, the same thing happens when trying to 
> install libieee1284-devel x86_64 when libieee1284-devel i386 is already 
> installed, and the solution is the same: remove then reinstall.)

If the RPMS are built correctly you should be able to install both the
i386 and x86_64 devel packages at the same time as long as they are
EXACTLY THE SAME VERSION. The two RPMS contain overlapping files, but as
long as all common files are the exactly the same that should be
allowed. This of course means that installed header files should not
contain lines that are changed by the configure script in different ways
for 32 and 64 bit builds - or the headers that differs must be moved to
somewhere in /usr/lib{,64}. I know that libusb as checked out form the
CVS does not follow this rule (at least it used not to), so if the
person that created the RPMS for Fedora 8 did not fix this the packages
violate Fedora's packaging guidelines. If this is true for
libieee1284-devel as well I don't know.

Of course if you are trying to install a newer version of the x86_64
devel package on top of an older version of the i386 devel package you
must update the i386 installation first so that you have the same
version of both.

> >> It now fails later on:
> >>
> >> /usr/lib/libieee1284.so: could not read symbols: File in wrong format
> >> collect2: ld returned 1 exit status
> >> make[1]: *** [libsane-hp3900.la] Error 1
> >> make[1]: Leaving directory 
> >> `/home/cnolan/Download/sane-backends-1.0.18/backend'
> >> make: *** [all-recursive] Error 1
> >>
> >> I've seen an error like this before, and I am *guessing* that it is 
> >> now looking in /usr/lib/ when it should be using files from 
> >> /usr/lib64/ - does this sound correct?
> >>     
> >
> > Please include the full command that failed and not only the error
> > message. If there is a -L/usr/lib somewhere, then it shouldn't be there.
> >
> > What is your LD_LIBRARY_PATH?
> >   
> Sorry, the full command was as follows:
> gcc -shared  .libs/hp3900.o .libs/hp3900-s.o .libs/sane_strstatus.o 
> ../sanei/.libs/sanei_init_debug.o ../sanei/.libs/sanei_config.o 
> ../sanei/.libs/sanei_usb.o  -lpthread -lm -ljpeg -ltiff 
> /usr/lib/libieee1284.so -ldl  -Wl,-soname -Wl,libsane.so.1 -o 
> .libs/libsane-hp3900.so.1.0.18
> As you can see, it is picking up /usr/lib/libieee1284.so instead of 
> /usr/lib64/libieee1284.so

It should be -lieee1284 - and then the right one should be picked up
automatically. You have the location of the 32 bit library hardcoded.
Did you change the configure script? Line 7470 says:

   sane_cv_use_libieee1284="yes"; LIBS="${LIBS} -lieee1284"

So an unmodified configure should use the correct -lieee1284, not the
hardcoded /usr/lib/libieee1284.so location.

> echo $LD_LIBRARY_PATH returns blank (?)

Blank is fine and correct. I just asked to make sure that you hadn't
added /usr/lib to it...

> I am going to retry the compile process now that I have the correct 
> libusb-devel installed and see how we go.
> (Mattias, my apologies for the resend, my original reply should have 
> gone to the list and not just you)
> Best
> Chris


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 1230 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080116/a287cb18/attachment.bin 

More information about the sane-devel mailing list