AIDASoft / DD4hep

Detector Description Toolkit for High Energy Physics
http://dd4hep.cern.ch
GNU Lesser General Public License v3.0
49 stars 95 forks source link

Error when running ddsim on MacOS #1207

Closed TrT-TOT closed 8 months ago

TrT-TOT commented 8 months ago

Dear all, This is my first time to run DD4hep on MacOS, and I met a strange error when running ddsim.

To be specific, I tried to run the example of SimpleDetector, and geoDisplay works well.

However, there is an error about loading the dynamic library of libSimpleDetector.dylib when running ddsim. (see below for info about work environment and output log)

I've tried to add the path of libSimpleDetector.dylib to both LD_LIBRARY_PATH and DYLD_LIBRARY_PATH but the error still exists.

Could you please give me some hint to debug or solve the error? Thanks

Best, Zekun

!!!IMPORTANT!!!: To facilitate faster and easier response to your issue please provide in addition to the description of the issue also the following information

TGeoMixture::ComputeDerivedQuantities:0: RuntimeWarning: Mixture G4_Au: sum of weights is: 0 Detector INFO *** Created World volume with size: 500 500 500 Info in : Top volume is world_volume. Master volume is world_volume WARNING: cannot load libSimpleDetector.dylib for factory AirTube WARNING: dlopen(libSimpleDetector.dylib, 0x0009): tried: 'libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSimpleDetector.dylib' (no such file), '/Users/chentaobao/DD4hep/lib/../lib/libSimpleDetector.dylib' (no such file), '/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/usr/lib/libSimpleDetector.dylib' (no such file, not in dyld cache), 'libSimpleDetector.dylib' (no such file) Compact ERROR FAILED subdetector:AirTube of type AirTube WARNING: cannot load libSimpleDetector.dylib for factory AirTube WARNING: dlopen(libSimpleDetector.dylib, 0x0009): tried: 'libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSimpleDetector.dylib' (no such file), '/Users/haha/DD4hep/lib/../lib/libSimpleDetector.dylib' (no such file), '/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/usr/lib/libSimpleDetector.dylib' (no such file, not in dyld cache), 'libSimpleDetector.dylib' (no such file) PluginService ERROR Factory requested: AirTube (N10cxxabiv120function_type_infoE) :bad any cast PluginService ERROR Stub is invalid! Compact ERROR ++ FAILED to convert subdetector: AirTube: Failed to execute subdetector creation plugin. No factory with name Create(AirTube) for type AirTube found. Please check library load path and/or plugin factory name.


MarkusFrankATcernch commented 8 months ago

I suppose you did source the correct setup script for this example (thisSimpleDetector.sh) or executed the test using run_test_SimpleDetector.sh...

@gaede Since you are the only active MAC user I know....do you have any idea what else possibly going wrong ?

peterkostka commented 8 months ago

I'm using Mac's of different flavour: m2 Apple processor and intel Mac's I don't have any problem.

Used: OS version: e.g. MacOS 14.2.1 Apple clang version 15.0.0 master (date: 08.01.2024) Geant4 version: 4-11.2.0 ROOT version: 6.28/06, no LCG/iLCSoft/Key4hep installed Input: cd $DD4hep/examples/SimpleDetector/compact
ddsim --compactFile Simple_ILD.xml --runType=qt

Output:

