Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac install libchord.so issue #104

Closed
htjb opened this issue Oct 23, 2023 · 2 comments
Closed

Mac install libchord.so issue #104

htjb opened this issue Oct 23, 2023 · 2 comments

Comments

@htjb
Copy link

htjb commented Oct 23, 2023

Having trouble installing pypolychord on a Mac system. Running macOS 13.5 on an M2 max chip with python3.11. I went through different variants of install from source the simplest being

pip3 install https://github.com/PolyChord/PolyChordLite/archive/master.zip

and I consistently get the following error message

subprocess.CalledProcessError: Command '['make', '-e', 'libchord.so']' returned non-zero exit status 2.

when I run make -e libchord.so after git cloning the repo I get the following

/Library/Developer/CommandLineTools/usr/bin/make -C /Users/harrybevins/Documents/Software/PolyChordLite/src/polychord /Users/harrybevins/Documents/Software/PolyChordLite/lib/libchord.so
mpifort -shared abort.o array_utils.o calculate.o chordal_sampling.o clustering.o feedback.o generate.o ini.o interfaces.o maximiser.o mpi_utils.o nelder_mead.o nested_sampling.o params.o priors.o random_utils.o read_write.o run_time_info.o settings.o utils.o c_interface.o -o /Users/harrybevins/Documents/Software/PolyChordLite/lib/libchord.so -lc++ -install_name @loader_path/pypolychord/lib/libchord.so
ld: unknown options: -commons
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/harrybevins/Documents/Software/PolyChordLite/lib/libchord.so] Error 1
make: *** [/Users/harrybevins/Documents/Software/PolyChordLite/lib/libchord.so] Error 2

Up until recently I had polychord working on this system with python3.8 but I upgraded python version and ran into issues.

Hopefully this is an obvious fix (don't use Mac) that I am just missing.

@htjb
Copy link
Author

htjb commented Oct 23, 2023

I ran

brew reinstall gcc

and it magically fixed the polychord install issue I was having.

@htjb htjb closed this as completed Oct 23, 2023
@appetrosyan
Copy link
Contributor

This flag is automatically inserted due to the default GCC configuration. When reinstalling, the configuration is updated, and the -commons flag, which was a crutch is being removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants