About B1 sample compilation problems

Hello, everyone, after I have installed Geant4, I want to try to use the B1 example for testing, but when I execute cmake to compile, the following error appears. May I ask where I have not installed Geant4?

– The C compiler identification is GNU 8.4.1
– The CXX compiler identification is GNU 8.4.1
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found EXPAT: /usr/lib64/libexpat.so (found suitable version “2.2.5”, minimum required is “2.2.5”)
– Found ZLIB: /usr/lib64/libz.so (found suitable version “1.2.11”, minimum required is “1.2.11”)
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Check if compiler accepts -pthread
– Check if compiler accepts -pthread - yes
– Found Threads: TRUE
– Found XercesC: /usr/local/lib64/libxerces-c.so (found suitable version “3.2.3”, minimum required is “3.2.3”)
– Found X11: /usr/include
– Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
– Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/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 OpenGL: /usr/lib64/libOpenGL.so
– Found Motif: /usr/lib64/libXm.so
– Found Geant4: /opt/geant4/obj/Geant4Config.cmake (found version “11.0.0”)
– Configuring done
CMake Error at CMakeLists.txt:35 (add_executable):
Target “exampleB1” links to target “Geant4::G4ToolsSG” but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
– Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

looks like you have installed version 11, which is „beta“ at the moment. my guess is that you will have better luck if you try with version 10.7…

maybe example B1 is not (yet) compatible with the future version?

Thank you very much, I will reinstall geant4 with version 10.7!