Subject: Re: Ruby-iconv fails to find pkg db4
To: None <pkgsrc-users@netbsd.org>
From: Loren M. Lang <lorenl@alzatex.com>
List: pkgsrc-users
Date: 09/25/2006 17:40:15
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig435EC55D5D6FB85544900C69
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Loren M. Lang wrote:
> Loren M. Lang wrote:
>> Now I am installing ruby18-iconv onto my linux box using pkgsrc.
>> ruby18-base is already installed and working properly, but when
>> ruby18-iconv tries to install, the configure stage fails to find iconv=

>> in the standard C library:
>>
>> =3D=3D=3D>  Running extconf.rb to configure
>> checking for iconv()... no
>> checking for iconv() in -liconv... no
>> *** extconf.rb failed ***
>>
>> Examining mkmf.log reveals that it is reallyt failing to find the db4
>> library when it links the test program.  I installed db4 from pkgsrc
>> earlier and several other programs that depend on it with success.  Th=
e
>> log file shows:
>>
>> "gcc -o conftest -I. -I/usr/pkg/lib/ruby/1.8/i386-linux
>> -I/usr/pkg/include/db4 -I/usr/pkg/include -O2 -I/usr/pkg/include/db4
>> -I/usr/pkg/include  -fPIC conftest.c  -L'/usr/pkg/lib'
>> -Wl,-R'/usr/pkg/lib' -L'/usr/pkg/lib' -Wl,-R'/usr/pkg/lib'
>> -lruby18-static  -ldl -lcrypt -lm -ldb4  -lc"
>> /usr/bin/ld: cannot find -ldb4
>> collect2: ld returned 1 exit status
>> checked program was:
>> /* begin */
>>
>> #include <iconv.h>
>>
>> /*top*/
>> int main() { return 0; }
>> int t() { void ((*volatile p)()); p =3D (void ((*)()))iconv; return 0;=
 }
>> /* end */
>>
>> It fails to find db4, but -L'/usr/pkg/lib' was provided as an argument=

>> to gcc and libdb4.so exists under /usr/pkg/lib.  I did run a bmake cle=
an
>> this time.
>=20
> BTW, I ran the test by hand and it compiled successfully from the same
> shell I ran bmake clean && bmake install in.

Hmm, I must not understand how pkgsrc interacts with libttool, but I
just looked at .work.log and found the problem command:

    (cmd-sink) pop:
-L/home/sttng359/pkgsrc/converters/ruby-iconv/work/.buildlink/lib
<.> /home/sttng359/pkgsrc/converters/ruby-iconv/work/.gcc/bin/gcc -o
conftest -I.
-I/home/sttng359/pkgsrc/converters/ruby-iconv/work/.buildlink/lib/ruby/1.=
8/i386-linux
-I/home/sttng359/pkgsrc/converters/ruby-iconv/work/.buildlink/include/db4=

-I/home/sttng359/pkgsrc/converters/ruby-iconv/work/.buildlink/include
-O2 -fPIC conftest.c
-L/home/sttng359/pkgsrc/converters/ruby-iconv/work/.buildlink/lib
-Wl,-R/usr/pkg/lib -lruby18-static -ldl -lcrypt -lm -ldb4 -lc

The command contains -Wl,-R/usr/pkg/lib, but no -L/usr/pkg/lib.  Why
does this differ from what the configure script claims it ran which did
include -L/usr/pkg/lib?  For whatever reason, libtool (I think) doesn't
seem to think it needs it.  There is no installed .la if that make a
difference.  My system does have libdb-4.0 installed in the base system
with a .a, .so, and .la file; but I don't think that that's the problem.

BTW, I also just had a similar with subversion-base failing to install
because it can't find libgssapi.so which is installed under /usr/pkg/lib
and does contain a .la file.  It seems to be a similar problem with
libtool removing the -L/usr/pkg/lib argument supplied to it.

>=20
>=20
>=20


--=20
Loren M. Lang
lorenl@alzatex.com
http://www.alzatex.com/


Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: CEE1 AAE2 F66C 59B5 34CA  C415 6D35 E847 0118 A3D2



--------------enig435EC55D5D6FB85544900C69
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFGHbzSHsHRHUO+igRAj6DAJ47fhx77p8ofa0ztp7dxujLjDsrRACgnXj0
SPc6F0vWigwQ8qC/QDbht1c=
=OE+3
-----END PGP SIGNATURE-----

--------------enig435EC55D5D6FB85544900C69--