Running Basic Examples After Xcode Upgrade

Having recently installed GEANT4, I am still familiarizing myself with it by running the basic examples. I was able to run examples B1 and B2a. However, an update to Xcode was available and I updated it. After the update, I was not able to run B2b, or even re-run B2a. Can anyone tell me if there is anything I need to do after an Xcode update? The following is what happened when I tried to re-run B2a.

(base) Jamess-iMac:B2a jamesbowen$ ./exampleB2a
dyld: Library not loaded: /opt/X11/lib/libGL.1.dylib
Referenced from: /Users/jamesbowen/geant4.10.07-install/lib/libG4OpenGL.dylib
Reason: Incompatible library version: libG4OpenGL.dylib requires version 4.0.0 or later, but libGL.1.dylib provides version 1.0.0
Abort trap: 6
(base) Jamess-iMac:B2a jamesbowen$

Which macOS and Xcode versions are you running? It looks like something’s changed in the Xquartz installation, so maybe try reinstalling that.

Yes, that’s right, it was XQuartz. What exactly do I need to reinstall? I think the update was already installed.

That’s why I asked about which macOS and Xcode versions this was on - I don’t have experience with Xcode updates breaking installs of Xquartz (not that it can’t happen!).

Given that the libGL version is “1.0.0”, but as far as I know the current Xquartz installer provides 4.0.0, I’m not sure what’s broken. I’d try downloading the latest Xquartz installer and reinstall it from that.

Wow, I’m sorry I did not answer that. It is macOS Big Sur Version 11.1. Xcode is Version 12.4. I just opened Xcode, and was told I needed additional components to open it, which I downloaded. I will therefore try recompiling and running these examples again. I will let you know if I am still having the problem.

No worries, and thanks for the info. Let us know if there are issues - and equally if and how you resolved things!

1 Like

Thanks bmorgan. It looks like it is working now. Thanks for your help!

1 Like