On Mon, Jan 12, 2004, Christopher Chan wrote:

> [...]
> >$ ld --shared --whole-archive -o <prefix>/lib/librpm.so <prefix>/lib/librpm*.a
> [...]
> Also, I tried just creating a shared from the static, it complains about
> a "relocation error" when I try to run rpmbuild.  I get this error:
>
> [EMAIL PROTECTED] rpmbuild --rebuild make-3.80-20030723.src.rpm
> rpmbuild: relocation error: /opt/rpmtest/lib/librpmio-4.2.so: undefined
> symbol: md5Reset

Well, I don't how you created this librpmio-4.2,so, but md5Reset() is in
librpmbeecrypt. So, if you really build a librpm.so with

$ ld --shared --whole-archive -o <prefix>/lib/librpm.so <prefix>/lib/librpm*.a

I think it should work fine if you load it in via dlopen(3) and resolve
and use symbols via dlsym(3).

> I'm guess trying to get the bootstrap part of the process to work with
> --enable-shared, that way I can guarantee that I get the correct shared
> libraries built.  If you can think of anything that may help me
> accomplish this or think of any issues that may arise, please inform me
> before I get into a possible "rat hole".

Yes and no. Yes, in theory. No in practice because RPM links not against
a single librpm.so (as I suggest to build above). Instead it links
against a bunch of libraries and in certain order and unless you're very
careful in linking the unresolved symbol problem can easily arise. So,
I recommend that you ignore the bootstrap itself for testing and really
try to use the librpm.so from within your application.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to