On 06/14/2013 11:50 AM, First Last wrote:
one month ago I was able after that to compile, today I tried to compile
these sources :
http://virtualgl.sourceforge.net/vgl.nightly/VirtualGL-2.3.3.tar.gz

and get this error :
Linking CXX shared library ../lib/librrfaker.so
/usr/bin/ld:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../lib/libturbojpeg.a(libturbojpeg_la-turbojpeg.o):
relocation R_X86_64_32 against `.data' can not be used when making a
shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../lib/libturbojpeg.a:
could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/librrfaker.so] Error 1
make[1]: *** [server/CMakeFiles/rrfaker.dir/all] Error 2
make: *** [all] Error 2

I've been carrying the attached patch to work around it till I get time to look at the implications of building with -fPIC.

Add to your cmake args:   -DUSE_SHARED_TJPEG_LIBRARY=y

-Nathan

>From 0c9afc4bdd3bf5ff49019b8b4251a700015946aa Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nk...@opentext.com>
Date: Mon, 8 Apr 2013 14:04:44 -0400
Subject: [PATCH] work around build error on amd64 Debian

-DUSE_SHARED_TJPEG_LIBRARY=y

Relocation  R_X86_64_32 against `.data' can not be used when making a shared object
---
 cmakescripts/FindTurboJPEG.cmake |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cmakescripts/FindTurboJPEG.cmake b/cmakescripts/FindTurboJPEG.cmake
index 8d419f3..90dc20a 100644
--- a/cmakescripts/FindTurboJPEG.cmake
+++ b/cmakescripts/FindTurboJPEG.cmake
@@ -33,7 +33,11 @@ if(WIN32)
 		set(DEFAULT_TJPEG_LIBRARY c:\\libjpeg-turbo\\lib\\turbojpeg-static.lib)
 	endif()
 else()
-	set(DEFAULT_TJPEG_LIBRARY /opt/libjpeg-turbo/lib${BITS}/libturbojpeg.a)
+	if(USE_SHARED_TJPEG_LIBRARY)
+		set(DEFAULT_TJPEG_LIBRARY /opt/libjpeg-turbo/lib${BITS}/libturbojpeg.so)
+	else()
+		set(DEFAULT_TJPEG_LIBRARY /opt/libjpeg-turbo/lib${BITS}/libturbojpeg.a)
+	endif() 
 endif()
 
 set(TJPEG_LIBRARY ${DEFAULT_TJPEG_LIBRARY} CACHE PATH
-- 
1.7.10.4

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users

Reply via email to