grasph/wrapit

Cannot produce wrappers for Geant4.jl anymore

peremato opened this issue · 2 comments

Hi Philippe. I tried this new version and I get lots of compilation errors. I tried with llvm@17 and llvm@13 (I remember I had to use this one before to make it work).
This is the first error I get

/Users/mato/Development/Geant4.jl/gen/cpp/JlCLHEP_HepRandomEngine.cxx:110:49: error: address of overloaded function 'newEngine' cannot be static_cast to type 'CLHEP::HepRandomEngine *(*)(const int &)'
    t.method("CLHEP!HepRandomEngine!newEngine", static_cast<CLHEP::HepRandomEngine * (*)(const int &) >(&CLHEP::HepRandomEngine::newEngine));
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mato/.julia/artifacts/195e8ebe80b203de04fe4bf64d497607f244ee27/include/Geant4/CLHEP/Random/RandomEngine.h:101:27: note: candidate function
  static HepRandomEngine* newEngine(std::istream & is);
                          ^
/Users/mato/.julia/artifacts/195e8ebe80b203de04fe4bf64d497607f244ee27/include/Geant4/CLHEP/Random/RandomEngine.h:104:27: note: candidate function
  static HepRandomEngine* newEngine(const std::vector<unsigned long> & v);

It wraps newEngine(const std::vector<unsigned long> & v) as newEngine(const int& v)

This was working fine before. To reproduce you can use the Geant4.jl project.

  • add wrapit to PATH
  • clone Geant4.jl: git clone https://github.com/JuliaHEP/Geant4.jl.git
  • generate the wrappers: julia --project=Geant4.jl Geant4.jl/gen/build.jl. The first time you need to run twice in order to generate the cpp files, which will be found the second time by cmake glob.

Please ignore for the time being this issue. I see that I have a problem with the interaction between XCode and the llvm installation of home-brew.

Solved the problem with building in MacOS/M2. Closing and opening more concrete ones.