NetBSD Problem Report #40434
From www@NetBSD.org Mon Jan 19 11:03:24 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 200EC63BFAC
for <gnats-bugs@gnats.netbsd.org>; Mon, 19 Jan 2009 11:03:24 +0000 (UTC)
Message-Id: <20090119110323.A7F4963B8BA@narn.NetBSD.org>
Date: Mon, 19 Jan 2009 11:03:23 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: security/skey fails to build on Solaris
X-Send-Pr-Version: www-1.0
>Number: 40434
>Category: pkg
>Synopsis: security/skey fails to build on Solaris
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: obache
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 19 11:05:00 +0000 2009
>Closed-Date: Tue Jan 20 14:51:28 +0000 2009
>Last-Modified: Tue Jan 20 15:05:06 +0000 2009
>Originator: Jörn Clausen
>Release:
>Organization:
University of Bielefeld
>Environment:
SunOS spare4200 5.10 Generic_120012-14 i86pc i386 i86pc
>Description:
security/skey fails to build on Solaris:
gcc -o skey skey.o -L. -L/software/local/pkgsrc/sunos5.10-x64/pkgsrc-cvs-rebuild/gcc34/bin/../lib/gcc/i386-pc-solaris2.10/3.4.6 -Wl,-R/software/local/pkgsrc/sunos5.10-x64/pkgsrc-cvs-rebuild/gcc34/bin/../lib/gcc/i386-pc-solaris2.10/3.4.6 -L/software/local/pkgsrc/sunos5.10-x64/pkgsrc-cvs-rebuild/gcc34/bin/../lib -Wl,-R/software/local/pkgsrc/sunos5.10-x64/pkgsrc-cvs-rebuild/gcc34/bin/../lib -L/usr/local/pkgsrc/pkgsrc-cvs-rebuild/gcc34/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/pkgsrc/pkgsrc-cvs-rebuild/lib -Wl,-R/usr/local/pkgsrc/pkgsrc-cvs-rebuild/lib -lskey -lcrypt
Undefined first referenced
symbol in file
MD4Init ./libskey.a(skeysubr.o)
MD5Init ./libskey.a(skeysubr.o)
SHA1Final ./libskey.a(skeysubr.o)
SHA1Update ./libskey.a(skeysubr.o)
MD4Final ./libskey.a(skeysubr.o)
MD5Final ./libskey.a(skeysubr.o)
MD4Update ./libskey.a(skeysubr.o)
MD5Update ./libskey.a(skeysubr.o)
SHA1Init ./libskey.a(skeysubr.o)
The previous version (1.1.5nb2) did compile.
I am unsure if using Solaris' native libcrypt is a good idea. skey is built as dependency of security/openssh, which in turn uses security/openssl and the libcrypt provided there.
BTW: The MASTER_SITE http://www.sparc.spb.su/solaris/skey/ does not exist.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->obache
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Mon, 19 Jan 2009 11:35:03 +0000
Responsible-Changed-Why:
I broke it.
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/40434: security/skey fails to build on Solaris
Date: Mon, 19 Jan 2009 20:42:31 +0900
Following patch may fixes the failure:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/skey/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile 13 Dec 2008 13:58:31 -0000 1.22
+++ Makefile 19 Jan 2009 11:39:08 -0000
@@ -23,6 +23,14 @@
INSTALLATION_DIRS= bin include lib ${PKGMANDIR}/man1 ${PKGMANDIR}/man8
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+CONFIGURE_ENV+= ac_cv_header_md4_h=no
+CONFIGURE_ENV+= ac_cv_header_sha1_h=no
+BUILDLINK_TRANSFORM+= l:crypt:md5:crypt
+.endif
+
post-install:
${RANLIB} ${DESTDIR}${PREFIX}/lib/libskey.a
From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: obache@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/40434: security/skey fails to build on Solaris
Date: Mon, 19 Jan 2009 12:57:06 +0100
> Following patch may fixes the failure:
[...]
Yes, it did. Thanks a lot!
--
Jörn Clausen joern.clausen@uni-bielefeld.de
Hochschulrechenzentrum http://www.uni-bielefeld.de/hrz/
Universität Bielefeld
State-Changed-From-To: open->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 19 Jan 2009 12:01:36 +0000
State-Changed-Why:
Commited the fix. Thanks for the PR!
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40434 CVS commit: pkgsrc/security/skey
Date: Mon, 19 Jan 2009 12:00:03 +0000 (UTC)
Module Name: pkgsrc
Committed By: obache
Date: Mon Jan 19 12:00:03 UTC 2009
Modified Files:
pkgsrc/security/skey: Makefile
Log Message:
Solaris's md4.h and sha1.h are not good enough for this package,
and MD5_* is in libmd5.
Fixes build failure reported by PR 40434.
To generate a diff of this commit:
cvs rdiff -r1.22 -r1.23 pkgsrc/security/skey/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: obache@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/40434: security/skey fails to build on Solaris
Date: Mon, 19 Jan 2009 13:36:47 +0100
Jörn Clausen wrote:
>> Following patch may fixes the failure:
> [...]
>
> Yes, it did. Thanks a lot!
Rats, now security/openssh is broken:
configure:11868: checking for s/key support
configure:11888: gcc -o conftest -O
-I/usr/local/pkgsrc/pkgsrc-cvs-rebuild/include
-I/usr/local/pkgsrc/pkgsrc-cvs-rebuild/gcc34/incl
ude -I/usr/include -Wall -Wpointer-arith -Wuninitialized -Wsign-compare
-Wformat-security -fno-builtin-memset -I/usr/local/pkgsrc/pk
gsrc-cvs-rebuild/include
-I/usr/local/pkgsrc/pkgsrc-cvs-rebuild/gcc34/include -I/usr/include
-I/usr/local/pkgsrc/pkgsrc-cvs-rebuild/
include
-L/software/local/pkgsrc/sunos5.10-x64/pkgsrc-cvs-rebuild/gcc34/bin/../lib/gcc/i386-pc-solaris2.10/3.4.6
-Wl,-R/software/loc
al/pkgsrc/sunos5.10-x64/pkgsrc-cvs-rebuild/gcc34/bin/../lib/gcc/i386-pc-solaris2.10/3.4.6
-L/software/local/pkgsrc/sunos5.10-x64/pkg
src-cvs-rebuild/gcc34/bin/../lib
-Wl,-R/software/local/pkgsrc/sunos5.10-x64/pkgsrc-cvs-rebuild/gcc34/bin/../lib
-L/usr/local/pkgsrc/
pkgsrc-cvs-rebuild/lib -Wl,-R/usr/local/pkgsrc/pkgsrc-cvs-rebuild/lib
-lnsl -lsocket -L/usr/local/pkgsrc/pkgsrc-cvs-rebuild/gcc34/li
b -L/usr/lib -Wl,-R/usr/lib -L/usr/local/pkgsrc/pkgsrc-cvs-rebuild/lib
conftest.c -lskey -lz >&5
conftest.c: In function `main':
conftest.c:80: warning: implicit declaration of function `exit'
Undefined first referenced
symbol in file
MD5Init
/software/local/pkgsrc/source/pkgsrc-cvs/pkgsrc/security/openssh/work.spare4200/.buildlink/lib/l
ibskey.a(skeysubr.o) (symbol belongs to implicit dependency
/usr/lib/libmd.so.1)
MD5Final
/software/local/pkgsrc/source/pkgsrc-cvs/pkgsrc/security/openssh/work.spare4200/.buildlink/lib/l
ibskey.a(skeysubr.o) (symbol belongs to implicit dependency
/usr/lib/libmd.so.1)
MD5Update
/software/local/pkgsrc/source/pkgsrc-cvs/pkgsrc/security/openssh/work.spare4200/.buildlink/lib/l
ibskey.a(skeysubr.o) (symbol belongs to implicit dependency
/usr/lib/libmd.so.1)
ld: fatal: Symbol referencing errors. No output written to conftest
This change to security/openssh/Makefile seems to solve the problem:
--- Makefile 2009/01/19 11:14:55 1.1
+++ Makefile 2009/01/19 12:19:03
@@ -94,6 +94,7 @@
.if (${OPSYS} == "NetBSD") || (${OPSYS} == "Darwin") || (${OPSYS} ==
"SunOS")
. include "../../security/skey/buildlink3.mk"
CONFIGURE_ARGS+= --with-skey=${BUILDLINK_PREFIX.skey}
+LDFLAGS+=-lmd5
.else
CONFIGURE_ARGS+= --without-skey
.endif
Probably it needs an extra .if to restrict this to Solaris. And I am
unsure whether libmd.so or libmd5.so is the correct library to include,
both seem to work.
As mentioned before, ssh from openssh now pulls in libcrypto.so from
openssl, and /usr/lib/libmd5.so via skey. Whose MD5 routines win? I
think it would be much cleaner to build skey and openssh that solely
rely on security/openssl and don't use any of the functions provided by
Solaris. There is /usr/bin/ssh, if you insist on using the functions
provided by the OS.
NB: This only makes the packages compile, I have no idea, if they work
as intended. As far as I can tell, skey should now have no support for
MD4 whatsoever. But
$ skey -md4 ...
works and returns a result. But I can't say, if it is correct.
--
Jörn Clausen joern.clausen@uni-bielefeld.de
Hochschulrechenzentrum http://www.uni-bielefeld.de/hrz/
Universität Bielefeld
State-Changed-From-To: closed->open
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 19 Jan 2009 15:27:18 +0000
State-Changed-Why:
Problem still exists.
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/40434: security/skey fails to build on Solaris
Date: Tue, 20 Jan 2009 14:57:42 +0900
On Mon, 19 Jan 2009 21:40:05 +0900, Jörn Clausen <joern@uni-bielefeld.de> wrote:
> Rats, now security/openssh is broken:
Following patch shuold fixes it:
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/security/skey/buildlink3.mk,v
retrieving revision 1.7
diff -u -r1.7 buildlink3.mk
--- buildlink3.mk 8 Jul 2006 23:11:08 -0000 1.7
+++ buildlink3.mk 20 Jan 2009 05:44:01 -0000
@@ -18,4 +18,10 @@
BUILDLINK_DEPMETHOD.skey?= build
.endif # SKEY_BUILDLINK3_MK
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+BUILDLINK_TRANSFORM+= l:skey:skey:md5
+.endif
+
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
> As mentioned before, ssh from openssh now pulls in libcrypto.so from
> openssl, and /usr/lib/libmd5.so via skey. Whose MD5 routines win? I
> think it would be much cleaner to build skey and openssh that solely
> rely on security/openssl and don't use any of the functions provided by
> Solaris. There is /usr/bin/ssh, if you insist on using the functions
> provided by the OS.
OpenSSL define MD5_* functions, and skey using MD5* functions (underscore!).
> NB: This only makes the packages compile, I have no idea, if they work
> as intended. As far as I can tell, skey should now have no support for
> MD4 whatsoever. But
>
> $ skey -md4 ...
>
> works and returns a result. But I can't say, if it is correct.
Did you want to say that MD4 should be disabled nowadays?
--
"Of course I love NetBSD":-)
OBATA Akio / obache@NetBSD.org
From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: obache@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/40434: security/skey fails to build on Solaris
Date: Tue, 20 Jan 2009 15:19:54 +0100
OBATA Akio wrote:
> Following patch shuold fixes it:
[...]
Again: Yes it does. And this time, really everything looks fine. Thanks!
> OpenSSL define MD5_* functions, and skey using MD5* functions (underscore!).
Sorry, missed that.
> Did you want to say that MD4 should be disabled nowadays?
It probably depends on the intended use. But the original question was a
different one. I didn't realize that skey actually implements MD4 by
itself, if it can't find the header files. My expectation was, that it
would simply not offer this algorithm at all.
--
Jörn Clausen joern.clausen@uni-bielefeld.de
Hochschulrechenzentrum http://www.uni-bielefeld.de/hrz/
Universität Bielefeld
State-Changed-From-To: open->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Tue, 20 Jan 2009 14:51:28 +0000
State-Changed-Why:
Commited one more patch and fixed.
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40434 CVS commit: pkgsrc/security/skey
Date: Tue, 20 Jan 2009 14:48:56 +0000 (UTC)
Module Name: pkgsrc
Committed By: obache
Date: Tue Jan 20 14:48:56 UTC 2009
Modified Files:
pkgsrc/security/skey: buildlink3.mk
Log Message:
Also need to take care of md5 for Solaris, PR 40434.
To generate a diff of this commit:
cvs rdiff -r1.7 -r1.8 pkgsrc/security/skey/buildlink3.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: OBATA Akio <obache@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/40434: security/skey fails to build on Solaris
Date: Tue, 20 Jan 2009 23:51:05 +0900
On 2009/01/20, at 23:25, J=C3=B6rn Clausen wrote:
> It probably depends on the intended use. But the original question =20=
> was a
> different one. I didn't realize that skey actually implements MD4 by
> itself, if it can't find the header files. My expectation was, =20
> that it
> would simply not offer this algorithm at all.
It is in skey-1.1.5/md4c.c and enabled if system md4.h does not exist.
--=20
"Of course I love NetBSD":-)
OBATA Akio / obache@NetBSD.org
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.