Subject: Re: CVS commit: pkgsrc/mk/compiler
To: Johnny C. Lam <>
From: Manuel Bouyer <>
List: tech-pkg
Date: 02/09/2004 14:26:31

On Sat, Feb 07, 2004 at 11:54:40PM +0000, Johnny C. Lam 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=${CC} to the configure process as the comment in the Makefile says
> that it wants to do.

You commit fix this problem, but now the build fails at link time. It seems
it because it doesn't add -lc to the libraries:
ld -o ssh ssh.o readconf.o clientloop.o sshtty.o  sshconnect.o sshconnect1.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/local/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 dependency /lib/64/
cfsetospeed                         ./libssh.a(ttymodes.o)  (symbol belongs to implicit dependency /lib/64/
strcspn                             ./libssh.a(readpass.o)  (symbol belongs to implicit dependency /lib/64/

With the previous Makefile, just removind ld from .buildink/bin allowed
a successfull build. I don't know what the difference is ...

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference