Thanks for the advice.

I tried changing the --disable-shared to enable-shared, the bootstrap
process (openpkg.spec) did not like it (as you might have expected).  I
get this error:

/usr/bin/gcc -shared  argv.lo digest.lo fts.lo macro.lo rpmio.lo
rpmlog.lo rpmmalloc.lo rpmpgp.lo rpmrpc.lo rpmsw.lo strcasecmp.lo
stubs.lo url.lo ugid.lo -Wl,--whole-archive ../file/.libs/libfmagic.al
/tmp/openpkg-20031228/beecrypt-3.1.0/.libs/libbeecrypt.a
-Wl,--no-whole-archive  -L/opt/rpmshared/lib
-L/tmp/openpkg-20031228/zlib-1.2.1 -L/tmp/openpkg-20031228/bzip2-1.0.2
-L/tmp/openpkg-20031228/beecrypt-3.1.0 -lrt -lz -lbz2  -Wl,-soname
-Wl,librpmio-4.2.so -o .libs/librpmio-4.2.so
/tmp/openpkg-20031228/beecrypt-3.1.0/.libs/libbeecrypt.a(aes.o)(.rodata+0x0): multiple 
definition of `_ae0'
../file/.libs/libfmagic.al(aes.o)(.rodata+0x0): first defined here
/tmp/openpkg-20031228/beecrypt-3.1.0/.libs/libbeecrypt.a(aes.o)(.rodata+0x400): 
multiple definition of `_ae1'
../file/.libs/libfmagic.al(aes.o)(.rodata+0x400): first defined here
/tmp/openpkg-20031228/beecrypt-3.1.0/.libs/libbeecrypt.a(aes.o)(.rodata+0x800): 
multiple definition of `_ae2'
../file/.libs/libfmagic.al(aes.o)(.rodata+0x800): first defined here
/tmp/openpkg-20031228/beecrypt-3.1.0/.libs/libbeecrypt.a(aes.o)(.rodata+0xc00): 
multiple definition of `_ae3'
...
<bunch of other multiple defs.>
...
In function `sha1Process':
: multiple definition of `sha1Process'
../file/.libs/libfmagic.al(sha1opt.o)(.text+0x0): first defined here
collect2: ld returned 1 exit status
make[2]: *** [librpmio.la] Error 1
make[2]: Leaving directory `/tmp/openpkg-20031228/rpm-4.2.1/rpmio'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/openpkg-20031228/rpm-4.2.1'
make: *** [all] Error 2
+ exit 2
./openpkg.boot:ERROR: script returned non-null value


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

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".

Thanks much.

- Christopher Chan

>We do not build RPM with a shared library. If you want those shared
>library versions of librpm you have to manually try to change the
>openpkg.spec to achieve this, but keep in mind that the bootstrap is a
>very sensible package which usually dislikes very much such side-effect
>causing changes. But give it a try...
>
>Alternatively, on a PIC-smart and GNU binutils based platform (e.g.
>FreeBSD or Linux) you can try to create a librpm.so manually out of the
>librpm*.a files with a post-installation trick:
>
>$ ld --shared --whole-archive -o <prefix>/lib/librpm.so <prefix>/lib/librpm*.a
>
>This does not work on all platforms, of course. Especially because
>librpm*.a do not contain PIC, but it should work reasonably enough on
>FreeBSD and Linux.

Christopher Chan
email: [EMAIL PROTECTED]
work: 650-561-0227

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

Reply via email to