Could I build geant4 with MT and python option together

I try to building geant4 with option

-DGEANT4_USE_PYTHON=ON
-DGEANT4_BUILD_MULTITHREADED=ON

and got error

CMake Error at cmake/Modules/G4CMakeMain.cmake:83 (message):
85
  Geant4Py only supports 'global-dynamic' thread local storage
86

Is this a long time conflict or just a tmp bug and will be fixed soon?

It’s not documented in the Installation Guide nor in the 10.6 Release Notes. Filing a bug report is the best way to get the attention of the devlopers and hopefully get this fixed (or documented as mutually exclusive) for 10.7.

This option is only in the 10.7 Beta and will be documented as such in that release in December. For now, if you want to enable both options, you need to set the options:

-DGEANT4_USE_PYTHON=ON
-DGEANT4_BUILD_MULTITHREADED=ON
-DGEANT4_BUILD_TLS_MODEL=global-dynamic

Hi, @bmorgan! I don’t have the new beta locally; the GEANT4_USE_PYTHON option is in 10.6.p02.

I’ve confirmed that if I set those three options together in 10.6.p02, I no longer get the error quoted by the OP. But I do get a complaint about Boost not found (this is on my MacBook Pro):

CMake Error at /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
   Could NOT find Boost (missing: Boost_INCLUDE_DIR python)
 Call Stack (most recent call first):

   /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
     /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindBoost.cmake:2142
 (find_package_handle_standard_args)
   environments/g4py/CMakeLists.txt:11 (find_package)

This isn’t a problem for my own work, but I thought I’d pass it along.

Thanks @mkelsey! Apologies, I’d totally forgotten that the Python option had also been backported to 10.6.2, and the documentation hadn’t been updated…

Boost is needed to support the Python option as the binding is currently done by using Boost.Python. We’re looking at pybind11 but likely won’t make it into 10.7.

Okay, thanks, Ben. I’ll have to look at whether it’s worth installing Boost on my Mac just for this. Have you all considered including the minimal bit of Boost needed into the Geant4/source/externals area, the way you do with CLHEP, expat, and zlib?