When I compile and run the BasicApp sample, I get a segmentation fault. The output from the lldb debugger is as follows:
dedmunds ~/postdoc/libraries/Cinder_build/Debug/BasicApp/BasicApp.app/Contents/MacOS $ lldb BasicApp
(lldb) target create "BasicApp"
Current executable set to ‘BasicApp’ (x86_64).
(lldb) run
Process 25083 launched: ‘/Users/dedmunds/postdoc/libraries/Cinder_build/Debug/BasicApp/BasicApp.app/Contents/MacOS/BasicApp’ (x86_64)
error: libcinder.a(Platform.cpp.o) failed to load objfile for /Users/dedmunds/postdoc/libraries/Cinder/lib/macosx/Debug/libcinder.a
error: libcinder.a(PlatformCocoa.cpp.o) failed to load objfile for /Users/dedmunds/postdoc/libraries/Cinder/lib/macosx/Debug/libcinder.a
Process 25083 stopped
a crash report should ideally contain, at the very least, your exact OS version and a backtrace of the segfault in debug mode in order to be more helpful.
In any case, make sure that you remove completely the boost include folder that ships with Cinder in case you did a recursive clone before enabling the CINDER_BOOST_USE_SYSTEM option. Other than that I cannot think of something else if you have the development versions of boost-system and boost-filesystem installed through apt.
If this doesn’t work please provide the additional info and hopefully we can see what is happening there.
cd build && cmake … -DCINDER_BOOST_USE_SYSTEM:BOOL=true
– The C compiler identification is GNU 5.4.0
– The CXX compiler identification is Clang 3.8.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /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: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
– Looking for gethostbyname
– Looking for gethostbyname - found
– Looking for connect
– Looking for connect - found
– Looking for remove
– Looking for remove - found
– Looking for shmat
– Looking for shmat - found
– Looking for IceConnectionNumber in ICE
– Looking for IceConnectionNumber in ICE - found
– Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
– Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version “1.2.8”)
– Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version “7.47.0”)
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29.1”)
– Checking for module ‘fontconfig’
– Found fontconfig, version 2.11.94
– Found Fontconfig: /usr/lib/x86_64-linux-gnu/libfontconfig.so
– Found MPG123: /usr/lib/x86_64-linux-gnu/libmpg123.so (found version “1.22.4”)
– using MPG123 headers at: /usr/include
– Found SNDFILE: /usr/lib/x86_64-linux-gnu/libsndfile.so (found version “1.0.25”)
– using SNDFILE headers at: /usr/include
– Found GLIB: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include (found version “2.48.2”)
– Checking for module ‘gstreamer-1.0’
– Found gstreamer-1.0, version 1.8.3
– Checking for module ‘gstreamer-base-1.0’
– Found gstreamer-base-1.0, version 1.8.3
– Checking for module ‘gstreamer-app-1.0’
– Found gstreamer-app-1.0, version 1.8.3
– Checking for module ‘gstreamer-audio-1.0’
– Found gstreamer-audio-1.0, version 1.8.3
– Checking for module ‘gstreamer-fft-1.0’
– Found gstreamer-fft-1.0, version 1.8.3
– Checking for module ‘gstreamer-gl-1.0’
– Found gstreamer-gl-1.0, version 1.8.3
– Checking for module ‘gstreamer-mpegts-1.0>=1.4.0’
– Found gstreamer-mpegts-1.0, version 1.8.3
– Checking for module ‘gstreamer-pbutils-1.0’
– Found gstreamer-pbutils-1.0, version 1.8.3
– Checking for module ‘gstreamer-tag-1.0’
– Found gstreamer-tag-1.0, version 1.8.3
– Checking for module ‘gstreamer-video-1.0’
– Found gstreamer-video-1.0, version 1.8.3
– Found GStreamer: GSTREAMER_INCLUDE_DIRS;GSTREAMER_LIBRARIES;GSTREAMER_VERSION;GSTREAMER_BASE_INCLUDE_DIRS;GSTREAMER_BASE_LIBRARIES
– Boost version: 1.55.0
– Found the following Boost libraries:
– system
– filesystem
– Performing Test COMPILER_SUPPORTS_CXX14
– Performing Test COMPILER_SUPPORTS_CXX14 - Success
– Performing Test COMPILER_SUPPORTS_CXX11
– Performing Test COMPILER_SUPPORTS_CXX11 - Success
– Configuring done
– Generating done
– Build files have been written to: /home/parallels/Cinder/build
make -j4
cd …
cd samples/BasicApp/proj/cmake
mkdir build && cd build
cmake …
– The C compiler identification is GNU 5.4.0
– The CXX compiler identification is Clang 3.8.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /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: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Configuring done
– Generating done
– Build files have been written to: /home/parallels/Cinder/samples/BasicApp/proj/cmake/build
make
Scanning dependencies of target BasicApp
[ 50%] Building CXX object CMakeFiles/BasicApp.dir/home/parallels/Cinder/samples/BasicApp/src/BasicApp.cpp.o
[100%] Linking CXX executable Debug/BasicApp/BasicApp
/usr/bin/ld: warning: libboost_system.so.1.58.0, needed by //usr/lib/x86_64-linux-gnu/libmirclient.so.9, may conflict with libboost_system.so.1.55.0
/usr/bin/ld: warning: libboost_filesystem.so.1.58.0, needed by //usr/lib/x86_64-linux-gnu/libmircommon.so.7, may conflict with libboost_filesystem.so.1.55.0
[100%] Built target BasicApp
./Debug/BasicApp/BasicApp
Rendering with OpenGL Core Profile 3.2
(glfw:error): error=65543, desc=GLX: An OpenGL profile requested but GLX_ARB_create_context_profile is unavailable
Segmentation fault (core dumped)
This is a completely different game and issue, not related to Boost at all. The problem here lies on context creation due to the fact that you are trying to run the app inside the VM. Are you sure that Parallels supports OpenGL Core Profile on the Guest OS?
VirtualBox for example did not, last time I checked and VMWare does after following a few steps that are described in this wiki. The Compiling Cinder part is out-of-date so you can ignore that and follow the official guide but the notes for setting up VMWare with Core Profile support should be still relevant.
HTH,
Petros
P.S Irrelevant with the issue at hand but it seems also that you have multiple versions of Boost installed i.e 1.55 & 1.58 - Ideally you should pick one and stick with it.
Just to jump in here. I found this a few years ago (though using parallels and windows vm). It was because parallels didnt support the OpenGL version cinder required (as Petros mentioned). I switched to VMware Fusion for virtualisation and I could compile cinder projects fine after that.
There may be a way to manually target the lower version of OpenGL that parallels supports (see cinder RendererGl::Options().version options in the app macro). But I cant remember having much success with parallels so just switched.
NB. It may also be something else entirely as I haven’t used Cinder with linux but Parallels should definitely be an amber flag.