[osg-users] [build] GStreamer linker error on OSX El Capitan

Robert Osfield robert.osfield at gmail.com
Fri Aug 12 02:13:38 PDT 2016


Hi Chris,

In general I would say that GStreamer shouldn't be required for OSG
usage under OSX as there are native video plugins already.  Do you
specifically need the GStreamer plugin?  If not you should be able to
disable the build of the plugin by setting the paths that CMake sets
up for GStreamer headers etc. back to empty strings, this will tell
CMake GStreamer isn't there and the plugin won't be built.

If you want the plugin to be built then you'll need to track down
exactly what is going wrong.  From the output you posted the only
error I've spotted so far was:

    ld: library not found for -lgstreamer-1.0

Which suggests to me that the CMake find script is partially setting
up the paths and libs but not completely, or the OSG's plugin isn't
setting up the path to the library as required.  One way to get more
information from the build is to run make thus:

  make VERBOSE=1

Also have a look at the GSTREAMER_* variables that CMake sets up,
you'll find these in CMakeCache.txt.

Robert.


On 11 August 2016 at 20:05, Chris Thomas <cthomas at soasta.com> wrote:
> Hi,
>
> I am pulling OSG 3.4.0 from GIT and attempting to build on OSX El Capitan.
>
> I'm writing a BASH script to do this, as I need to repeat this compile on a number of machines.
> I test this install script on a VMWare OSX El-Capitan machine. Doing so allows me to run the install script over and over, from as clean an install state as I need, until it the OSG compile works.
>
> To complicate matters slightly I already have an existing media platform that my OSG HAS to work with, without disrupting it. That platform already installs gstreamer 1.6.3.
>
>
> So, calling cmake, I get this output...
>
>
> Code:
> cthomass-Mac:osg cthomas$ cmake -DBUILD_OSG_EXAMPLES=1 -DCMAKE_OSX_ARCHITECTURES=x86_64 ../OpenSceneGraph/
> -- The C compiler identification is AppleClang 7.3.0.7030031
> -- The CXX compiler identification is AppleClang 7.3.0.7030031
> -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
> -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
> -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Looking for pthread_create
> -- Looking for pthread_create - found
> -- Found Threads: TRUE
> -- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework
> -- Performing Test GL_HEADER_HAS_GLINT64
> -- Performing Test GL_HEADER_HAS_GLINT64 - Success
> -- Performing Test GL_HEADER_HAS_GLUINT64
> -- Performing Test GL_HEADER_HAS_GLUINT64 - Success
> -- Found Freetype: /usr/local/lib/libfreetype.dylib (found version "2.6.5")
> -- Found JPEG: /usr/local/lib/libjpeg.dylib
> -- Found Jasper: /usr/local/lib/libjasper.dylib (found version "1.900.1")
> -- Found LibXml2: /opt/oblong/deps-64-11/lib64/libxml2.dylib (found version "2.7.8")
> -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
> -- Found GDAL: /usr/local/Cellar/gdal/1.11.3_1/lib/libgdal.dylib
> -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.1")
> -- Checking for module 'gta'
> --   No package 'gta' found
> -- Found CURL: /usr/lib/libcurl.dylib (found version "7.43.0")
> -- Found GStreamer: /opt/oblong/deps-64-11/include/gstreamer-1.0;/opt/oblong/deps-64-11/lib/gstreamer-1.0/include;/opt/oblong/deps-64-11/include/glib-2.0;/opt/oblong/deps-64-11/lib/glib-2.0/include (found version "1.6.3")
> -- Found GLIB: /opt/oblong/deps-64-11/include/glib-2.0;/opt/oblong/deps-64-11/lib64/glib-2.0/include (found version "2.46.2")
> -- Found SDL2: /usr/local/lib/libSDL2main.a;/usr/local/lib/libSDL2.dylib;-framework Cocoa
> -- Found SDL: /usr/local/lib/libSDLmain.a;/usr/local/lib/libSDL.dylib;-framework Cocoa (found version "1.2.15")
> -- Checking for module 'cairo'
> --   Found cairo, version 1.14.6
> -- Checking for module 'poppler-glib'
> --   Found poppler-glib, version 0.45.0
> -- Performing Test POPPLER_HAS_CAIRO
> -- Performing Test POPPLER_HAS_CAIRO - Success
> -- Checking for module 'librsvg-2.0>=2.35'
> --
> -- Checking for module 'gtk+-2.0'
> --   Found gtk+-2.0, version 2.24.30
> -- Checking for module 'gtkglext-x11-1.0'
> --   No package 'gtkglext-x11-1.0' found
> -- Looking for Q_WS_X11
> -- Looking for Q_WS_X11 - not found
> -- Looking for Q_WS_WIN
> -- Looking for Q_WS_WIN - not found
> -- Looking for Q_WS_QWS
> -- Looking for Q_WS_QWS - not found
> -- Looking for Q_WS_MAC
> -- Looking for Q_WS_MAC - found
> -- Looking for QT_MAC_USE_COCOA
> -- Looking for QT_MAC_USE_COCOA - found
> -- Found Qt4: /usr/local/bin/qmake (found version "4.8.7")
> -- Found FLTK: /usr/local/lib/libfltk_images.dylib;/usr/local/lib/libfltk_forms.dylib;/usr/local/lib/libfltk_gl.dylib;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework;/usr/local/lib/libfltk.dylib
> -- Found wxWidgets: -L/usr/local/lib;;;-framework IOKit;-framework Carbon;-framework Cocoa;-framework AudioToolbox;-framework System;-framework OpenGL;-lwx_baseu-3.0;-lwx_osx_cocoau_core-3.0;-lwx_osx_cocoau_gl-3.0;-lwx_baseu_net-3.0 (found version "3.0.2")
> -- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.0.6")
> Disabling QuickTime because it's not supported by the selected SDK 10.11
> -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
> -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Success
> -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS
> -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed
> -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN
> -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed
> -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED
> -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Failed
> -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
> -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Success
> -- Looking for pthread_yield
> -- Looking for pthread_yield - not found
> -- Looking for sched_yield
> -- Looking for sched_yield - found
> -- Looking for pthread_setconcurrency
> -- Looking for pthread_setconcurrency - found
> -- Looking for pthread_getconcurrency
> -- Looking for pthread_getconcurrency - found
> -- Looking for pthread_setaffinity_np
> -- Looking for pthread_setaffinity_np - not found
> -- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY
> -- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY - Failed
> -- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY
> -- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY - Failed
> -- Looking for gethostbyname in nsl
> -- Looking for gethostbyname in nsl - not found
> -- Looking for socket in socket
> -- Looking for socket in socket - not found
>
> The build system is configured to install libraries to /usr/local/lib
> Your applications may not be able to find your installed libraries unless you:
>     set your LD_LIBRARY_PATH (user specific) or
>     update your ld.so configuration (system wide)
> -- Configuring done
> CMake Warning (dev):
>   Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
>   --help-policy CMP0042" for policy details.  Use the cmake_policy command to
>   set the policy and suppress this warning.
>
>   MACOSX_RPATH is not specified for the following targets:
>
>    OpenThreads
>    osg
>    osgAnimation
>    osgDB
>    osgFX
>    osgGA
>    osgManipulator
>    osgParticle
>    osgPresentation
>    osgQt
>    osgShadow
>    osgSim
>    osgTerrain
>    osgText
>    osgUI
>    osgUtil
>    osgViewer
>    osgVolume
>    osgWidget
>
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
>
>
> Anyway, this mostly seems to be positive. So doing a make -j8, the build proceeds as expected, until it hits this wall....
>
> Code:
>
> [ 33%] Linking CXX shared module ../../../lib/osgPlugins-3.4.0/osgdb_gstreamer.so
> ld: library not found for -lgstreamer-1.0
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[2]: *** [lib/osgPlugins-3.4.0/osgdb_gstreamer.so] Error 1
> make[1]: *** [src/osgPlugins/gstreamer/CMakeFiles/osgdb_gstreamer.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
>
>
>
> And thats it, the build will fail shortly after, once the other 7 threads complete.
>
> I have also tried the same process using master/head, with the same error. CMake seems to find the gstreamer lib/headers etc, but the make always fails to link it.
>
>
> Thank you!
>
> Cheers,
>
> Chris
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68351#68351
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list