amusecode / amuse

Astrophysical Multipurpose Software Environment. This is the main repository for AMUSE
http://www.amusecode.org
Apache License 2.0
152 stars 98 forks source link

Problem installing amuse-brutus #1037

Closed carpark421 closed 1 month ago

carpark421 commented 4 months ago

Please can someone offer an insight into how to fix my problem? The output is:

  error in call, tail output:

  amusifier --type=c interface.py BrutusInterface -o worker_code.cc
  amusifier --type=H -i amuse.community.interface.stopping_conditions.StoppingConditionInterface interface.py BrutusInterface -o worker_code.h
  make -C src all CXXFLAGS="-g -O2 -fno-common  -I./mpfrc++     -std=c++0x -I../mpfrc++"
  g++ -O1 -g -O2 -fno-common  -I./mpfrc++     -std=c++0x -I../mpfrc++ -c Star.cpp
  In file included from Star.cpp:1:
  In file included from ./Star.h:6:
  ../mpfrc++/mpreal.h:125:10: fatal error: 'mpfr.h' file not found
  #include <mpfr.h>
           ^~~~~~~~
  1 error generated.
  make[1]: *** [Star.o] Error 1
  make: *** [src/libbrutus.a] Error 2
spzwart commented 4 months ago

Looks like you have not installed the mpfr libraries...

Simon

On Sun, Mar 10, 2024, 19:06 carpark421 @.***> wrote:

Please can someone offer an insight into how to fix my problem? The output is:

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

× Building wheel for amuse-brutus (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [114 lines of output] WARNING setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section' running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/amuse creating build/lib/amuse/community creating build/lib/amuse/community/brutus copying src/amuse/community/brutus/_version.py -> build/lib/amuse/community/brutus copying src/amuse/community/brutus/interface.py -> build/lib/amuse/community/brutus copying src/amuse/community/brutus/init.py -> build/lib/amuse/community/brutus running build_codes building libraries and community codes build, for logging, see 'build.log' creating build/temp.macosx-11.1-arm64-cpython-311 creating build/temp.macosx-11.1-arm64-cpython-311/codes creating build/temp.macosx-11.1-arm64-cpython-311/codes/brutus copying src/amuse/community/brutus/_version.py -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus copying src/amuse/community/brutus/Makefile -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus copying src/amuse/community/brutus/interface.py -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus copying src/amuse/community/brutus/init.py -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus copying src/amuse/community/brutus/interface.cc -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus creating build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/mpfrc++ copying src/amuse/community/brutus/mpfrc++/mpreal.h -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/mpfrc++ creating build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Cluster.h -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Bulirsch_Stoer.cpp -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Star.cpp -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Brutus.cpp -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/makefile -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Bulirsch_Stoer.h -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Star.h -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Brutus.h -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/Cluster.cpp -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src copying src/amuse/community/brutus/src/main.cpp -> build/temp.macosx-11.1-arm64-cpython-311/codes/brutus/src [17:48:25] building brutus error in call, tail output:

amusifier --type=c interface.py BrutusInterface -o worker_code.cc amusifier --type=H -i amuse.community.interface.stopping_conditions.StoppingConditionInterface interface.py BrutusInterface -o worker_code.h make -C src all CXXFLAGS="-g -O2 -fno-common -I./mpfrc++ -std=c++0x -I../mpfrc++" g++ -O1 -g -O2 -fno-common -I./mpfrc++ -std=c++0x -I../mpfrc++ -c Star.cpp In file included from Star.cpp:1: In file included from ./Star.h:6: ../mpfrc++/mpreal.h:125:10: fatal error: 'mpfr.h' file not found

include

       ^~~~~~~~

1 error generated. make[1]: [Star.o] Error 1 make: [src/libbrutus.a] Error 2

— Reply to this email directly, view it on GitHub https://github.com/amusecode/amuse/issues/1037, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCPFTGWJEEARALZ7ZTVZK3YXSOJDAVCNFSM6AAAAABEPE4AJKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TOOBTGI2TENQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

carpark421 commented 4 months ago

I did brew install mpfr before receiving this output. Would that not have tried to fix it?

rieder commented 4 months ago

If you installed mpfr after installing amuse-framework, it would not be present in the amuse config, which would lead to this error.

carpark421 commented 4 months ago

Yes, what I did was naïvely uninstall amuse-framework and mpfr. I then installed mpfr, amuse-framework, and then finally tried pip install amuse-brutus: same error.

rieder commented 4 months ago

Unfortunately this will indeed fail, because pip packages are cached after building them. You would have to remove the cached pip wheels (I think in ~/Library/cache/pip, but please check), and then re-install amuse-framework.

carpark421 commented 4 months ago

I thought that would be the case, so, when uninstalling the stuff, I did this: rm -r ~/Library/Caches/pip/wheels/*

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.