Both of you are misunderstanding a couple of things: (1) It isn't necessary to extend the CMake build system in order to link dynamically with TurboJPEG. All you have to do is override the TJPEG_LIBRARY variable. This is explained in BUILDING.txt. If, for instance, you are building on a platform that supplies /usr/lib[64]/libturbojpeg.so, then you may want to set TJPEG_LIBRARY to "-lturbojpeg" in order to link with the system-supplied dynamic library version of it.
(2) If TJPEG_LIBRARY is not overridden, then it defaults to linking with libturbojpeg.a from the *official* libjpeg-turbo binary distribution: https://sourceforge.net/projects/libjpeg-turbo/files/1.3.0/, because the version of libturbojpeg.a in the official libjpeg-turbo binaries is built with -fPIC. The version of libturbojpeg.a shipped with an O/S distribution is likely not built with -fPIC. Thus, if you want to build a monolithic version of VirtualGL that does not depend on libturbojpeg.so, then the easiest way is to install the "official" libjpeg-turbo package prior to building VirtualGL. You can of course also build libjpeg-turbo from source using -fPIC. On 6/14/13 12:12 PM, Nathan Kidd wrote: > 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 > > > > ------------------------------------------------------------------------------ > 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 > ------------------------------------------------------------------------------ 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