Subject: Re: openssl-0.9.6e + release-1-4 + i386 = unhappy
To: None <>
From: Aaron J. Grier <>
List: tech-pkg
Date: 08/06/2002 15:35:58
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Aug 05, 2002 at 02:13:40PM -0700, Aaron J. Grier wrote:
> when compiling openssl-0.9.6e from pkgsrc under release-1-4 (a.out)
> running on i386 I get the following during the final shared object
> link:

apparently openssl can't properly build shared libraries under 1.4
anymore.  Fred B suggested I try building non-shared libraries, which
worked (see attached patch), but I first had to update libc to
/usr/lib/ in order to get strlcat and friends.

there also appeared to be a bug in; also contained in the
attached patch.  after successfully getting openssl linked, archived,
and installed, packages pulling in openssl/ were running in
circles trying to fill the empty dependency ":../../security/openssl"

lynx is now building...  I'm crossing my fingers hoping the worst is
over and that I can get openssh back up and running.  :P

needless to say I'm trying to build openssl on my other 1.4 machines
before doing a make update so I don't get stuck like this again.

already my ELF pmax machine is grumping at me:

libs='-L. '; for i in crypto; do  ( set -x; gcc   -shared -o lib$  -Wl,-soname=lib$  -Wl,-Bsymbolic -Wl,--whole-archive lib$i.a  -Wl,--no-whole-archive $libs -Wl,-R/usr/pkg/lib -lc ) || exit 1;  libs="$libs -l$i";  done
+ gcc -shared -o -Wl, -Wl,-Bsymbolic -Wl,--whole-archive libcrypto.a -Wl,--no-whole-archive -L. -Wl,-R/usr/pkg/lib -lc
libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c(.text+0xe0): undefined reference to `dlopen'
dso_dlfcn.c(.text+0x194): undefined reference to `dlclose'
libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c(.text+0x264): undefined reference to `dlclose'
libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c(.text+0x3c0): undefined reference to `dlsym'
libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c(.text+0x500): undefined reference to `dlsym'
collect2: ld returned 1 exit status

this looks familiar...

who programs this stuff?  ;)

  Aaron J. Grier | "Not your ordinary poofy goof." |
    "i'm convinced that the cray cabinet has an outlet for plugging in
    welding attachments."  --  Skeezics Boondoggle, on the cray CS6400

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="diff.out"

? diff.out
Index: Makefile
RCS file: /cvsroot/pkgsrc/security/openssl/Makefile,v
retrieving revision 1.53
diff -u -r1.53 Makefile
--- Makefile	2002/08/04 15:47:43	1.53
+++ Makefile	2002/08/06 22:16:11
@@ -20,7 +20,7 @@
 LICENCE=		fee-based-commercial-use
-CONFIGURE_ARGS=		shared --openssldir=${PKG_SYSCONFDIR} --prefix=${PREFIX}
+CONFIGURE_ARGS=		no-shared --openssldir=${PKG_SYSCONFDIR} --prefix=${PREFIX}
 CONF_FILES=		${PREFIX}/share/examples/openssl/openssl.cnf	\
@@ -61,7 +61,7 @@
 .if ${OPSYS} == "NetBSD" && !exists(/usr/libexec/ld.elf_so) && !exists(/usr/libexec/
-IGNORE=			${PKGNAME} requires shared object support
+IGNORE=			${PKGNAME} requires no-shared object support
 .if defined(USE_RSAREF2) && ${USE_RSAREF2} == YES
RCS file: /cvsroot/pkgsrc/security/openssl/,v
retrieving revision 1.14
diff -u -r1.14
---	2002/08/04 15:47:44	1.14
+++	2002/08/06 22:16:11
@@ -100,6 +100,9 @@
 .endif  # exists(${_OPENSSLV_H}) && exists(${_SSL_H})
+# if this hasn't been defined yet, use the latest pkgsrc version
+BUILDLINK_DEPENDS.openssl?=	openssl>=0.9.6e
 .if ${_NEED_OPENSSL} == "YES"
 DEPENDS+=	${BUILDLINK_DEPENDS.openssl}:../../security/openssl