make fails: recompile with -fPIC

Bug #1550973 reported by Peter VARGA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmemcached
New
Undecided
Unassigned

Bug Description

CXXLD libtest/backtrace

fails:
/bin/ld: libtest/backtrace_test.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

I run it with ./configure --prefix=/usr/glibc/libmemcached --disable-sasl:
Attached the config.log file.

Revision history for this message
Peter VARGA (pffice) wrote :
Revision history for this message
Peter VARGA (pffice) wrote :

Update:

I am using another glibc version than the system has. This error occurs when the LDFLAGS variable does not have a value. When I export LDFLAGS to the path of the new glibc version then I can compile it but the summary differs.

Summary when LDFLAGS is set:
Configuration summary for libmemcached version 1.0.18

   * Installation prefix: /usr/glibc/libmemcached
   * System type: unknown-linux-gnu
   * Host CPU: x86_64
   * C Compiler: cc (GCC) 4.9.3
   * C Flags: -g -O2
   * C++ Compiler: c++ (GCC) 4.9.3
   * C++ Flags: -g -O2
   * CPP Flags: -fvisibility=hidden
   * LIB Flags:
   * Assertions enabled: no
   * Debug enabled: no
   * Shared: yes
   * Warnings as failure: no
   * SASL support: no
   * make -j: 9
   * VCS checkout: no

Summary when LDFLAGS is empty:
Configuration summary for libmemcached version 1.0.18

   * Installation prefix: /usr/glibc/libmemcached
   * System type: unknown-linux-gnu
   * Host CPU: x86_64
   * C Compiler: cc (GCC) 4.9.3
   * C Flags: -g -O2 -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wunsuffixed-float-constants -Wjump-misses-init -Wno-attributes -Waddress -Wvarargs -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wformat-y2k -Wlogical-op -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wtrampolines -Wundef -Wunsafe-loop-optimizations -funsafe-loop-optimizations -Wclobbered -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -fwrapv -pipe -fPIE -pie -Wsizeof-pointer-memaccess -Wpacked
   * C++ Compiler: c++ (GCC) 4.9.3
   * C++ Flags: -g -O2 -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wno-attributes -Wvarargs -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmaybe-uninitialized -Wmissing-field-initializers -Wlogical-op -Wnon-virtual-dtor -Wnormalized=id -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wtrampolines -Wundef -Wunsafe-loop-optimizations -funsafe-loop-optimizations -Wc++11-compat -Wclobbered -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -Wformat-security -fwrapv -pipe -fPIE -pie -Wsizeof-pointer-memaccess -Wpacked
   * CPP Flags: -fvisibility=hidden
   * LIB Flags:
   * Assertions enabled: no
   * Debug enabled: no
   * Shared: yes
   * Warnings as failure: no
   * SASL support: no
   * make -j: 9
   * VCS checkout: no

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.