Imported target "Geant4::G4OpenGL" includes non-existent path

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

Geant4 Version: 11.0.2
Operating System: MacOs
Compiler/Version: Xcode
CMake Version: 3.27.5

Hello, I tried to run a project and thois error showed up. :


Which version of macOS is this, and have you upgraded this since you built/installed Geant4 (or the Xcode version)? I suspect that this is the Geant4PackageCache.cmake file keeping a now uninstalled path. You could try deleting that file and seeing if that helps - it’s not critical to the functionality.

macOS : Ventura 13.5.2, and no i didn’t upgrade it

I’d still suspect this is due to Xcode having updated with the Geant4 install having been done with the previous version. So the solution is:

  1. Confirm that /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs does not contain a MacOSX13.3.sdk subdirectory (I’m guessing there will be MacOSX13.5.sdk).
  2. Locate the file Geant4PackageCache.txt in your Geant4 install area and delete it.

Step 2 should fix the issue.

Yes, that was the issue
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs does not contain a MacOSX13.3.sdk, I just changed to MacOSX14.2.sdk
Thank you

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