Subject: Re: Compiling openssl-0.9.6e failed on pmax
To: Maciej W. Rozycki <macro@ds2.pg.gda.pl>
From: Uwe Lienig <Uwe.Lienig@fif.mw.htw-dresden.de>
List: port-pmax
Date: 08/09/2002 09:10:36
"Maciej W. Rozycki" wrote:
>
> On Thu, 8 Aug 2002, Uwe Lienig wrote:
>
> > thank you for your answer. But I can not figure out which compiler options are
> > to be set to make the linker happy. I read the man page to dl* funcs. The man
> > page says, that refs to these funcs are automagically added when a dynamic
> > object is to be produced. This is what the man page says
>
> You need to add "-ldl" to flags passed to the linker. The fast hackish
> way is to add it to the generated Makefile to the variable called EX_LIBS
> after `./config' is run. The real solution is to add an entry for
> "NetBSD-pmax" (or "NetBSD-mipsel") to the perl "Configure" script in the
> package. The syntax is shown in the file and you may verify results with
> `make TABLE'. The only NetBSD hosts listed now are: "NetBSD-m68",
> "NetBSD-sparc" and "NetBSD-x86" -- not an impressive list, I'd say.
Correct me if I'm wrong, but there is no libdl.{a,so} in NetBSD. So adding -ldl
wouldn't help.
I had a look at the compile procedure of openssl-0.9.6e. In the first stage
static libraries are produced. In the second stage the lib*.a are converted into
lib*.so by relinking them using the failed command, which I include here again.
So what would be the correct procedure to build a lib*.so from a lib*.a.
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
I had a look at /usr/bin/gcc which is hard linked to /usr/bin/cc.
>
> For a permanent advantage it would be worthwhile to send the resulting
> entry to openssl maintainers. Maybe one is already present in the 0.9.7
> beta so it could be just copied as is -- I haven't checked.
My understanding of NetBSD is, that the kernel of the different platforms is the
only thing, that is special to the platform (well I know, that this alone isn't
realy possibile, but from a more general point of view). After that, every
program is build with the same compile procedure. If this is true, how are the
openssl-0.9.6e produced on the other supported platforms?
>
> --
> + Maciej W. Rozycki, Technical University of Gdansk, Poland +
> +--------------------------------------------------------------+
> + e-mail: macro@ds2.pg.gda.pl, PGP key available +
Thank you for your suggestion.
--
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