#39 FreeBSD and turbojpeg

Build issue
closed-fixed
DRC
VirtualGL (44)
5
2012-02-08
2012-02-07
m d
No

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!

Discussion

  • m d

    m d - 2012-02-07

    # 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*

     
  • m d

    m d - 2012-02-07

    had to delete CMakeCache.txt

     
  • DRC

    DRC - 2012-02-07

    Use the .a file, not the .la file. VirtualGL is not built with libtool, thus the .la file has no meaning.

     
  • m d

    m d - 2012-02-07

    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

     
  • DRC

    DRC - 2012-02-07

    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.

     
  • m d

    m d - 2012-02-07

    Yes it is working.
    But it doesn't compile vglrun etc. on FreeBSD, that's the next problem.

     
  • DRC

    DRC - 2012-02-07

    Don't understand what you mean. vglrun isn't compiled. It's a script.

     
  • m d

    m d - 2012-02-07

    whatever, it's not being installed on freebsd

     
  • DRC

    DRC - 2012-02-08

    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.

     
  • DRC

    DRC - 2012-02-08

    Patch to address a couple of VGL build issues on FreeBSD

     
  • m d

    m d - 2012-02-08

    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

     
  • DRC

    DRC - 2012-02-08

    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.

     
  • DRC

    DRC - 2012-02-08
    • status: open --> closed-fixed
     
  • DRC

    DRC - 2012-02-27

    Further refinements for FreeBSD support are now in trunk. vglserver_config should work now.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks