I try to compile a standalone with a GUI using gcc in the codeblocks IDE. When running the code with root using root complex_testgui.cpp, everything works without an issue. Also compilation works without any problems. But when I try to run the executable, I get the error:
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007fb8c34a5687 in __GI___waitpid (pid=16257, stat_loc=stat_loc
entry=0x7ffca816c7a8, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x00007fb8c3410067 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
#2 0x00007fb8c43e7ef3 in TUnixSystem::StackTrace() () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#3 0x00007fb8c43ea8e4 in TUnixSystem::DispatchSignals(ESignals) () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#4 <signal handler called>
#5 0x00007fb8bcf84783 in TClingCallFunc::SetArg(long) () from /home/timo/root-6.20.00/mybuild/lib/libCling.so
#6 0x00007fb8c428b60f in TApplication::LoadGraphicsLibs() () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#7 0x00007fb8c428a9fc in TApplication::InitializeGraphics() () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#8 0x00007fb8c428fd93 in TApplication::TApplication(char const*, int*, char**, void*, int) () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#9 0x000055a318a113e8 in main (argc=1, argv=0x7ffca816f5b8) at /home/timo/Schreibtisch/tiffanalysis/Tiff_analysis/complex_testgui.cpp:1022
===========================================================
The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x00007fb8bcf84783 in TClingCallFunc::SetArg(long) () from /home/timo/root-6.20.00/mybuild/lib/libCling.so
#6 0x00007fb8c428b60f in TApplication::LoadGraphicsLibs() () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#7 0x00007fb8c428a9fc in TApplication::InitializeGraphics() () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#8 0x00007fb8c428fd93 in TApplication::TApplication(char const*, int*, char**, void*, int) () from /home/timo/root-6.20.00/mybuild/lib/libCore.so
#9 0x000055a318a113e8 in main (argc=1, argv=0x7ffca816f5b8) at /home/timo/Schreibtisch/tiffanalysis/Tiff_analysis/complex_testgui.cpp:1022
===========================================================
The line /tiffanalysis/Tiff_analysis/complex_testgui.cpp:1022 is simply
TApplication theApp("App", &argc, argv);
I did build the root version 6.20/00 myself. Probably something went wrong there. When I navigate to the directory /home/timo/root-6.20.00/mybuild/ and type cmake …, I get the following output with a lot of warnings:
-- ROOT default compression algorithm: zlib
-- Found GCC. Major version 7, minor version 5
-- Found a 64bit system
-- Found GNU compiler collection
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: Release (flags = '-O3 -DNDEBUG')
-- Compiler Flags: -O3 -DNDEBUG -std=c++11 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.4 included in ROOT itself
-- Looking for X11
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Downloading and building GSL version 2.5
-- Looking for python
-- Looking for OpenGL
-- Looking for GLEW
-- Looking for LibXml2
-- Looking for MySQL
-- Looking for FFTW3
-- Looking for CFITSIO
-- Looking for TBB
-- Looking for VDT
-- Looking for BLAS for optional parts of TMVA
-- A library with BLAS API not found. Please specify library location.
-- Using GSL CBLAS for optional parts of TMVA
-- Building LLVM in 'Release' mode.
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- SysLibs: rt;dl;tinfo;-lpthread;/usr/lib/x86_64-linux-gnu/libz.so
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 5.0.0
-- Cling version (from VERSION file): ROOT_0.7~dev
-- Cling will look for C++ headers in '/usr/include/c++/7:/usr/include/x86_64-linux-gnu/c++/7:/usr/include/c++/7/backward' at runtime.
-- And then fallback to: 'x86_64-linux-gnu-g++-7'
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
-- Performing Test found_stdindexsequence
-- Performing Test found_stdindexsequence - Failed
-- Enabled support for: asimage builtin_afterimage builtin_clang builtin_gl2ps builtin_gsl builtin_llvm builtin_lz4 builtin_lzma builtin_xxhash builtin_zstd clad dataframe exceptions fftw3 fitsio gdml gsl_shared http imt mathmore mlp minuit2 mysql opengl python roofit runtime_cxxmodules shared ssl tmva tmva-cpu spectrum vdt x11 xml
-- Configuring done
CMake Error in math/vecops/CMakeLists.txt:
Target "ROOTVecOps" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/timo/root-6.20.00/mybuild/include"
which is prefixed in the build directory.
CMake Error in math/vecops/CMakeLists.txt:
Target "ROOTVecOps" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/timo/root-6.20.00/mybuild/include"
which is prefixed in the build directory.Target "ROOTVecOps"
INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/timo/root-6.20.00/mybuild/include"
which is prefixed in the source directory.
CMake Error in tmva/tmva/CMakeLists.txt:
Target "TMVA" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/timo/root-6.20.00/mybuild/include"
which is prefixed in the build directory.
CMake Error in tmva/tmva/CMakeLists.txt:
Target "TMVA" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/timo/root-6.20.00/mybuild/include"
which is prefixed in the build directory.Target "TMVA"
INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/timo/root-6.20.00/mybuild/include"
which is prefixed in the source directory.
CMake Warning at cmake/modules/RootMacros.cmake:760 (add_library):
Cannot generate a safe runtime search path for target Genetic because there
is a cycle in the constraint graph:
dir 0 is [/home/timo/root-6.20.00/mybuild/lib]
dir 1 must precede it due to runtime library [libvdt.so]
dir 1 is [/usr/local/lib]
dir 0 must precede it due to runtime library [libTMVA.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootMacros.cmake:1145 (ROOT_LINKER_LIBRARY)
math/genetic/CMakeLists.txt:12 (ROOT_STANDARD_LIBRARY_PACKAGE)
CMake Warning at cmake/modules/RootMacros.cmake:760 (add_library):
Cannot generate a safe runtime search path for target ROOTVecOps because
there is a cycle in the constraint graph:
dir 0 is [/home/timo/root-6.20.00/mybuild/lib]
dir 1 must precede it due to runtime library [libvdt.so]
dir 1 is [/usr/local/lib]
dir 0 must precede it due to runtime library [libCore.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootMacros.cmake:1145 (ROOT_LINKER_LIBRARY)
math/vecops/CMakeLists.txt:16 (ROOT_STANDARD_LIBRARY_PACKAGE)
CMake Warning at cmake/modules/RootMacros.cmake:760 (add_library):
Cannot generate a safe runtime search path for target ROOTDataFrame because
there is a cycle in the constraint graph:
dir 0 is [/home/timo/root-6.20.00/mybuild/lib]
dir 1 must precede it due to runtime library [libvdt.so]
dir 1 is [/usr/local/lib]
dir 0 must precede it due to runtime library [libTreePlayer.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootMacros.cmake:1145 (ROOT_LINKER_LIBRARY)
tree/dataframe/CMakeLists.txt:30 (ROOT_STANDARD_LIBRARY_PACKAGE)
CMake Warning at cmake/modules/RootMacros.cmake:760 (add_library):
Cannot generate a safe runtime search path for target PyROOT because there
is a cycle in the constraint graph:
dir 0 is [/home/timo/root-6.20.00/mybuild/lib]
dir 1 must precede it due to runtime library [libvdt.so]
dir 1 is [/usr/local/lib]
dir 0 must precede it due to runtime library [libMathCore.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootMacros.cmake:1145 (ROOT_LINKER_LIBRARY)
bindings/pyroot/CMakeLists.txt:11 (ROOT_STANDARD_LIBRARY_PACKAGE)
CMake Warning at cmake/modules/RootMacros.cmake:760 (add_library):
Cannot generate a safe runtime search path for target TMVA because there is
a cycle in the constraint graph:
dir 0 is [/home/timo/root-6.20.00/mybuild/lib]
dir 1 must precede it due to runtime library [libvdt.so]
dir 1 is [/usr/local/lib]
dir 0 must precede it due to runtime library [libMinuit.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootMacros.cmake:1145 (ROOT_LINKER_LIBRARY)
tmva/tmva/CMakeLists.txt:50 (ROOT_STANDARD_LIBRARY_PACKAGE)
CMake Warning at cmake/modules/RootMacros.cmake:760 (add_library):
Cannot generate a safe runtime search path for target TMVAGui because there
is a cycle in the constraint graph:
dir 0 is [/home/timo/root-6.20.00/mybuild/lib]
dir 1 must precede it due to runtime library [libvdt.so]
dir 1 is [/usr/local/lib]
dir 0 must precede it due to runtime library [libTreeViewer.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootMacros.cmake:1145 (ROOT_LINKER_LIBRARY)
tmva/tmvagui/CMakeLists.txt:12 (ROOT_STANDARD_LIBRARY_PACKAGE)
-- Generating done
-- Build files have been written to: /home/timo/root-6.20.00/mybuild
Any ideas, what the problem is?
_ROOT Version: 6.20/00
_Platform: ubuntu18.04.4
_Compiler:linuxx8664gcc