Trying to upgrade from 2.1.12 on our antiquated OS and cannot build the RPM. /usr/bin/libtool --mode=link gcc -release 020203 \ -pie -Wl,-znow -export-dynamic -o libfreeradius-radius.la -rpath /usr/lib64/freeradius dict.lo filters.lo hash.lo hmac.lo hmacsha1.lo isaac.lo log.lo misc.lo missing.lo md4.lo md5.lo print.lo radius.lo rbtree.lo sha1.lo snprintf.lo strlcat.lo strlcpy.lo token.lo udpfromto.lo valuepair.lo fifo.lo packet.lo event.lo getaddrinfo.lo vqp.lo heap.lo dhcp.lo base64.lo gcc -shared .libs/dict.o .libs/filters.o .libs/hash.o .libs/hmac.o .libs/hmacsha1.o .libs/isaac.o .libs/log.o .libs/misc.o .libs/missing.o .libs/md4.o .libs/md5.o .libs/print.o .libs/radius.o .libs/rbtree.o .libs/sha1.o .libs/snprintf.o .libs/strlcat.o .libs/strlcpy.o .libs/token.o .libs/udpfromto.o .libs/valuepair.o .libs/fifo.o .libs/packet.o .libs/event.o .libs/getaddrinfo.o .libs/vqp.o .libs/heap.o .libs/dhcp.o .libs/base64.o -Wl,-znow -Wl,-soname -Wl,libfreeradius-radius-020203.so -o .libs/libfreeradius-radius-020203.so /usr/bin/ld: .libs/dict.o: relocation R_X86_64_PC32 against `dict_attr_types' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status gmake[4]: *** [libfreeradius-radius.la] Error 1 gmake[4]: Leaving directory `/usr/src/redhat/BUILD/freeradius-server-2.2.3/src/lib' gmake[3]: *** [lib] Error 2 gmake[3]: Leaving directory `/usr/src/redhat/BUILD/freeradius-server-2.2.3/src' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/src/redhat/BUILD/freeradius-server-2.2.3/src' gmake[1]: *** [src] Error 2 gmake[1]: Leaving directory `/usr/src/redhat/BUILD/freeradius-server-2.2.3' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.56364 (%build) It does appear to be compiling with -fPIC Any ideas appreciated Regards, Adrian Smith
I think I already am, here is an example of one of the calls to gcc: gcc -I/usr/src/redhat/BUILD/freeradius-server-2.2.3 -I/usr/src/redhat/BUILD/freeradius-server-2.2.3/src -O2 -g -m64 -mtune=generic -fno-strict-aliasing -fPIC -fPIE -DPIE -Wall -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DWITH_SYSTEM_LTDL -D_LIBRADIUS -I/usr/src/redhat/BUILD/freeradius-server-2.2.3/src -c dhcp.c -o dhcp.o >/dev/null 2>&1 The section from the .spec file is %ifarch s390 s390x export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC -fPIE -DPIE" export LDFLAGS="-pie -Wl,-znow" %else export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fpic -fPIE -DPIE" export LDFLAGS="-pie -Wl,-znow" %endif From: freeradius-users-bounces+adrian.p.smith=bt.com@lists.freeradius.org [mailto:freeradius-users-bounces+adrian.p.smith=bt.com@lists.freeradius.org] On Behalf Of Alan Buxey Sent: 25 January 2014 18:06 To: FreeRadius users mailing list Subject: Re: trouble building RPM Build the RPM with the fPIC option? You'll need to edit the spec file
adrian.p.smith@bt.com wrote:
I think I already am, here is an example of one of the calls to gcc:
I'm not sure what to say. I don't use Redhat myself. I suspect it might be a libtool issue. I've never really understood it, and it's magic. Not in a "sparkles and lights" kind of way, butmore like "sell your soul and first-born, then burn in hell for eternity". In the version 3 release, we've discarded libtool entirely. Life is a lot easier there. Alan DeKok.
I think I have it working. I have blogged here - http://adriansmith.blogspot.co.uk/2014/01/building-freeradius-rpm-for-el5.ht... in case it comes in useful. -----Original Message----- From: freeradius-users-bounces+adrian.p.smith=bt.com@lists.freeradius.org [mailto:freeradius-users-bounces+adrian.p.smith=bt.com@lists.freeradius.org] On Behalf Of Alan DeKok Sent: 26 January 2014 20:45 To: FreeRadius users mailing list Subject: Re: trouble building RPM adrian.p.smith@bt.com wrote:
I think I already am, here is an example of one of the calls to gcc:
I'm not sure what to say. I don't use Redhat myself. I suspect it might be a libtool issue. I've never really understood it, and it's magic. Not in a "sparkles and lights" kind of way, butmore like "sell your soul and first-born, then burn in hell for eternity". In the version 3 release, we've discarded libtool entirely. Life is a lot easier there. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
adrian.p.smith@bt.com wrote:
I think I have it working.
I have blogged here - http://adriansmith.blogspot.co.uk/2014/01/building-freeradius-rpm-for-el5.ht... in case it comes in useful.
And that's why libtool needs to die in fire. If you add -fPIC, it complains that you need to add it. If you don't add -fPIC, libtool doesn't complain. The original intent was nice. The final product is evil. Alan DeKok.
participants (3)
-
adrian.p.smith@bt.com -
Alan Buxey -
Alan DeKok