$DD4hep/examples/SimpleDetector/compact 19:24> ddsim --compactFile Simple_ILD.xml --runType=qt
PersistencyIO    INFO  +++ Set Streamer to dd4hep::OpaqueDataBlock
DD4hep           INFO  ++ Using globally Geant4 unit system (mm,ns,MeV)
Info in <TGeoManager>: Changing system of units to Geant4 units (mm, ns, MeV).
Info in <TGeoManager::TGeoManager>: Geometry default, Detector Geometry created
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
XMLLoader        INFO  +++ Processing XML file: file:/opt/aidasoft/DD4hep/examples/SimpleDetector/compact/Simple_ILD.xml
Compact          INFO  ++ Cleared default ROOT TGeoElementTable contents. Must now be filled from XML!
Compact          INFO  +++ UNIT System:
Compact          INFO  +++ Density:    6.24e+18  Units:6.24e+18
Compact          INFO  +++ GeV:           1e+03  Units:   1e+03
Compact          INFO  +++ sec:           1e+09  Units:   1e+09
Compact          INFO  +++ nanosecond:        1  Units:       1
Compact          INFO  +++ kilo:       6.24e+24  Units:6.24e+24
Compact          INFO  +++ kilo:       6.24e+24  Units:6.24e+24
Compact          INFO  +++ meter:         1e+03  Units:   1e+03
Compact          INFO  +++ ampere:     6.24e+09  Units:6.24e+09
Compact          INFO  +++ degree:       0.0175  Units:  0.0175
Compact                ++ Converting isotope  H1                Z:  1 N:  1 A:  1.0078 [g/mol]
Compact                ++ Converting isotope  H2                Z:  1 N:  2 A:  2.0141 [g/mol]
:::::
TGeoMixture::ComputeDerivedQuantities:0: RuntimeWarning: Mixture G4_Au: sum of weights is: 0
Detector         INFO  *********** Created World volume with size: 5000 5000 5000
Info in <TGeoManager::SetTopVolume>: Top volume is world_volume. Master volume is world_volume
Compact          INFO  ++ Converted subdetector:AirTube of type AirTube
Compact          INFO  ++ Converted subdetector:VXD of type ZPlanarTracker [tracker]
Compact          INFO  ++ Converted subdetector:SIT of type ZPlanarTracker [tracker]
Compact          INFO  ++ Converted field: Successfully created field GlobalSolenoid [solenoid]
::::::
**************************************************************
 Geant4 version Name: geant4-11-02 [MT]   (8-December-2023)
                       Copyright : Geant4 Collaboration
                      References : NIM A 506 (2003), 250-303
                                 : IEEE-TNS 53 (2006), 270-278
                                 : NIM A 835 (2016), 186-225
                             WWW : http://geant4.org/
**************************************************************
:::::::
### Adding tracking cuts for neutron  TimeCut(ns)= 10000  KinEnergyCut(MeV)= 0
GlobalRangeCut   INFO  +++ Set PhysicsList RangeCut to 0.700000 mm
UI               INFO  +++ Starting G4VisExecutive ....
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
  Qt6: Asking ToolsSG to stand in for OpenGL

You have successfully registered the following graphics systems.
Registered graphics systems are:
  ASCIITree (ATree)
  DAWNFILE (DAWNFILE)
  G4HepRepFile (HepRepFile)
  RayTracer (RayTracer)
  VRML2FILE (VRML2FILE)
  gMocrenFile (gMocrenFile)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
  OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK)
  OpenGLStoredX (OGLSX, OGLSQt_FALLBACK)
  Qt3D (Qt3D)
  TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_QT_GLES_FALLBACK)
  TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG, OGL)
  TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
Default graphics system is: OGL (based on build flags).
::::::::
Registered graphics systems are:
  ASCIITree (ATree)
  DAWNFILE (DAWNFILE)
  G4HepRepFile (HepRepFile)
  RayTracer (RayTracer)
  VRML2FILE (VRML2FILE)
  gMocrenFile (gMocrenFile)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
  OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK)
  OpenGLStoredX (OGLSX, OGLSQt_FALLBACK)
  Qt3D (Qt3D)
  TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_QT_GLES_FALLBACK)
  TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG, OGL)
  TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
Default graphics system is: OGL (based on build flags).
::::::
/vis/drawVolume
Simple_ILD _ddsim_DD4hep
MarkusFrankATcernch commented 8 months ago

@peterkostka Happy New Year! Thanks a lot! Long time no see!

TrT-TOT commented 8 months ago

@peterkostka Dear sir, thanks for your feedback!

Could you please give us some hint on your installation options of DD4hep, ROOT and Geant4? So that we could find some clue on what's the problem is.

BTW, I'm not so familiar with MacOS. Is there also .dylib files in your build/lib folder?

andresailer commented 8 months ago

Hi @TrT-TOT

Can you tell us which python you are using, the path to the python mostly. You are most likely running into SIP (System Integrity Protection), which purges the environment from some PATH, LD_LIBRARY_PATH etc variables, which essentially makes using DD4hep on macOS with system python impossible to use.

It could already be that the

#!/usr/bin/env python3.9

from ddsim itself is enough to purge the environment variables.

Cheers, Andre

TrT-TOT commented 8 months ago

Dear Andre @andresailer ,

Thanks for your advice. In principle I'm using the python installed by brew. But it's also possible that the system python is called when compiling DD4hep or orther packages.

The output of which python3 is /opt/homebrew/bin/python3. The output of echo $LD_LIBRARY_PATH is /opt/homebrew/lib:/Applications/root_install/lib. The output of echo $PATH is /Applications/root_install/bin:/Users/haha/geant4-v11.1.2-install/bin:/opt/homebrew/Cellar/qt@5/5.15.12/bin:/Users/haha/spack/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin

Could you please provide more instructs? Should I disable SIP? Or maybe I have to make sure the python used for package compilation is that installed by brew, and have another try?

Best regards, Zekun

Hi @TrT-TOT

Can you tell us which python you are using, the path to the python mostly. You are most likely running into SIP (System Integrity Protection), which purges the environment from some PATH, LD_LIBRARY_PATH etc variables, which essentially makes using DD4hep on macOS with system python impossible to use.

It could already be that the

#!/usr/bin/env python3.9

from ddsim itself is enough to purge the environment variables.

Cheers, Andre

andresailer commented 8 months ago

You can try running

/opt/homebrew/bin/python3 `which ddsim` ....

That should evade the "/usr/bin/env" in ddsim.

TrT-TOT commented 8 months ago

Dear Andre @andresailer, The error message about dlopen disappeared with the new command and everything seems good. Does this mean I have to always use this command to use ddsim in the future?

Best regards, Zekun

You can try running

/opt/homebrew/bin/python3 `which ddsim` ....

That should evade the "/usr/bin/env" in ddsim.

andresailer commented 8 months ago

Hi @TrT-TOT

And what is the output you get from the ddsim command now?

How did you install Geant4, ROOT, and DD4hep?

This is probably an issue with how you are installing the external libraries (i.e, geant4, ROOT, and maybe others).

For reference: @peterkostka How did you install Geant4, ROOT, and DD4hep?

Thanks, Andre

peterkostka commented 8 months ago

Here the cmake commands I used for geant4, root, DD4hep (BWDIR stands for homebrew installations; SWDIR for local one)

======= GEANT4

> echo $CLHEP
/opt/homebrew/opt/clhep/

cmake ../geant4  \
-DCMAKE_CXX_STANDARD:STRING=17 \
-DCMAKE_INSTALL_PREFIX:PATH=$SWDIR/geant4/install \
-DGEANT4_BUILD_MULTITHREADED:BOOL=ON \
-DGEANT4_BUILD_TLS_MODEL:STRING=global-dynamic \
-DGEANT4_INSTALL_DATA:PATH=$SWDIR/geant4/data \
-DGEANT4_USE_GDML:BOOL=ON  \
-DGEANT4_USE_PYTHON:BOOL=ON \
-DGEANT4_USE_QT:BOOL=ON \
-DGEANT4_USE_QT_QT6:BOOL=ON \
-DGEANT4_INSTALL_EXAMPLES:BOOL=ON \
-DGEANT4_USE_SYSTEM_CLHEP:BOOL=ON \
-DGEANT4_USE_SYSTEM_ZLIB:BOOL=ON \
-DGEANT4_USE_OPENGL_X11:BOOL=ON \
-DCLHEP_ROOT_DIR:PATH=$CLHEP \
-DCLHEP_DIR:PATH=$CLHEP \
-DCLHEP_INCLUDE_DIR:PATH=$CLHEP/include \
-DXercesC_LIBRARY_RELEASE:FILEPATH=$BWDIR/opt/xerces-c/lib/libxerces-c.dylib \
-DXercesC_INCLUDE_DIR:PATH=$BWDIR/opt/xerces-c/include \
-DXercesC_VERSION=3.2.5
cmake --build . --target install -j8

ROOT

cd $SWDIR/root/build/
cmake ../root \
-D CMAKE_INSTALL_PREFIX=$SWDIR/root/root-install \
-D CMAKE_CXX_STANDARD=17 \
-D builtin_afterimage:BOOL=ON \
-D builtin_glew:BOOL=ON \
-D builtin_lz4:BOOL=ON \
-D builtin_vdt:BOOL=ON \
-D builtin_zstd:BOOL=ON \
-D builtin_lzma:BOOL=OFF \
-D gviz:BOOL=ON \
-D mysql:BOOL=OFF \
-D pythia8:BOOL=ON \
-D root7:BOOL=ON \
-D tbb:BOOL=ON \
-D glew:BOOL=ON \
-D GLEW_LIBRARIES:PATH=$BWDIR/opt/glew/lib \
-D GLEW_INCLUDE_DIR:PATH=$BWDIR/opt/glew/include \
-D ftgl:BOOL=ON \
-D FTGL_INCLUDE_DIR:PATH=$BWDIR/opt/ftgl/include/FTGL \
-D FTGL_LIBRARY:FILEPATH=$BWDIR/opt/ftgl/lib/libftgl.dylib \
-D nlohmann_json_DIR:PATH=$BWDIR/share/cmake/nlohmann_json/ \
-D pcre:BOOL=ON \
-D PCRE:PATH=$BWDIR/opt/pcre2 \
-D PCRE_INCLUDE_DIR:PATH=$BWDIR/opt/pcre2/include
cmake --build . --target install -j2

DD4hep

cmake \
-DCMAKE_INSTALL_PREFIX=$DD4hep/install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD:STRING=17 \
-DBoost_NO_BOOST_CMAKE=ON \
-DBUILD_TESTING=ON \
-DDD4HEP_USE_EDM4HEP:BOOL=OFF \
-DDD4HEP_USE_GEANT4=ON \
-DDD4HEP_USE_XERCESC=ON \
-DDD4HEP_USE_HEPMC3:BOOL=ON \
-DDD4HEP_BUILD_EXAMPLES=ON \
-DDD4HEP_USE_GEAR:BOOL=OFF \
-DDD4HEP_USE_GEANT4_UNITS=ON \
-DDD4HEP_IGNORE_GEANT4_TLS=True \
-DHepMC3_DIR:PATH=$BWDIR/opt/hepmc3/share/HepMC3/cmake \
-DDD4HEP_USE_LCIO:BOOL=ON \
-DLCIO_DIR:PATH=$SWDIR/lcio/install \
-DROOT_DIR=$ROOTSYS \
-DXercesC_INCLUDE_DIR=$BWDIR/opt/xerces-c/include \
-DDD4HEP_EXAMPLES="AlignDet CLICSiD ClientTests Conditions DDCMS DDCodex DDG4 DDG4_MySensDet LHeD OpticalSurfaces Persistency SimpleDetector" \
-DCMAKE_MODULE_PATH=$SWDIR/root/root-install/cmake:$BWDIR/opt/hepmc3/share/HepMC3/cmake:$SWDIR/DD4hep/install/:$BWDIR/opt/clhep/ \
../
cmake --build . --target install -j8
TrT-TOT commented 8 months ago

Dear Andre, The output is attached. It seems normal now. output.txt

The self-installed external packages only include python 3.12, Geant4 and ROOT. To compare the install options with @peterkostka (very thank you for your reply!), I select some options from CMakeCache.txt and are attached below.

No major difference observed from my perspective. I wonder if the problem is due to DD4HEP_IGNORE_GEANT4_TLS option?

Bests, Zekun

Geant4

-DCMAKE_CXX_STANDARD:STRING=17 \
-DGEANT4_BUILD_MULTITHREADED:BOOL=ON \
-DGEANT4_BUILD_TLS_MODEL:STRING=global-dynamic \
-DGEANT4_USE_GDML:BOOL=ON  \
-DGEANT4_USE_PYTHON:BOOL=ON \
-DGEANT4_USE_QT:BOOL=ON \
-DGEANT4_USE_QT_QT6:BOOL=OFF \
-DGEANT4_INSTALL_EXAMPLES:BOOL=ON \
-DGEANT4_USE_SYSTEM_CLHEP:BOOL=OFF \
-DGEANT4_USE_SYSTEM_ZLIB:BOOL=OFF \
-DGEANT4_USE_OPENGL_X11:BOOL=ON \
-DCLHEP_ROOT_DIR:PATH=$CLHEP \
-DXercesC_LIBRARY_RELEASE:FILEPATH=/opt/homebrew/lib/libxerces-c.dylib \
-DXercesC_INCLUDE_DIR:PATH=/opt/homebrew/include 

ROOT

CLANG_EXECUTABLE_VERSION:STRING=13

CMAKE_BUILD_TYPE:STRING=Release 

CMAKE_CXX_STANDARD:STRING=17

CMAKE_OSX_DEPLOYMENT_TARGET:STRING=14.0

//Enable all optional components by default
all:BOOL=OFF

//Enable support for image processing via libAfterImage
asimage:BOOL=ON

//Build bundled copy of libAfterImage
builtin_afterimage:BOOL=ON

//Build bundled copy of Clang
builtin_clang:BOOL=ON

//Build bundled copy of Cling. Only build with an external cling
// if you know what you are doing: associating ROOT commits with
// cling commits is tricky.
builtin_cling:BOOL=ON

//Enabled because needed for Cocoa graphics (Build bundled copy
// of freetype)
builtin_freetype:BOOL=ON

//Build bundled copy of GLEW
builtin_glew:BOOL=ON

//Build bundled copy of LLVM
builtin_llvm:BOOL=ON

//Use openui5 bundle distributed with ROOT
builtin_openui5:BOOL=ON

//Build VDT internally (requires network)
builtin_vdt:BOOL=OFF

//Build XRootD internally (requires network)
builtin_xrootd:BOOL=OFF

//Build clad, the cling automatic differentiation plugin (requires
// network)
clad:BOOL=OFF

//Use native Cocoa/Quartz graphics backend (MacOS X only)
cocoa:BOOL=ON

//Default compression algorithm (zlib (default), lz4, zstd or lzma)
compression_default:STRING=zlib

//Enable support for C++ modules (deprecated)
cxxmodules:BOOL=OFF

//Enable ROOT RDataFrame
dataframe:BOOL=ON

//Enable support for reading FITS images
fitsio:BOOL=ON

//Enable support for GDML (Geometry Description Markup Language)
gdml:BOOL=ON

//Enable support for HTTP server
http:BOOL=ON

//Enable support for implicit multi-threading via Intel® Thread
// Building Blocks (TBB)
imt:BOOL=ON

//Build using libc++
libcxx:BOOL=ON

//Disable looking for libraries, includes and binaries in locations
// other than a native installation (MacOS only)
macos_native:BOOL=OFF

//Enable support for TMultilayerPerceptron classes' federation
mlp:BOOL=ON

//The directory containing a CMake configuration file for nlohmann_json.
nlohmann_json_DIR:PATH=/opt/homebrew/share/cmake/nlohmann_json

//Enable support for ODBC databases (requires libiodbc or libodbc)
odbc:BOOL=OFF

//Enable support for OpenGL (requires libGL and libGLU)
opengl:BOOL=ON

//Enable support for PROOF
proof:BOOL=ON

//Enable support for automatic Python bindings (PyROOT)
pyroot:BOOL=ON

//Enable Python 2 support in PyROOT (deprecated)
pyroot-python2:BOOL=OFF

//Enable support for Qt5 web-based display (requires Qt5::WebEngine
// and Qt5::WebEngineWidgets)
qt5web:BOOL=OFF

//Enable support for Qt6 web-based display (requires Qt6::WebEngineCore
// and Qt6::WebEngineWidgets)
qt6web:BOOL=OFF

//Build ROOT 7 components of ROOT (requires C++17 standard or higher)
root7:BOOL=ON

//Enable runtime support for C++ modules
runtime_cxxmodules:BOOL=ON

//Use shared 3rd party libraries if possible
shared:BOOL=ON

//Enable support for TSpectrum
spectrum:BOOL=ON

//Enable support for SQLite
sqlite:BOOL=ON

//Enable support for SSL encryption via OpenSSL
ssl:BOOL=ON

//Enable support for VDT (fast and vectorisable mathematical functions)
vdt:BOOL=OFF

//Build Web-based UI components of ROOT (requires C++17 standard
// or higher)
webgui:BOOL=ON

//Path to a file.
xxHash_INCLUDE_DIR:PATH=/opt/homebrew/include

//Path to a library.
xxHash_LIBRARY:FILEPATH=/opt/homebrew/lib/libxxhash.dylib

DD4hep

BUILD_DOCS:BOOL=OFF
BUILD_SHARED_LIBS:BOOL=ON
BUILD_TESTING:BOOL=ON
Boost_DIR:PATH=/opt/homebrew/lib/cmake/Boost-1.83.0
Boost_FILESYSTEM_LIBRARY_RELEASE:STRING=/opt/homebrew/lib/libboost_filesystem-mt.dylib
CMAKE_CXX_STANDARD:STRING=17
DD4HEP_BUILD_EXAMPLES:BOOL=OFF
DD4HEP_BUILD_PACKAGES:STRING=DDRec DDDetectors DDCond DDAlign DDCAD DDDigi DDG4 DDEve UtilityApps
**DD4HEP_IGNORE_GEANT4_TLS:BOOL=OFF**
DD4HEP_RELAX_PYVER:BOOL=OFF
DD4HEP_SET_RPATH:BOOL=ON
DD4HEP_USE_EDM4HEP:BOOL=OFF
DD4HEP_USE_GEANT4:BOOL=ON
DD4HEP_USE_GEANT4_UNITS:BOOL=OFF
DD4HEP_USE_GEAR:BOOL=OFF
DD4HEP_USE_HEPMC3:BOOL=OFF
DD4HEP_USE_LCIO:BOOL=OFF
DD4HEP_USE_TBB:BOOL=OFF
DD4HEP_USE_XERCESC:BOOL=ON

Hi @TrT-TOT

And what is the output you get from the ddsim command now?

How did you install Geant4, ROOT, and DD4hep?

This is probably an issue with how you are installing the external libraries (i.e, geant4, ROOT, and maybe others).

For reference: @peterkostka How did you install Geant4, ROOT, and DD4hep?

Thanks, Andre

andresailer commented 8 months ago

DD4HEP_IGNORE_GEANT4_TLS

Please don't ignore this! But your Geant4 is build with global-dynamic, so it shouldn't be needed. Edit: I see you do not ignore this, which is as it should be!

What is in vis.mac?

Does ddsim --runtype vis ... work if you open a different graphics type?

/vis/open OGLIX
/vis/drawVolume

(I think?)

TrT-TOT commented 8 months ago

Dear Andre, I've tried to enable or disable DD4HEP_IGNORE_GEANT4_TLS option. The results are same.

By changing the graphysical driver to OGLSQt. The error message still exists. (I can't access to OGLIX in Geant4)

andresailer commented 8 months ago

The error message still exists

Which error message?

I can't access to OGLIX in Geant4

Any other graphics systems?

TrT-TOT commented 8 months ago

The error message when running ddsim:

TGeoMixture::ComputeDerivedQuantities:0: RuntimeWarning: Mixture G4_Au: sum of weights is: 0
Detector INFO *********** Created World volume with size: 500 500 500
Info in TGeoManager::SetTopVolume: Top volume is world_volume. Master volume is world_volume
WARNING: cannot load libSimpleDetector.dylib for factory AirTube
WARNING: dlopen(libSimpleDetector.dylib, 0x0009): tried: 'libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSimpleDetector.dylib' (no such file), '/Users/chentaobao/DD4hep/lib/../lib/libSimpleDetector.dylib' (no such file), '/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/usr/lib/libSimpleDetector.dylib' (no such file, not in dyld cache), 'libSimpleDetector.dylib' (no such file)
Compact ERROR FAILED subdetector:AirTube of type AirTube
WARNING: cannot load libSimpleDetector.dylib for factory AirTube
WARNING: dlopen(libSimpleDetector.dylib, 0x0009): tried: 'libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSimpleDetector.dylib' (no such file), '/Users/haha/DD4hep/lib/../lib/libSimpleDetector.dylib' (no such file), '/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libSimpleDetector.dylib' (no such file), '/usr/lib/libSimpleDetector.dylib' (no such file, not in dyld cache), 'libSimpleDetector.dylib' (no such file)
PluginService ERROR Factory requested: AirTube (N10__cxxabiv120__function_type_infoE) :bad any cast
PluginService ERROR Stub is invalid!
Compact ERROR ++ FAILED to convert subdetector: AirTube: Failed to execute subdetector creation plugin. No factory with name Create(AirTube) for type AirTube found.
Please check library load path and/or plugin factory name.

The same as I use OGL as graphical driver. So I think the error is not induced by graphysical driver?

andresailer commented 8 months ago

Are you still using

/opt/homebrew/bin/python3 `which ddsim` ...

?

TrT-TOT commented 8 months ago

Sorry for my misleading. There is no problem when running /opt/homebrew/bin/python3which ddsim.... The error message appears when directly running ddsim.

andresailer commented 8 months ago

Well, you will always have to be explicit about the python to use.

And graphics wise, is there an issue then?

TrT-TOT commented 8 months ago

Well. I think I'll close the issue. Than all of you for your help.