Subject: Re: CVS commit: pkgsrc/mk/compiler
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 02/18/2004 08:39:07
--/e2eDi0V/xtL+Mc8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 09, 2004 at 02:26:31PM +0100, Manuel Bouyer wrote:

> > This particular problem you're experiencing is actually a
> > openssh*/Makefile problem as it redefines LD to ${CC}, which is
> > generally a bad thing to do (as you've noted).  It should just pass
> > LD=3D${CC} to the configure process as the comment in the Makefile says
> > that it wants to do.
>=20
> You commit fix this problem, but now the build fails at link time. It see=
ms
> it because it doesn't add -lc to the libraries:
> ld -o ssh ssh.o readconf.o clientloop.o sshtty.o  sshconnect.o sshconnect=
1.o sshconnect2.o -L. -Lopenbsd-compat/ -L/usr/local/lib -L/usr/local/lib  =
 -L/usr/local/gcc-3.3.2/lib/gcc-lib/sparc64-sun-solaris2/3.3.2 -Wl,-R/usr/l=
ocal/gcc-3.3.2/lib/gcc-lib/sparc64-sun-solaris2/3.3.2 -L/usr/local/gcc-3.3.=
2/lib -Wl,-R/usr/local/gcc-3.3.2/lib -L/usr/local/lib -Wl,-R/usr/local/lib =
-L/usr/local/lib -R/usr/local/lib -L/usr/local/lib -lssh -lopenbsd-compat -=
lrt -lskey -lz -lsocket -lnsl  -lcrypto
> Undefined                       first referenced
>  symbol                             in file
> setuid                              ssh.o  (symbol belongs to implicit de=
pendency /lib/64/libc.so.1)
> cfsetospeed                         ./libssh.a(ttymodes.o)  (symbol belon=
gs to implicit dependency /lib/64/libc.so.1)
> strcspn                             ./libssh.a(readpass.o)  (symbol belon=
gs to implicit dependency /lib/64/libc.so.1)
> [...]

LD got replaced with CC.. speaking from experience breaking this
package before, adding -lc won't fix it, it has to call ${CC} to
link, not ${LD}.

grant.


--/e2eDi0V/xtL+Mc8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAMon7luYOb9yiFXoRAmTkAKCumvu+5avX1Qtppv5d9b8z9OQDmACeLguS
rsTdqGC7mP1H38boK1NbDyQ=
=LLlx
-----END PGP SIGNATURE-----

--/e2eDi0V/xtL+Mc8--