Subject: Compiling openssl-0.9.6e failed on pmax
To: NetBSD pmax <port-pmax@netbsd.org>
From: Uwe Lienig <Uwe.Lienig@fif.mw.htw-dresden.de>
List: port-pmax
Date: 08/08/2002 11:00:01
Hi,

Recently i sat up a 5000/133 with NetBSD-1.5.2. Installation went fine. After
having the machine running under 1.5.2 I want to install cyrus-imapd. I looked
at the dependency list I didn't want to mess with dependencies that depend on
others. I sup'ed the latest pkgsrc from sup.netbsd.org and gave mail/cyrus-imapd
a try. A simple make within the pkgsrc-dir ran for nearly 2 days - o.k. it's not
new hardware, but solid as a rock.

After the build ended I did make install. The installation told me, that there
was no openssl-0.9.6e installed. I wondered. Well, cd'ing to
pkgsrc/security/openssl and make install started working. But after some 2 hours
now I'm stuck. This is the error I get. I suspect that the command to build
libcrypto.so.300.0 is not complete. There might be no reference to a lib
containing dlopen and the like. But I'm very new to the pkgsrc-system and have
no idea where to look in the many makefiles to change this particular
commandline, even I don't know how dlopen (and the others) may be undefined! So,
what should I do to get rid of this problem.

libs='-L. '; for i in crypto; do  ( set -x; gcc   -shared -o lib$i.so.300.0 
-Wl,-soname=lib$i.so.300  -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 libcrypto.so.300.0 -Wl,-soname=libcrypto.so.300 -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
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

-- 
Uwe Lienig  | fon: (+49 351) 462 2780 | mailto:uwe.lienig@fif.mw.htw-dresden.de
            | fax: (+49 351) 462 3476 | http://www.fif.mw.htw-dresden.de
HTW Dresden | parcels: Gutzkowstr. 22 | letters: PF 12 07 01       
   -FiF-    |          01069 Dresden  |          01008 Dresden