Public bug reported:

Currently, only the shared library version of libgtest is compiled with
-fPIC, but the shared library is not distributed. This creates a problem
when linking with other code compiled with -fPIC:

cndougla@cndougla:~/Canonical/ubuntu/xorg-server/xorg-server/build-main/test/integration$
 /bin/bash ../../libtool  --tag=CXX   --mode=link g++   
-DDUMMY_CONF_PATH=/usr/share/xorg/gtest/dummy.conf -g -O0 -fPIE 
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security 
-Werror=format-security -lpthread -Wl,-Bsymbolic-functions -pie -Wl,-z,relro 
-Wl,-Bsymbolic -o integration-test two_window_test.o two_window_touch_test.o 
one_accept.o -lgtest -lxorg-gtest_main -lxorg-gtest   -lXi   -lutouch-evemu   
-lm  -lrt
libtool: link: g++ -DDUMMY_CONF_PATH=/usr/share/xorg/gtest/dummy.conf -g -O0 
-fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security 
-Werror=format-security -Wl,-Bsymbolic-functions -pie -Wl,-z -Wl,relro 
-Wl,-Bsymbolic -o integration-test two_window_test.o two_window_touch_test.o 
one_accept.o  -lpthread -lgtest -lxorg-gtest_main -lxorg-gtest -lXi 
-lutouch-evemu -lm -lrt
/usr/bin/ld: 
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libgtest.a(gtest-all.cc.o): 
relocation R_X86_64_32S against `vtable for 
testing::internal::TestEventRepeater' can not be used when making a shared 
object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libgtest.a: could not read 
symbols: Bad value
collect2: ld returned 1 exit status

** Affects: gtest (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/949244

Title:
  libgtest.a needs to be built with -fPIC

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gtest/+bug/949244/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to