I installed libturbojpeg from ports and give the correct path, nevertheless error:
VirtualGL-2.3 > cmake -G "Unix Makefiles" -DTJPEG_LIBRARY=/usr/local/lib/libturbojpeg.la
-- CMAKE_BUILD_TYPE = Release
-- VERSION = 2.3, BUILD = 20120207
-- CMAKE_INSTALL_PREFIX = /opt/VirtualGL
-- VGL_BINDIR = /opt/VirtualGL/bin
-- VGL_DOCDIR = /opt/VirtualGL/doc
-- 64-bit build
-- Linking with static libstdc++:
/usr/lib/../lib/libstdc++.a
-- Enabling X Video support
-- TJPEG_INCLUDE_DIR = /usr/local/include
CMake Error at cmakescripts/FindTurboJPEG.cmake:56 (message):
Could not link with TurboJPEG library /usr/local/lib/libturbojpeg.la. If
it is installed in a different place, then set TJPEG_LIBRARY accordingly.
Call Stack (most recent call first):
CMakeLists.txt:250 (include)
-- Configuring incomplete, errors occurred!
# ls -l /usr/local/lib/libturbojpeg.*
-rw-r--r-- 1 root wheel 395924 7 Feb 12:22 /usr/local/lib/libturbojpeg.a
-rwxr-xr-x 1 root wheel 940 7 Feb 12:22 /usr/local/lib/libturbojpeg.la*
-rwxr-xr-x 1 root wheel 276063 7 Feb 12:22 /usr/local/lib/libturbojpeg.so*
had to delete CMakeCache.txt
Use the .a file, not the .la file. VirtualGL is not built with libtool, thus the .la file has no meaning.
didn't work with .a either and the default went for a .la I think. But it was the old CMakeCache.txt. It should be neglected when I change variables
Huh? So is it working now or not? The default is /opt/libjpeg-turbo/lib64/libturbojpeg.a on 64-bit systems or /opt/libjpeg-turbo/lib32/libturbojpeg.a on 32-bit systems. This can easily be verified by reading cmakescripts/FindTurboJPEG.cmake.
Yes it is working.
But it doesn't compile vglrun etc. on FreeBSD, that's the next problem.
Don't understand what you mean. vglrun isn't compiled. It's a script.
whatever, it's not being installed on freebsd
Because vglrun is only installed if the server components are built (that is, if the VGL_BUILDSERVER CMake variable is set to 1.) This is not the default on FreeBSD because the VirtualGL server components have never, to my knowledge, been tested on FreeBSD.
So, I tried to test them. There were a few build problems, which should be fixed by the attached patch. Also note that you can't use the FreshPorts version of libjpeg-turbo, since it wasn't built with PIC. Instead, what I did was:
-- grab the latest tarball of libjpeg-turbo
-- untar it
-- cd libjpeg-turbo*
-- ./configure --with-pic
-- make install (which will place it in /opt/libjpeg-turbo)
-- configure the latest VirtualGL code with
cmake -DVGL_BUILDSERVER=1
(you don't need to specify -DTJPEG_LIBRARY if libjpeg-turbo is installed in /opt/libjpeg-turbo.)
-- make install (this places VirtualGL in /opt/VirtualGL)
The build works, but given that I'm running BSD in a VM, I can't actually test whether VirtualGL actually works properly. Theoretically, vglrun should work, but I would be surprised if some of the other scripts (vglserver_config, in particular) fully work.
Patch to address a couple of VGL build issues on FreeBSD
thanks, the server is working and tested (vglrun freebsd + vglclient linux).
But I had to hack into rr/ instead of server/ in 2.30
just had to change the turbojpeg port a little bit to add -fPIC
OK, good enough for me. I've checked in the patch to subversion trunk. If you have any further issues with it, let me know.
Further refinements for FreeBSD support are now in trunk. vglserver_config should work now.