hiddenSymmetries / simsopt

Simons Stellarator Optimizer Code
https://simsopt.readthedocs.io
MIT License
97 stars 47 forks source link

Issue with finding boost path when compiling with anaconda #298

Closed abaillod closed 1 year ago

abaillod commented 1 year ago

Hi,

I have some difficulties compiling the latest version of simsopt on my computer within an anaconda environment. What I did:

1555  conda create --name simsopt python=3.9  
1556  conda activate simsopt  
1557  conda install pip git  
1558  conda install setuptools_scm  
1559  conda install numpy  
1560  conda install jax  
1561  conda install jaxlib  
1562  conda install scipy  
1563  conda install Deprecated  
1564  conda install nptyping  
1565  conda install monty  
1566  conda install ruamel.yaml  
1567  conda install sympy  
1568  conda install f90nml  
1569  conda install randomgen  
1570  conda install pyevtk  
1573  conda install gcc gfortran cxx-compiler  
1576  conda install cmake  
1580  conda install ninja  
1581  rm -rf build  
1582  pip install .  

which fails with the following error message:

...
Building wheels for collected packages: simsopt
  Building wheel for simsopt (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for simsopt (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [245 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/simsopt
      copying src/simsopt/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt
      copying src/simsopt/_version.py -> build/lib.linux-x86_64-cpython-39/simsopt
      creating build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/bootstrap.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/vmec_diagnostics.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/boozer.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/virtual_casing.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/profiles.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/vmec.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/spec.py -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      creating build/lib.linux-x86_64-cpython-39/simsopt/util
      copying src/simsopt/util/mpi.py -> build/lib.linux-x86_64-cpython-39/simsopt/util
      copying src/simsopt/util/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/util
      copying src/simsopt/util/fourier_interpolation.py -> build/lib.linux-x86_64-cpython-39/simsopt/util
      copying src/simsopt/util/logger.py -> build/lib.linux-x86_64-cpython-39/simsopt/util
      copying src/simsopt/util/mpi_logger.py -> build/lib.linux-x86_64-cpython-39/simsopt/util
      copying src/simsopt/util/constants.py -> build/lib.linux-x86_64-cpython-39/simsopt/util
      creating build/lib.linux-x86_64-cpython-39/simsopt/objectives
      copying src/simsopt/objectives/least_squares.py -> build/lib.linux-x86_64-cpython-39/simsopt/objectives
      copying src/simsopt/objectives/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/objectives
      copying src/simsopt/objectives/functions.py -> build/lib.linux-x86_64-cpython-39/simsopt/objectives
      copying src/simsopt/objectives/utilities.py -> build/lib.linux-x86_64-cpython-39/simsopt/objectives
      copying src/simsopt/objectives/fluxobjective.py -> build/lib.linux-x86_64-cpython-39/simsopt/objectives
      creating build/lib.linux-x86_64-cpython-39/simsopt/solve
      copying src/simsopt/solve/mpi.py -> build/lib.linux-x86_64-cpython-39/simsopt/solve
      copying src/simsopt/solve/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/solve
      copying src/simsopt/solve/serial.py -> build/lib.linux-x86_64-cpython-39/simsopt/solve
      creating build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/surfacehenneberg.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/config.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/curveobjectives.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/curveperturbed.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/surfacegarabedian.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/surfacexyztensorfourier.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/surfacerzfourier.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/jit.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/surfaceobjectives.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/curve.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/curvehelical.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/plotting.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/curvexyzfourier.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/surfacexyzfourier.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/qfmsurface.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/surface.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/boozersurface.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/finitebuild.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      copying src/simsopt/geo/curverzfourier.py -> build/lib.linux-x86_64-cpython-39/simsopt/geo
      creating build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/biotsavart.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/magneticfield.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/coil.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/magneticfieldclasses.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/boozermagneticfield.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/sampling.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      copying src/simsopt/field/tracing.py -> build/lib.linux-x86_64-cpython-39/simsopt/field
      creating build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/zoo.py -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      creating build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/__init__.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/types.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/finite_difference.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/dev.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/util.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/optimizable.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/json.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/_core/derivative.py -> build/lib.linux-x86_64-cpython-39/simsopt/_core
      copying src/simsopt/mhd/input.default -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/mhd/defaults.sp -> build/lib.linux-x86_64-cpython-39/simsopt/mhd
      copying src/simsopt/util/log_config.yaml -> build/lib.linux-x86_64-cpython-39/simsopt/util
      copying src/simsopt/configs/NCSX.dat -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/HSX.dat -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/W7-X.dat -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length18_nsurfaces5.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length18_nsurfaces5.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length18_nsurfaces5.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length20_nsurfaces5.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length20_nsurfaces5.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length20_nsurfaces5.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length22_nsurfaces5.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length22_nsurfaces5.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length22_nsurfaces5.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length24_nsurfaces5.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length24_nsurfaces5.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length24_nsurfaces5.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length18_nsurfaces9.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length18_nsurfaces9.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length18_nsurfaces9.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length20_nsurfaces9.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length20_nsurfaces9.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length20_nsurfaces9.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length22_nsurfaces9.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length22_nsurfaces9.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length22_nsurfaces9.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length24_nsurfaces9.ma -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length24_nsurfaces9.curves -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      copying src/simsopt/configs/GIULIANI_length24_nsurfaces9.currents -> build/lib.linux-x86_64-cpython-39/simsopt/configs
      running build_ext
      Choose CMAKE_BUILD_TYPE=Release
      -- The C compiler identification is GNU 11.3.0
      -- The CXX compiler identification is GNU 11.3.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Python: /misc/anaconda3/envs/simsopt/bin/python3.9 (found suitable version "3.9.16", minimum required is "3") found components: Interpreter Development.Module NumPy
      statusPython executable is /misc/anaconda3/envs/simsopt/bin/python3.9
      statusPython Development Module found value is TRUE
      statusPython header dirs are /misc/anaconda3/envs/simsopt/include/python3.9
      statusPython library dirs are
      statusPython version is 3.9.16
      -- Submodule update
      -- Local build detected. Set compilation flags accordingly (march=native).
      -- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
      -- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success
      -- Conda prefix is /misc/anaconda3/envs/simsopt
      -- Found OpenMP_C: -fopenmp (found version "4.5")
      -- Found OpenMP_CXX: -fopenmp (found version "4.5")
      -- Found OpenMP: TRUE (found version "4.5")
      -- Found Boost: /misc/anaconda3/envs/simsopt/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.60.0")
      -- Boost version is 1.80.0
      -- Boost include dirs are /misc/anaconda3/envs/simsopt/include
      -- pybind11 v2.6.2 dev1
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      -- Version: 7.1.4
      -- Build type: Release
      -- CXX_STANDARD: 11
      -- Performing Test has_std_11_flag
      -- Performing Test has_std_11_flag - Success
      -- Performing Test has_std_0x_flag
      -- Performing Test has_std_0x_flag - Success
      -- Performing Test SUPPORTS_USER_DEFINED_LITERALS
      -- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
      -- Performing Test FMT_HAS_VARIANT
      -- Performing Test FMT_HAS_VARIANT - Success
      -- Required features: cxx_variadic_templates
      -- Looking for strtod_l
      -- Looking for strtod_l - not found
      -- Configuring done (1.7s)
      -- Generating done (0.0s)
      CMake Warning:
        Manually-specified variables were not used by the project:

          EXAMPLE_VERSION_INFO
          PYTHON_EXECUTABLE

      -- Build files have been written to: /home/abaillod/simsopt/build/temp.linux-x86_64-cpython-39
      [1/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_distance.cpp.o
      [2/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/regular_grid_interpolant_3d_py.cpp.o
      [3/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_py.cpp.o
      [4/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curverzfourier.cpp.o
      [5/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_tracing.cpp.o
      [6/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_vjp_py.cpp.o
      [7/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o
      FAILED: CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o
      /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-c++ -Dsimsoptpp_EXPORTS -I/home/abaillod/simsopt/thirdparty/xtensor/include -I/home/abaillod/simsopt/thirdparty/xtensor-python/include -I/home/abaillod/simsopt/thirdparty/xsimd/include -I/home/abaillod/simsopt/thirdparty/xtl/include -I/home/abaillod/simsopt/thirdparty/eigen -I/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/numpy/core/include -I/home/abaillod/simsopt/src/simsoptpp -I/home/abaillod/simsopt/thirdparty/fmt/include -isystem /misc/anaconda3/envs/simsopt/include/python3.9 -isystem /home/abaillod/simsopt/thirdparty/pybind11/include -O3 -march=native -mfma -ffp-contract=fast -O3 -DNDEBUG -std=gnu++14 -fPIC -fvisibility=hidden -flto -fno-fat-lto-objects -fopenmp -MD -MT CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o -MF CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o.d -o CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o -c /home/abaillod/simsopt/src/simsoptpp/tracing.cpp
      /home/abaillod/simsopt/src/simsoptpp/tracing.cpp:19:10: fatal error: boost/math/tools/roots.hpp: No such file or directory
         19 | #include <boost/math/tools/roots.hpp>
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      [8/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curvexyzfourier.cpp.o
      [9/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacerzfourier.cpp.o
      [10/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_surfaces.cpp.o
      [11/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python.cpp.o
      [12/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_curves.cpp.o
      [13/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/reiman.cpp.o
      [14/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surface.cpp.o
      [15/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/dommaschk.cpp.o
      [16/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacexyzfourier.cpp.o
      [17/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curve.cpp.o
      [18/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_magneticfield.cpp.o
      [19/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/magneticfield_biotsavart.cpp.o
      [20/25] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_boozermagneticfield.cpp.o
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/misc/anaconda3/envs/simsopt/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/misc/anaconda3/envs/simsopt/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/misc/anaconda3/envs/simsopt/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 413, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 123, in <module>
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 343, in run
          self.run_command("build")
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/tmp/pip-build-env-6sklpljw/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "<string>", line 105, in build_extension
        File "/misc/anaconda3/envs/simsopt/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'simsoptpp']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for simsopt
Failed to build simsopt
ERROR: Could not build wheels for simsopt, which is required to install pyproject.toml-based projects

It seems that my compiler does not find the boost library path... I don't know how to fix this issue!

Any help would be appreciated. Thank you!

rogeriojorge commented 1 year ago

Hi Antoine! Could you try conda install boost? Does it help compile SIMSOPT afterwords?

abaillod commented 1 year ago

Hi Rogerio! Thank you for answering.

I tried, but I still get the same error. Another thing I tried is to compile manually with cmake - going into a fresh build directory, I do ccmake .., and then press c to configure. I then get many information about the Makefile - the part related to boost is:

 Boost_DIR                       */misc/anaconda3/envs/simsopt/lib/cmake/Boost-1.80.0
 Boost_INCLUDE_DIR               */misc/anaconda3/envs/simsopt/include

It seems to me that cmake finds the correct boost path; nevertheless, after generating the Makefile, running make I get:

(simsopt) abaillod@spcpc602:~/simsopt/build> make
[  4%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[  8%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[ 12%] Linking CXX static library libfmt.a
[ 12%] Built target fmt
[ 16%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python.cpp.o
[ 20%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_surfaces.cpp.o
[ 24%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_curves.cpp.o
[ 28%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_magneticfield.cpp.o
[ 32%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_tracing.cpp.o
[ 36%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_distance.cpp.o
[ 40%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_py.cpp.o
[ 44%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_vjp_py.cpp.o
[ 48%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/regular_grid_interpolant_3d_py.cpp.o
[ 52%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curve.cpp.o
[ 56%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curverzfourier.cpp.o
[ 60%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curvexyzfourier.cpp.o
[ 64%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surface.cpp.o
[ 68%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacerzfourier.cpp.o
[ 72%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacexyzfourier.cpp.o
[ 76%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/dommaschk.cpp.o
[ 80%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/reiman.cpp.o
[ 84%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o
/home/abaillod/simsopt/src/simsoptpp/tracing.cpp:19:10: fatal error: boost/math/tools/roots.hpp: No such file or directory
   19 | #include <boost/math/tools/roots.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/simsoptpp.dir/build.make:314: CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:119: CMakeFiles/simsoptpp.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Which is really weird; manually, I find the boost library at

(simsopt) abaillod@spcpc602:~/simsopt/build> ls /misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp
/misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp

Is there another environment variable I am unaware of that might be causing the trouble?

mbkumar commented 1 year ago

Uninstall boost in anaconda and try

Bharat Medasani

Engineer Princeton Plasma Physics Lab (PPPL)

On Thu, Apr 6, 2023 at 7:58 AM abaillod @.***> wrote:

Hi Rogerio! Thank you for answering.

I tried, but I still get the same error. Another thing I tried is to compile manually with cmake - going into a fresh build directory, I do ccmake .., and then press c to configure. I then get many information about the Makefile - the part related to boost is:

Boost_DIR /misc/anaconda3/envs/simsopt/lib/cmake/Boost-1.80.0 Boost_INCLUDE_DIR /misc/anaconda3/envs/simsopt/include

It seems to me that cmake finds the correct boost path; nevertheless, after generating the Makefile, running make I get:

(simsopt) @.:~/simsopt/build> make [ 4%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/format.cc.o [ 8%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/os.cc.o [ 12%] Linking CXX static library libfmt.a [ 12%] Built target fmt [ 16%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python.cpp.o [ 20%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_surfaces.cpp.o [ 24%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_curves.cpp.o [ 28%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_magneticfield.cpp.o [ 32%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_tracing.cpp.o [ 36%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_distance.cpp.o [ 40%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_py.cpp.o [ 44%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_vjp_py.cpp.o [ 48%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/regular_grid_interpolant_3d_py.cpp.o [ 52%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curve.cpp.o [ 56%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curverzfourier.cpp.o [ 60%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curvexyzfourier.cpp.o [ 64%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surface.cpp.o [ 68%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacerzfourier.cpp.o [ 72%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacexyzfourier.cpp.o [ 76%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/dommaschk.cpp.o [ 80%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/reiman.cpp.o [ 84%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o /home/abaillod/simsopt/src/simsoptpp/tracing.cpp:19:10: fatal error: boost/math/tools/roots.hpp: No such file or directory 19 | #include <boost/math/tools/roots.hpp> | ^~~~~~~~ compilation terminated. make[2]: [CMakeFiles/simsoptpp.dir/build.make:314: CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:119: CMakeFiles/simsoptpp.dir/all] Error 2 make: [Makefile:91: all] Error 2

Which is really weird; manually, I find the boost library at

(simsopt) @.***:~/simsopt/build> ls /misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp /misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp

Is there another environment variable I am unaware of that might be causing the trouble?

— Reply to this email directly, view it on GitHub https://github.com/hiddenSymmetries/simsopt/issues/298#issuecomment-1498948597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62VEGKPCP6RHEPKLBAK7LW72VVLANCNFSM6AAAAAAWS3USNA . You are receiving this because you were assigned.Message ID: @.***>

abaillod commented 1 year ago

Hi Bharat,

I still get the same error (both with the pip install . and the cmake compilation). This might be useful to find the problem:

(simsopt) abaillod@spcpc602:~/simsopt/build> conda info --all --verbose --verbose
DEBUG conda.gateways.logging:set_verbosity(236): verbosity set to 2

     active environment : simsopt
    active env location : /misc/anaconda3/envs/simsopt
            shell level : 1
       user config file : /home/abaillod/.condarc
 populated config files : /home/abaillod/.condarc
          conda version : 4.13.0
    conda-build version : 3.21.8
         python version : 3.9.12.final.0
       virtual packages : __linux=5.14.21=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /misc/anaconda3  (writable)
      conda av data dir : /misc/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /misc/anaconda3/pkgs
                          /home/abaillod/.conda/pkgs
       envs directories : /misc/anaconda3/envs
                          /home/abaillod/.conda/envs
               platform : linux-64
             user-agent : conda/4.13.0 requests/2.27.1 CPython/3.9.12 Linux/5.14.21-150400.24.46-default opensuse-leap/15.4 glibc/2.31
                UID:GID : 137447:12021
             netrc file : None
           offline mode : False

# conda environments:
#
base                     /misc/anaconda3
backup1                  /misc/anaconda3/envs/backup1
desc                     /misc/anaconda3/envs/desc
descur                   /misc/anaconda3/envs/descur
simsopt               *  /misc/anaconda3/envs/simsopt
simsopt_save             /misc/anaconda3/envs/simsopt_save
spec_analyze             /misc/anaconda3/envs/spec_analyze
spec_dev                 /misc/anaconda3/envs/spec_dev
spec_env                 /misc/anaconda3/envs/spec_env
test                     /misc/anaconda3/envs/test
vmec                     /misc/anaconda3/envs/vmec

sys.version: 3.9.12 (main, Apr  5 2022, 06:56:58) 
[G...
sys.prefix: /misc/anaconda3
sys.executable: /misc/anaconda3/bin/python
conda location: /misc/anaconda3/lib/python3.9/site-packages/conda
conda-build: /misc/anaconda3/bin/conda-build
conda-content-trust: /misc/anaconda3/bin/conda-content-trust
conda-convert: /misc/anaconda3/bin/conda-convert
conda-debug: /misc/anaconda3/bin/conda-debug
conda-develop: /misc/anaconda3/bin/conda-develop
conda-env: /misc/anaconda3/bin/conda-env
conda-index: /misc/anaconda3/bin/conda-index
conda-inspect: /misc/anaconda3/bin/conda-inspect
conda-metapackage: /misc/anaconda3/bin/conda-metapackage
conda-pack: /misc/anaconda3/bin/conda-pack
conda-render: /misc/anaconda3/bin/conda-render
conda-repo: /misc/anaconda3/bin/conda-repo
conda-server: /misc/anaconda3/bin/conda-server
conda-skeleton: /misc/anaconda3/bin/conda-skeleton
conda-token: /misc/anaconda3/bin/conda-token
conda-verify: /misc/anaconda3/bin/conda-verify
user site dirs: ~/.local/lib/python3.6
                ~/.local/lib/python3.9

CIO_TEST: <not set>
CMAKE_PREFIX_PATH: /misc/anaconda3/envs/simsopt:/misc/anaconda3/envs/simsopt/x86_64-conda-linux-gnu/sysroot/usr
CONDA_BACKUP_ADDR2LINE: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-addr2line
CONDA_BACKUP_AR: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ar
CONDA_BACKUP_AS: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-as
CONDA_BACKUP_BUILD: x86_64-conda-linux-gnu
CONDA_BACKUP_CC: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-cc
CONDA_BACKUP_CC_FOR_BUILD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-cc
CONDA_BACKUP_CFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_CMAKE_PREFIX_PATH: /misc/anaconda3/envs/simsopt2:/misc/anaconda3/envs/simsopt2/x86_64-conda-linux-gnu/sysroot/usr
CONDA_BACKUP_CONDA_BUILD_SYSROOT: /misc/anaconda3/envs/simsopt2/x86_64-conda-linux-gnu/sysroot
CONDA_BACKUP_CONDA_TOOLCHAIN_BUILD: x86_64-conda-linux-gnu
CONDA_BACKUP_CONDA_TOOLCHAIN_HOST: x86_64-conda-linux-gnu
CONDA_BACKUP_CPP: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-cpp
CONDA_BACKUP_CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt2/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt2/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/spec/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/spec/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_CXX: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-c++
CONDA_BACKUP_CXXFILT: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-c++filt
CONDA_BACKUP_CXXFLAGS: -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_CXX_FOR_BUILD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-c++
CONDA_BACKUP_DEBUG_CFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_CPPFLAGS: -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt2/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt2/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/spec/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/spec/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_CXXFLAGS: -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_FFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_FORTRANFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_ELFEDIT: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-elfedit
CONDA_BACKUP_F77: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_F90: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_F95: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-f95
CONDA_BACKUP_FC: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_FC_FOR_BUILD: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_FFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_FORTRANFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_GCC: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc
CONDA_BACKUP_GCC_AR: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc-ar
CONDA_BACKUP_GCC_NM: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc-nm
CONDA_BACKUP_GCC_RANLIB: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc-ranlib
CONDA_BACKUP_GFORTRAN: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_GPROF: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gprof
CONDA_BACKUP_GXX: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-g++
CONDA_BACKUP_HOST: x86_64-conda-linux-gnu
CONDA_BACKUP_LD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ld
CONDA_BACKUP_LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt2/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt2/lib -L/misc/anaconda3/envs/simsopt2/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt2/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt2/lib -L/misc/anaconda3/envs/simsopt2/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/spec/lib -Wl,-rpath-link,/misc/anaconda3/envs/spec/lib -L/misc/anaconda3/envs/spec/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/spec/lib -Wl,-rpath-link,/misc/anaconda3/envs/spec/lib -L/misc/anaconda3/envs/spec/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib
CONDA_BACKUP_LD_GOLD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ld.gold
CONDA_BACKUP_MESON_ARGS: --buildtype release
CONDA_BACKUP_NM: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-nm
CONDA_BACKUP_OBJCOPY: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-objcopy
CONDA_BACKUP_OBJDUMP: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-objdump
CONDA_BACKUP_RANLIB: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ranlib
CONDA_BACKUP_READELF: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-readelf
CONDA_BACKUP_SIZE: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-size
CONDA_BACKUP_STRINGS: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-strings
CONDA_BACKUP_STRIP: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-strip
CONDA_BACKUP__CONDA_PYTHON_SYSCONFIGDATA_NAME: _sysconfigdata_x86_64_conda_cos6_linux_gnu
CONDA_BACKUP_build_alias: x86_64-conda-linux-gnu
CONDA_BACKUP_host_alias: x86_64-conda-linux-gnu
CONDA_BUILD_SYSROOT: /misc/anaconda3/envs/simsopt/x86_64-conda-linux-gnu/sysroot
CONDA_DEFAULT_ENV: simsopt
CONDA_EXE: /misc/anaconda3/bin/conda
CONDA_PREFIX: /misc/anaconda3/envs/simsopt
CONDA_PROMPT_MODIFIER: (simsopt) 
CONDA_PYTHON_EXE: /misc/anaconda3/bin/python
CONDA_ROOT: /misc/anaconda3
CONDA_SHLVL: 1
CONDA_TOOLCHAIN_BUILD: x86_64-conda-linux-gnu
CONDA_TOOLCHAIN_HOST: x86_64-conda-linux-gnu
CURL_CA_BUNDLE: <not set>
MANPATH: /usr/local/man:/usr/local/share/man:/usr/share/man
MODULEPATH: /usr/share/modules:/usr/share/Modules/$MODULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/local/Modules/modulefiles
PATH: /misc/anaconda3/bin:/misc/anaconda3/envs/simsopt/bin:/misc/anaconda3/condabin:/home/abaillod/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/sbin:/misc/anaconda3/envs/simsopt/include
PYTHONSTARTUP: /etc/pythonstart
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session1
XNLSPATH: /usr/share/X11/nls
mbkumar commented 1 year ago

Is it a Mac? Or linux?

abaillod commented 1 year ago

Linux

mbkumar commented 1 year ago

Can you please post the output error after removing boost from conda?

abaillod commented 1 year ago
(simsopt) abaillod@spcpc602:~/simsopt/build> conda remove boost
Collecting package metadata (repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 4.13.0
  latest version: 23.3.1

Please update conda by running

    $ conda update -n base -c defaults conda

## Package Plan ##

  environment location: /misc/anaconda3/envs/simsopt

  removed specs:
    - boost

The following packages will be REMOVED:

  boost-1.80.0-py39h7c9e3ff_4
  boost-cpp-1.80.0-h75c5d50_0
  icu-70.1-h27087fc_0

Proceed ([y]/n)? 

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(simsopt) abaillod@spcpc602:~/simsopt/build> 
(simsopt) abaillod@spcpc602:~/simsopt/build> 
(simsopt) abaillod@spcpc602:~/simsopt/build> 
(simsopt) abaillod@spcpc602:~/simsopt/build> 
(simsopt) abaillod@spcpc602:~/simsopt/build> rm -r *
(simsopt) abaillod@spcpc602:~/simsopt/build> cmake ..
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: /misc/anaconda3/envs/simsopt/bin/python3.9 (found suitable version "3.9.16", minimum required is "3") found components: Interpreter Development.Module NumPy 
statusPython executable is /misc/anaconda3/envs/simsopt/bin/python3.9
statusPython Development Module found value is TRUE
statusPython header dirs are /misc/anaconda3/envs/simsopt/include/python3.9
statusPython library dirs are 
statusPython version is 3.9.16
-- Submodule update
-- Local build detected. Set compilation flags accordingly (march=native).
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success
-- Conda prefix is /misc/anaconda3/envs/simsopt
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found Boost: /usr/include (found suitable version "1.66.0", minimum required is "1.60.0")  
-- Boost version is 1.66.0
-- Boost include dirs are /usr/include
-- pybind11 v2.6.2 dev1
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Version: 7.1.4
-- Build type: 
-- CXX_STANDARD: 11
-- Performing Test has_std_11_flag
-- Performing Test has_std_11_flag - Success
-- Performing Test has_std_0x_flag
-- Performing Test has_std_0x_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for strtod_l
-- Looking for strtod_l - not found
-- Configuring done (1.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/abaillod/simsopt/build
(simsopt) abaillod@spcpc602:~/simsopt/build> make
[  4%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[  8%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[ 12%] Linking CXX static library libfmt.a
[ 12%] Built target fmt
[ 16%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python.cpp.o
[ 20%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_surfaces.cpp.o
[ 24%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_curves.cpp.o
[ 28%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_magneticfield.cpp.o
[ 32%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_tracing.cpp.o
[ 36%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_distance.cpp.o
[ 40%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_py.cpp.o
[ 44%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_vjp_py.cpp.o
[ 48%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/regular_grid_interpolant_3d_py.cpp.o
[ 52%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curve.cpp.o
[ 56%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curverzfourier.cpp.o
[ 60%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curvexyzfourier.cpp.o
[ 64%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surface.cpp.o
[ 68%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacerzfourier.cpp.o
[ 72%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacexyzfourier.cpp.o
[ 76%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/dommaschk.cpp.o
[ 80%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/reiman.cpp.o
[ 84%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o
/home/abaillod/simsopt/src/simsoptpp/tracing.cpp:19:10: fatal error: boost/math/tools/roots.hpp: No such file or directory
   19 | #include <boost/math/tools/roots.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/simsoptpp.dir/build.make:314: CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:119: CMakeFiles/simsoptpp.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
mbkumar commented 1 year ago

You have the system installed boost. Can you uninstall that one too?

abaillod commented 1 year ago

Not easily, although applying the following patch to the CMakeLists.txt seems to work

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb37a56f..ff7e6424 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ project(simsoptpp)
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)

+set(FORCE_DOWNLOAD_BOOST ON)
 set(Python_FIND_STRATEGY LOCATION)
 find_package(Python 3 COMPONENTS Interpreter Development.Module NumPy)

@@ -56,7 +57,12 @@ if(DEFINED ENV{CONDA_PREFIX})
 endif()

 find_package(OpenMP)
-find_package(Boost 1.60.0)
+if(NOT FORCE_DOWNLOAD_BOOST)
+  find_package(Boost 1.60.0)
+else()
+  set(Boost_FOUND FALSE)
+endif()
+
 if(Boost_FOUND)
     message(STATUS "Boost version is ${Boost_VERSION_STRING}")
     message(STATUS "Boost include dirs are ${Boost_INCLUDE_DIRS}")
lionjo commented 1 year ago

Is it resolved? I found it useful to explicitly add the conda include directory in the CXX flags: i.e. modify the line

set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast)

to

set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast -I$ENV{CONDA_PREFIX}/include")

in CMakeLists.txt.

abaillod commented 1 year ago

The problem is solved if I force the download of boost (see previous comment). @mbkumar is this something that would be useful in the master branch? Maybe implemented in a better (more robust) way?

I am not sure your fix @lionjo would work for me, as I am working in a conda environment. Thanks for your help though!

mbkumar commented 1 year ago

We have not found any issues with Boost so far. If I encounter more issues, I'll make downloading the default option instead of searching for an installed version.

Bharat Medasani

Engineer Princeton Plasma Physics Lab (PPPL)

On Thu, Apr 6, 2023 at 10:45 AM abaillod @.***> wrote:

The problem is solved if I force the download of boost (see previous comment). @mbkumar https://github.com/mbkumar is this something that would be useful in the master branch? Maybe implemented in a better (more robust) way?

I am not sure your fix @lionjo https://github.com/lionjo would work for me, as I am working in a conda environment. Thanks for your help though!

— Reply to this email directly, view it on GitHub https://github.com/hiddenSymmetries/simsopt/issues/298#issuecomment-1499182398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62VEA54DRWFAWUVUNRDWDW73JHRANCNFSM6AAAAAAWS3USNA . You are receiving this because you were mentioned.Message ID: @.***>