Issue with Xerces-C

Apple clang version 15.0.0, cmake version 3.29.5, geant4_version: 11.2.0

I am having an issue with Xerces-C in Geant4. It was working fine before I decided to update and upgrade my Homebrew packages. After updating, I am encountering the following error:

CMake Error at /opt/homebrew/Cellar/cmake/3.29.5/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Failed to find XercesC (missing: XercesC_VERSION) (Required is at least version "3.2.4") Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.29.5/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /opt/homebrew/Cellar/cmake/3.29.5/share/cmake/Modules/FindXercesC.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) /opt/homebrew/Cellar/cmake/3.29.5/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) /Users/geant4/install/lib/cmake/Geant4/Geant4Config.cmake:305 (find_dependency) CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!

To fix this, I tried configuring Geant4 with the new Xerces-C version using the following CMake command in the build directory:


However, I still encounter the same issue. How can I resolve this problem?
Also, I have tried with clearing the cmake cache.

Thank you!

Is the first error from trying to configure an application using Geant4? If so you could try removing the file /Users/geant4/install/lib/cmake/Geant4/Geant4PackageCache.cmake if it’s there. Try configuring again after that.

For the second error, if that’s building Geant4 itself then the problem’s a bit less obvious. I’ve the same homebrew setup and formulae, and can configure v11.2.0 without an issue. Could you post the full error messages please?

Thank you for response!
Yes, deleting the Geant4PackageCache.cmake help me get rid of initial issue with Xerces-C, but now I am having a more issue with the version of Qt5. The geant4 is not reading the qt5 properly. I tried with adding qt@5 into cmake build but it still did not worked.
Here is what I tried:

cmake \
  -DCMAKE_INSTALL_PREFIX=/Users/rohit/geant4/install \
  -DXercesC_ROOT=/opt/homebrew/Cellar/xerces-c/3.2.5 \
  -DQt5_DIR=/opt/homebrew/opt/qt@5/lib/cmake/Qt5 \

Error “Too many error emitted, stopping now.”

I am not sure of the issue but I removed all build directory and re-ran the same command, it worked fine this time.
Could not point the exact issue though.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.