php4: /libltdl.a(ltdl.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » CustomBuild » ./build php

php4: /libltdl.a(ltdl.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPICLast Modified: Feb 4, 2010, 6:21 pm
If you're trying to compile php4 on a new 64-bit system, you might run into issues.  Sample errors:

/libltdl.a(ltdl.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libltdl.a(ltdl.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1


There have been 2 reported solutions you can try either one to see which works for you.
1)

cd /usr/local/directadmin/custombuild
yum install libtool-ltdl-devel
PHP_LDFLAGS=-L/usr/lib64 ./build php n



2)

cd /usr/local/directadmin/custombuild
./build update
mkdir -p custom/ap2
cp -fp configure/ap2/configure.php4 custom/ap2/configure.php4
perl -pi -e 's/^\.\/configure/CFLAGS=-fPIC .\/configure/' custom/ap2/configure.php4
./build libtool
./build php n


© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST