artichoke
Verified User
FYI, I had just seen this on a 64-bit box (centos 5) and even with -fPIC wasn't able to sort it out. I did a full openssl removal and reinstall (very carefully) but couldn't get past this error with php4. I then used php5 and it all went smoothly. (custombuild php4, and customapache php4 had the error).
So I guess the moral of the story is use php5 for new systems. (unless the issue can be resolved some other way, but I couldn't find it)
John
I recently did a custombuild on a 64-bit CentOS 5.3 system with php4=cli and kept running into the "relocation R_X86_64_32S against a local symbol" problem. I see this reported all over the Internet and in many places in the DirectAdmin forums. First, a web page that discusses this problem and possible solutions:
http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
A forum user proposed a solution (URL below) that did not work for me. I did "yum install libtool" and then made a symlink with "ln -sf /usr/lib64/libltdl.a /usr/local/lib/libltdl.a". But the symlink gets replaced by an improperly-built library during the build.
http://www.directadmin.com/forum/showthread.php?t=22579
The following small patch to '/usr/local/directadmin/custombuild/build' (revision BUILDSCRIPT_VER=1.1.18) worked for me. It causes the Makefile for libltdl to be patched so it uses -fPIC to build libltdl.
Code:
# rcsdiff -u -r1.1 build
===================================================================
RCS file: RCS/build,v
retrieving revision 1.1
diff -u -r1.1 build
--- build 2009/07/29 02:36:31 1.1
+++ build 2009/08/16 11:57:24
@@ -4474,6 +4474,9 @@
echo "Doing extra /libltdl for mcrypt..";
cd libltdl
./configure --enable-ltdl-install
+
+ # Must build libltds with -fPIC. R.D.
+ perl -pi.bak -e '/^CFLAGS/ && ! /-fPIC/ && s/$/ -fPIC/;' Makefile
make
make install
echo "Done extra /libltdl for mcrypt.";
I don't advise applying this patch unless you need it, as it has only been tested by me on a single host.