[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Shared libraries on pmax platform




On 04-Dec-97 Stephen Darragh wrote:
>I really need help with this.
>
>I'm using the current pmax snapshot and ports updated by CVS.
>
>It seems that anything I compile that generates a shared library
>generates a shared library that ldconfig doesn't want to create
>nice symlinks for the soname.
>
>Nowwwwww....  That's not entirely true.  The real problem is that
>these libraries so generated by ldd actually have a null internal name
>field (yes, they're really ELF.)
>
>How do I give the libraries nice internal name fields and therefore make
>them not only ldconfig correctly, but also link nicely with applications
>so that they don't have a reference (for example) to libcpico.so when the
>library itself is libpico.so.1.3 and should be libpico.so.1 in its
>generalized form.
>

You should add "--soname libico.so.1" to the ld command line. You
also needs the "--whole-archive" switch to force loading of the entire
archive file if you create the shared library out of an libico.a archive.
And the "-shared" switch of course.

You can also have a look in "/usr/share/mk/bsd.lib.mk" for the exact command
to make a share library from an .a file. (check 'mips' ifdefs!)

Good luck!

---
Per Fogelström
=================================================================
Opsycon Open System Consulting AB                  www.opsycon.se
Arkenvägen 18                                Phone: +46 8 7688636
S187 46 Täby                                   Fax: +46 8 4464143
Sweden                                            pefo@opsycon.se
=================================================================