bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/35684] 0.97.1 attempts to link against /usr/lib/libmagic.


From: cfriedt at visible-assets dot com
Subject: [Bug classpath/35684] 0.97.1 attempts to link against /usr/lib/libmagic.so even when cross-compiling
Date: 25 Mar 2008 00:35:52 -0000


------- Comment #1 from cfriedt at visible-assets dot com  2008-03-25 00:35 
-------
Ah, I found out what the problem was. It's quite similar to what's described as
'a libtool minefield' on the site below:

http://www.metastatic.org/text/libtool.html

The magic_open test in the configure script certainly passes the test of
linking to libmagic, but when it reads the .la file actually in my sysroot,
which is /usr/arm-unknown-linux-gnu, the linker script tells it that it should
look in /usr/lib for itself. This is actually true from the perspective of the
libmagic library. As far as it knows, it exists in /usr/lib.

I believe that this problem has existed for quite some time in various open
source projects and it should be considered as a libtool defect. Libtool should
test for cross-compilation and adjust the path returned from .la files by
prefixing the appropriate sysroot location.

It would be great if someone could fix this bug in the classpath sources, but
it's really a problem that is more deeply rooted in libtool.

I fixed the build by editing /usr/arm-unknown-linux-gnu/usr/lib/libmagic.la,
and replacing 

libdir='/usr/lib'

with 

libdir='/usr/arm-unknown-linux-gnu/usr/lib'

Of course, directly after the build was finished, I changed .la file back to
its original state. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35684





reply via email to

[Prev in Thread] Current Thread [Next in Thread]