When compiling graphics/osg with GSTREAMER options enabled and TRYBROKEN set (as the option is broken, it cannot find the header), clang dies with: cd /wrkdirs/usr/ports/graphics/osg/work/.build/src/osgPlugins/gstreamer && /usr/local/libexec/ccache/c++ -Dosgdb_gstreamer_EXPORTS -I/wrkdirs/usr/ports/graphics/osg/work/OpenSceneGraph-3.4.0/include -I/usr/local/include -I/wrkdirs/usr/ports/graphics/osg/work/.build/include -I/usr/local/include/gstreamer-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -Wparentheses -Wno-long-long -Wno-import -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -Wno-overloaded-virtual -Wno-variadic-macros -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -o CMakeFiles/osgdb_gstreamer.dir/ReaderWriterGStreamer.o -c /wrkdirs/usr/ports/graphics/osg/work/OpenSceneGraph-3.4.0/src/osgPlugins/gstreamer/ReaderWriterGStreamer.cpp In file included from /wrkdirs/usr/ports/graphics/osg/work/OpenSceneGraph-3.4.0/src/osgPlugins/gstreamer/ReaderWriterGStreamer.cpp:14: In file included from /wrkdirs/usr/ports/graphics/osg/work/OpenSceneGraph-3.4.0/src/osgPlugins/gstreamer/GStreamerImageStream.hpp:4: In file included from /usr/local/include/gstreamer-1.0/gst/app/gstappsink.h:23: In file included from /usr/local/include/gstreamer-1.0/gst/gst.h:35: In file included from /usr/local/include/gstreamer-1.0/gst/gstbin.h:27: /usr/local/include/gstreamer-1.0/gst/gstelement.h:55:10: fatal error: 'gst/gstconfig.h' file not found #include <gst/gstconfig.h> ^ Assertion failed: (IdealIndex < NumIdealInits && "initializer not found in initializer list"), function DiagnoseBaseOrMemInitializerOrder, file /usr/src/lib/clang/libclangsema/../../../contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp, line 4160. c++: error: unable to execute command: Abort trap (core dumped) c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: x86_64-unknown-freebsd11.0 Thread model: posix InstalledDir: /usr/bin c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. c++: error: unable to execute command: Abort trap (core dumped) c++: note: diagnostic msg: Error generating preprocessed source(s). *** [src/osgPlugins/gstreamer/CMakeFiles/osgdb_gstreamer.dir/ReaderWriterGStreamer.o] Error code 254 Note c++: note: diagnostic msg: Error generating preprocessed source(s), seems like preprocessor-related issue.
Can you please disable ccache and try again? This might allow to get a preprocessed test case and shell script.
Hm, interesting, I've tried this with clang 3.8.0 and 3.9.1, but without ccache, and in both cases I just get "file not found" and the build quits.
Ah and with cccache it indeed gives an assertion. This also happens with 3.9.1.
So is ccache the problem?
Though no, it's still assert from llvm.
It is an assertion somewhere in clang, so it must be something in the arguments that ccache is passing to it. But I'm unsure now, I can't reproduce it consistently anymore. Clearing the cache doesn't seem to help, it doesn't crash for me at the moment. :( I would need the CCACHE_LOGFILE from a 'bad' invocation, to be able to invoke the clang executable with exactly the right arguments.