I'm trying to compile/install OpenLDAP from source on Ubuntu 14.04, ./configure goes well, make goes well too, but when I do amake install I get this:
/usr/bin/ld: /usr/lib/libssl.a(s23_meth.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libssl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libldap.la' with the above command before installing it
make[2]: *** [install-local] Error 1
make[2]: Leaving directory `/home/user/Downloads/openldap-2.4.40/libraries/libldap'
make[1]: *** [install-common] Error 1
make[1]: Leaving directory `/home/user/Downloads/openldap-2.4.40/libraries'
make: *** [install-common] Error 1
It does mention above to compile using -fPIC
which I have as follows:
CFLAGS=-fPIC
CXXFlAGS=-fPIC
CPPGLAGS=-fPIC
So I don't think that's the problem, I think it has more to do with the relink issue, or the bad value error.
Any ideas how I can get this to work?
I was able to fix it using:
-D_GNU_SOURCE
Along with -fPIC for CFLAGS and CPPFLAGS
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments