Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95384 - libpcre is generated with invalid libpcre.la files
Summary: libpcre is generated with invalid libpcre.la files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: PPC64 OS X
: High normal (vote)
Assignee: Gentoo for Mac OS X
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-07 13:57 UTC by Fabian Groffen
Modified: 2006-04-12 10:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2005-06-07 13:57:12 UTC
the /usr/lib/libpcre.la and /usr/lib/libpcreposix.la files generated after
emerge libpcre on OSX Tiger are invalid and cause problems with libtool when
compiling against them.

the properties 'dlname' and 'library_names' in the libprce.la file list the
names of the libraries without the .dylib suffix which (apparently) is needed on
OSX to make it work correctly.  The .la files for packages already available on
the system also list the libraries with '.dylib' suffix.

Reproducible: Always
Steps to Reproduce:
1. emerge libpcre (on OSX Panther or Tiger)
2. compile a program that links against libpcre (-lpcre) it fails
3. diff /usr/lib/libpcre.la /usr/lib/libxslt.la and notice there are no '.dylib'
suffices for the library files in the libpcre.la file

Actual Results:  
compilation failed because it could not find the file /usr/lib/libpcre, which is
correct because it doesn't exist.

Expected Results:  
the .la files generated by the ebuild (Portage?) should somehow include the
.dylib suffix so libtool correctly starts looking for /usr/lib/libpcre.dylib
which *does* exist after emerge libpcre.
Comment 1 Fabian Groffen gentoo-dev 2005-06-09 12:44:51 UTC
ok.

now this might/might not help.  I can't really find what the elibtool action
does, but perhaps it's just a matter of using glibtool and glibtoolize instead
of libtool on OSX.  Alternative is to patch libtool's output, but I think this
problem will be for any package that uses glibtool on Darwin/OSX.
Comment 2 Lina Pezzella (RETIRED) gentoo-dev 2005-06-09 18:50:12 UTC
Mmm - definitely don't want to patch libtool's output. That's too hackish even for me.
elibtoolize can be found in /usr/portage/eclass/libtool.eclass, or for the lazy, man libtool.eclass.
On ppc-macos, it calls glibtoolize with --copy and --force, as well as darwintoolize, also defined
in libtool.eclass.
Comment 3 Fabian Groffen gentoo-dev 2005-06-09 23:49:32 UTC
ah, that explains why I couldn't find the eclass... locate doesn't search NFS
mounts (luckily!).

I'm not familiar enough with the many patches and fixes applied there to see
what's wrong.

However:
I just commented out elibtoolize in the libpcre-5.0 ebuild to see what it would
do by default... and guess?  It generated a nice /usr/lib/libpcre.la file with
the necessary .dylib suffix.
Comment 4 Lina Pezzella (RETIRED) gentoo-dev 2005-06-10 08:15:38 UTC
Calling darwintoolize instead of elibtoolize seems to fix the problem. I'm not willing to commit on it yet
because this may be part of a larger problem with elibtoolize that affects multiple packages. I'd like to
know exactly what it is in elibtoolize that's causing the problem and more importantly why.
Comment 5 Fabian Groffen gentoo-dev 2005-06-10 08:21:13 UTC
In another package, I saw darwintoolize being called directly too.  I think it
was the libmng one, or jpeg...  So it seems to be done elsewhere.  (if it makes
sense to you)
Comment 6 Lina Pezzella (RETIRED) gentoo-dev 2005-06-10 13:39:06 UTC
After talking with kito, I'm going to remove elibtoolize entirely. It doesn't seem to be necessary for ppc-
macos.