Install Error: RELATIVE_PATH called with incorrect number of arguments

Hello community,

I am work to install Geant4 on a Ubuntu desktop (v20.04.1) on Windows 10 using WSL, but cannot interpret what the error is.

CMake Error at: cmake/Modules/G4ConfigurePkgConfigHelpers.cmake:381 (file):
file RELATIVE_PATH called with incorrect number of arguments
Call Stack (most recent call first):
cmake/Modules/G4CMakeMain.cmake:101 (include)
CMakeLists.txt:51 (include)

I’d greatly appreciate any help! (shown below with build options)

Name@Desktop:~/MC/geant4.10.07/geant4-build$ cmake -DCMAKE_INSTALL_PREFIX= β€œ/home/path/to/MC/geant4.10.07/geant4-install” -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_QT=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_USE_SYSTEM_ZLIB=ON β€œ/home/path/to/MC/geant4.10.07”
– The C compiler identification is GNU 9.3.0
– The CXX compiler identification is GNU 9.3.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
– Performing Test HAVE_TLS
– Performing Test HAVE_TLS - Success
– Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version β€œ1.2.11”)
– Found XercesC: /usr/local/lib/libxerces-c.so (found version β€œ3.2.3”)
– Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
– Found X11: /usr/include
– 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
– Configuring download of missing dataset G4NDL (4.6)
– Configuring download of missing dataset G4EMLOW (7.13)
– Configuring download of missing dataset PhotonEvaporation (5.7)
– Configuring download of missing dataset RadioactiveDecay (5.6)
– Configuring download of missing dataset G4PARTICLEXS (3.1)
– Configuring download of missing dataset G4PII (1.3)
– Configuring download of missing dataset RealSurface (2.2)
– Configuring download of missing dataset G4SAIDDATA (2.0)
– Configuring download of missing dataset G4ABLA (3.1)
– Configuring download of missing dataset G4INCL (1.0)
– Configuring download of missing dataset G4ENSDFSTATE (2.3)
– Looking for dlfcn.h
– Looking for dlfcn.h - found
– Looking for fcntl.h
– Looking for fcntl.h - found
– Looking for inttypes.h
– Looking for inttypes.h - found
– Looking for memory.h
– Looking for memory.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stdlib.h
– Looking for stdlib.h - found
– Looking for strings.h
– Looking for strings.h - found
– Looking for string.h
– Looking for string.h - found
– Looking for sys/stat.h
– Looking for sys/stat.h - found
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for unistd.h
– Looking for unistd.h - found
– Looking for getpagesize
– Looking for getpagesize - found
– Looking for bcopy
– Looking for bcopy - found
– Looking for memmove
– Looking for memmove - found
– Looking for mmap
– Looking for mmap - found
– Looking for 4 include files stdlib.h, …, float.h
– Looking for 4 include files stdlib.h, …, float.h - found
– Check if the system is big endian
– Searching 16 bit integer
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of unsigned short
– Check size of unsigned short - done
– Using unsigned short
– Check if the system is big endian - little endian
– Looking for off_t
– Looking for off_t - not found
– Looking for size_t
– Looking for size_t - not found
– 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
CMake Error at cmake/Modules/G4ConfigurePkgConfigHelpers.cmake:381 (file):
file RELATIVE_PATH called with incorrect number of arguments
Call Stack (most recent call first):
cmake/Modules/G4CMakeMain.cmake:101 (include)
CMakeLists.txt:51 (include)

– The following Geant4 features are enabled:
GEANT4_BUILD_CXXSTD: Compiling against C++ Standard β€˜11’
GEANT4_BUILD_MULTITHREADED: Build multithread enabled libraries
GEANT4_BUILD_TLS_MODEL: Building with TLS model β€˜global-dynamic’
GEANT4_USE_SYSTEM_ZLIB: Using system zlib library
GEANT4_USE_GDML: Building Geant4 with GDML support
GEANT4_USE_QT: Build Geant4 with Qt support
GEANT4_USE_OPENGL_X11: Build Geant4 OpenGL driver with X11 support

– Configuring incomplete, errors occurred!
See also β€œ/home/path/to/MC/geant4.10.07/geant4-build/CMakeFiles/CMakeOutput.log”.
See also β€œ/home/path/to/MC/geant4.10.07/geant4-build/CMakeFiles/CMakeError.log”.

Do you really have a folder /home/path/to? It’s just a way of telling you to put something in there that is relevant to you!! In this case, I think ~/MC. And you have to create a directory geant4-install in ~/MC/geant4.10.07.

I suggest you read some basic primer about Unix.

Hey John, thanks for the note.

I do not actually have a home dir path called path/to, I just replaced my desktop name rather than blank it out for a screenshot.

The setup I used was based on this publication here for a Geant install

Just like you mentioned, within GEANT4.10.07 I have geant4-build and geant4-install, I have used Geant quite a bit on another machine and built applications. I run cmake from build with install as the target. I see that info would have been useful to include here.

Thanks

OK. But we cannot vouch for installation procedures advertised by others. Please try the installation procedure as set out in the Installation Guide.

I had the same problem and my problem is solved by deleting the space after equal sign in this command:
cmake -DCMAKE_INSTALL_PREFIX=[NO SPACE]/path/to/geant4.10.07-install /path/to/geant4.10.07

1 Like