spack: Installation issue: `root` fails to build on MacOS due to GLEW link error
Steps to reproduce the issue
On MacOS:
$ spack install root
Error message
Error message
>> 24436 ld: Undefined symbols:
24437 ___GLXEW_ARB_multisample, referenced from:
24438 TGLFormat::InitAvailableSamples() in TGLFormat.cxx.o
>> 24439 clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> 24440 make[2]: *** [graf3d/gl/CMakeFiles/RGL.dir/build.make:1521: lib/libRGL.6.32.08.so] Error
1
24441 make[2]: Leaving directory '/private/var/folders/hs/x6h90m5n60l2c5t6ckjfh9bw0000gp/T/ajpM
ac/spack-stage/spack-stage-root-6.32.08-nv2iv3z4gr4spxy73hbz74bmysdhtzzu/spack-build-nv2i
v3z'
>> 24442 make[1]: *** [CMakeFiles/Makefile2:42964: graf3d/gl/CMakeFiles/RGL.dir/all] Error 2
24443 make[1]: *** Waiting for unfinished jobs....
24444 [ 96%] Building CXX object roofit/roofitcore/CMakeFiles/RooFitCore.dir/src/BidirMMapPipe.
cxx.o
Information on your system
- Spack: 0.24.0.dev0 (fe746bdebb1f08962d286c4da37e88204942a813)
- Python: 3.12.1
- Platform: darwin-sonoma-cannonlake
Additional information
PR #47483 re-introduces a bug that I had previously patched (but not properly fixed) in #45632: a link-time undefined symbols error appears in GLEW. The issue seems to arise from the fact that only ROOT’s builtin version of GLEW seems to be properly linkable against; using a version of GLEW installed by Spack leads to the error shown above.
Pinging @drbenmorgan @gartung @greenc-FNAL @marcmengel @vitodb @vvolkl as the maintainers.
Pinging @sethrj as the author of #47483.
Pinging @paulgessinger as interested party in building ROOT on MacOS.
Pinging @AJPfleger who encountered this problem as he was building ROOT on his Mac.
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have run
spack maintainers <name-of-the-package>and @mentioned any maintainers - I have uploaded the build log and environment files
- I have searched the issues of this repo and believe this is not a duplicate
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (14 by maintainers)
I’m in favor of this as well, seems like it has some value to remove possible footguns especially on macos. AFAICT the official builds of root and the distribution in the LCG releases also uses cocoa and not x on macos
I tried to incorporate this commit by adding a version locally:
But this yields the same problem:
Here is the full concretization:
The relevant ROOT spec is the following:
I am now reproducing the build; I got this bug report from a colleague and I will now try to get a more complete build log.