In regard to: Re: [rpm-list] problems compiling rpm on solaris, Edward...:
I did reconfigure and got the same problem. I realised what it was though. I
was adding the new include paths on the end of DEFAULT_INCLUDES in the
Makefile instead of INCLUDES so now I have:
INCLUDES = -I. \
-I$(top_srcdir) \
\
\
-I${top_srcdir}/lua/include -I${top_srcdir}/lua/local \
-I${top_srcdir}/syck/lib \
-I${top_srcdir}/popt \
-I$(top_srcdir)/misc \
-I${top_srcdir}/zlib \
-I/usr/local/include/beecrypt -I/usr/local/include/neon
-I/usr/local/include
The thing is, if you set up the environment correctly before you run
configure, you shouldn't have to edit any of the Makefiles by hand.
Setting and exporting CC, CFLAGS, CPPFLAGS, and LDFLAGS to appropriate
values for your system and then running configure will avoid all the
Makefile tweaking you end up doing. For example:
PATH=/opt/SUNWspro/bin:$PATH; export PATH
CC=cc; export CC
CPPFLAGS="-I/usr/local/include -I/usr/local/include/beecrypt"
CPPFLAGS="$CPPFLAGS -I/usr/local/include/python2.4 -I/usr/local/ssl/include"
CPPFLAGS="$CPPFLAGS -D__FUNCTION__=__func__"
export CPPFLAGS
CFLAGS="-Xa -g -xs -xstrconst -KPIC -mt $CPPFLAGS"
export CFLAGS
LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib"; export LDFLAGS
./configure --prefix=/your/prefix etc.
/usr/ccs/bin/ld -G -z text -h librpmdb-4.4.so -o .libs/librpmdb-4.4.so
..libs/dbconfig.o .libs/fprint.o .libs/hdrNVR.o .libs/header.o
..libs/header_internal.o .libs/legacy.o .libs/merge.o .libs/poptDB.o
..libs/rpmhash.o .libs/rpmdb.o .libs/tagname.o .libs/tagtbl.o .libs
/db3.o -z allextract ../db3/.libs/libdb-4.5.a -z defaultextract
-R/tmp/rpm-4.4.7/rpmio/.libs -R/tmp/rpm-4.4.7/popt/.libs -R/opt/rpm/l
ib -R/usr/ucblib -L/opt/rpm/lib ../rpmio/.libs/librpmio.so
.../popt/.libs/libpopt.so -L/usr/ucblib -lpthread -lnsl -lsocket -lrt -lc
Text relocation remains referenced
against symbol offset in file
Whenever I see "Text relocations remain", the first thing I check for
is that everything I'm trying to link into a shared library was built
as position independent code (PIC).
My guess is that the internal copy of Berkeley DB wasn't built as PIC.
I never ran into this problem because I had
-KPIC
in CFLAGS from the start, so everything was built as PIC.
smpd328>ls -l ../db3/.libs/libdb-4.5.a
-rw-r--r-- 1 u752359 other 12218804 Jan 4 10:14
.../db3/.libs/libdb-4.5.a
I tried adding -L/usr/local/lib to the LDFLAGS but still got the same error.
You want to use the internal copy of BerkeleyDB, the problem is that it
wasn't built in such a way that it can be linked into a shared library.
Either reconfigure with -KPIC as part of CFLAGS, or edit the appropriate
Makefile for BerkeleyDB, probably rpm-4.4.7/db3/Makefile, adding -KPIC
to CFLAGS and then doing a make clean and a make.
Tim
--
Tim Mooney mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list