zoglauer / megalib

MEGAlib - the Medium-Energy Gamma-ray Astronomy library
http://megalibtoolkit.com
Other
41 stars 32 forks source link

_BrotliDecoderDecompress error with ROOT on macOS #76

Closed zoglauer closed 1 year ago

zoglauer commented 1 year ago

In case you get this or a similar error message during ROOT comilation on macOS:

Undefined symbols for architecture x86_64: "_BrotliDecoderDecompress", referenced from: _woff2_decompress in libfreetype.a(sfnt.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [lib/[libFTGL.6.24.08.so](http://libftgl.6.24.08.so/)] Error 1 make[1]: *** [graf3d/ftgl/CMakeFiles/FTGL.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....

This is an issue of the latest ROOT. Try the following using bash or zsh:

Set the path to MEGAlib

export MEGALIB=/path/to/MEGAlib

Switch to the MEGAlib directory

cd ${MEGALIB}

Update MEGAlib

git pull

Make sure you are on the main branch

git checkout main

Switch to where external software is installed, default is ${MEGALIB}/external:

cd external

Download a working version of ROOT:

curl -O -C - https://root.cern.ch/download/root_v6.24.06.source.tar.gz

Build ROOT with a specific version

bash ../config/build-root.sh --tarball=root_v6.24.06.source.tar.gz

Back to the MEGAlib directory

cd ${MEGALIB}

Compile the rest

bash setup.sh --br=main --root=external/root_v6.24.06

zoglauer commented 1 year ago

Fixed in version 3.06.01 and on the main branch