veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
200 stars 68 forks source link

Problems installing HyPhy on Mac #1636

Closed daedhalus closed 9 months ago

daedhalus commented 11 months ago

Hi,

After reading several issues on git, stackoverflow, stackexchange, etc. and not finding a solution, I was hoping I might find help here. I do not have a coding or IT background and only very limited knowledge about bash commands and terminal use. Maybe the solution is out there already but described in a way with jargon terms that are not understandable for a naive user like I am, thus sorry if this may be redundant.

I tried installing HyPhy for terminal use on my Mac Ventura 13.5, Apple M2 Pro chip following the directions here https://stevenweaver.github.io/hyphy-site/download/ and here https://stevenweaver.github.io/hyphy-site/installation/ .

I installed cmake first via downloading the source distribution and then using ./bootstrap, make and sudo make install which seemed to work. I also have cmake installed via homebrew after some back and forth and trying to fix issues that came up later myself. Further, I have XCode Commandline Tools and a Developer Tool Kit for Mac installed. Then, when running cmake -G Xcode . from the directory where all the hyphy stuff is, I get the following output:

-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - 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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:3 (cmake_policy):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Performing Test HAVE_AVX_EXTENSIONS
-- Performing Test HAVE_AVX_EXTENSIONS - Failed
-- Performing Test HAVE_SSE4_EXTENSIONS
-- Performing Test HAVE_SSE4_EXTENSIONS - Failed
-- Performing Test HAVE_NEON_EXTENSIONS
-- Performing Test HAVE_NEON_EXTENSIONS - Success
Set default compiler flags to -fsigned-char -O3 -D_FORTIFY_SOURCE=2  -std=c++14 -Wall
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
-- Found CURL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libcurl.tbd (found version "7.87.0")  
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libcurl.tbd
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libz.tbd (found suitable version "1.2.11", minimum required is "1.2.9")  
Node not installed; API documentation will not be generated
-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS) 
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) 
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND) 
-- Configuring done (32.0s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/amsartorius/Documents/PhD_mac/projects/first_author/OTpathway_evolution/journal_submission/03ComBio/revisions/DNDS_analyses/HyPhy/hyphy-2.5.52

I was concerned about it not finding OpenMP related things and MPI related things, but read somewhere online that those are not errors and that it is fine because clang does not use OpenMP or something so I thought "ok, maybe just continue with the next installation step and see what happens". So then I tried make MP2, make MPI, make LBI and make install and none of them worked, giving me these messages:

make: *** No rule to make target `MP2'.  Stop.
make: *** No rule to make target `MPI'.  Stop.
make: *** No rule to make target `LBI'.  Stop.
make: *** No rule to make target `install'.  Stop.

I also tried the following things at some point after diving into some stackoverflow and git threads:

Now I am running out of ideas. I am very grateful for any help and want to emphasize again that I am a novice user and do not have a coding background, so maybe small things like not being in the right directory when executing commands may already fix the issue.

Thank you :)

spond commented 11 months ago

Dear @daedhalus,

MP2 is not a valid taget. MPI won't be available without MPI present.

Have you tried the following??

make MP

or

make

Regarding the missing libraries. You should be able to install openmpi (for MPI) using homebrew (https://formulae.brew.sh/formula/open-mpi#default). OpenMP is support by gcc (it's probably easiest).

So you can

brew install gcc
....

cd hyphy_directory
rm -rf CMakeFiles CMakeCache*
CC=/path/to/gcc CXX=/path/to/g++ cmake ./
make 

Best, Sergei

github-actions[bot] commented 9 months ago

Stale issue message