CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
68 stars 67 forks source link

swig error : Unrecognized option -doxygen #358

Closed RodSasse closed 9 months ago

RodSasse commented 3 years ago

Dear developers,

I have problems installing CRPropa on my system System Information:

Did you install CRPropa from git or download a release? I installed version 3.1.7 from the releases.

When I give the make command the following error appears:

[ 84%] Built target testSource [ 85%] Built target testMagneticField [ 86%] Built target testVector3 [ 87%] Built target testModuleList swig error : Unrecognized option -doxygen Use 'swig -help' for available options. make[2]: [CMakeFiles/crpropa-swig-wrapper.dir/build.make:145: CMakeFiles/crpropa-swig-wrapper] Error 1 make[1]: [CMakeFiles/Makefile2:712: CMakeFiles/crpropa-swig-wrapper.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Best regards, Rodrigo

lukasmerten commented 3 years ago

This seems strange to me. This option should only enabled when the swig version is >4. Are you sure there is only one swig installation on the system and it is for sure version 3.0.12?

If it is version 3.0.12 make sure to set the cmake flag -DENABLE_SWIG_BUILTIN=OFF.

RodSasse commented 3 years ago

Yes, I'm sure only one version of SWIG is installed and is the version 3.0.12.

And I set the option cmake flag -DENABLE_SWIG_BUILTIN=OFF, but the error still persists.

VasundharaShaw commented 2 years ago

Hello, I have a macOS 12.1 and I have the same issue. the swig version I have is also 3.0.12 and i did as was suggested above. how should i proceed? thanks

LIZHICHAOUNICORN commented 2 years ago

I also found this error when i use faiss, it was swig3.0 not support , you can manual install swig4.0.1, it solved my problem.

VasundharaShaw commented 2 years ago

I also found this error when i use faiss, it was swig3.0 not support , you can manual install swig4.0.1, it solved my problem.

Thanks a lot for this tip. I will give it a go.

lukasmerten commented 2 years ago

@VasundharaShaw could you solve the issue by upgrading your swig version?

VasundharaShaw commented 2 years ago

@VasundharaShaw could you solve the issue by upgrading your swig version?

Unfortunately, no.

jstvdk commented 2 years ago

I also got this problem and solve it, maybe it will help someone:

In my situation (two versions of swig in the system, in /usr/bin and installed by me manually into the conda env) this error rises only when just cmake flags are stated, but $PATH not updated. So to solve this one need to: 1) add this cmake flags to cmake command: -DSWIG_DIR=\~/miniconda3/envs/crpropa/share/swig/4.0.2 - this is the result of command 'swig -swiglib' -DSWIG_EXECUTABLE=\~/miniconda3/envs/crpropa/bin/swig 2) AND add the path to the correct version of swig into the beginning of the $PATH variable: export PATH=\~/miniconda3/envs/crpropa/bin:$PATH

VasundharaShaw commented 2 years ago

I also got this problem and solve it, maybe it will help someone:

In my situation (two versions of swig in the system, in /usr/bin and installed by me manually into the conda env) this error rises only when just cmake flags are stated, but $PATH not updated. So to solve this one need to:

  1. add this cmake flags to cmake command: -DSWIG_DIR=~/miniconda3/envs/crpropa/share/swig/4.0.2 - this is the result of command 'swig -swiglib' -DSWIG_EXECUTABLE=~/miniconda3/envs/crpropa/bin/swig
  2. AND add the path to the correct version of swig into the beginning of the $PATH variable: export PATH=~/miniconda3/envs/crpropa/bin:$PATH

many thanks for the suggestion. I will look into it.

lukasmerten commented 1 year ago

@xiabo0816: Could you elaborate on how the installation of the suggested package helps with this issue?

And more importantly is it still an issue for anyone?