veg / hyphy

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

HYPHY installation error #789

Closed nooryoussef closed 6 years ago

nooryoussef commented 6 years ago

Hi team,

I am following the HYPHY install instructions from the website. Everything was working fine until I arrive at this error message at the "make MPI" step:

[  0%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/_hyExecutionContext.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/alignment.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllist.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistx.cpp.o
[  8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl.cpp.o
[  8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl_iterator.cpp.o
[ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/baseobj.cpp.o
[ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan.cpp.o
[ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan2.cpp.o
[ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanhelpers.cpp.o
[ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanruntime.cpp.o
[ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/calcnode.cpp.o
/home/hyphy/src/core/calcnode.cpp:5935:29: error: invalid operands to binary expression ('int' and 'nullptr_t')
    if (iterator->is_root() == nil && layout == 1) {
        ~~~~~~~~~~~~~~~~~~~ ^  ~~~
1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[2]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[1]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make: stopped in /usr/home/hyphy

Any suggestion as to how to proceed?

Thanks!

stevenweaver commented 6 years ago

Dear @GenStud,

This may be due to a later version of clang. If I recall correctly, later versions of clang are more strict with comparisons of different types during static analysis.

Can you confirm which platform and compiler you are using?

Best, Steven

On May 9, 2018, at 6:55 AM, GenStud notifications@github.com wrote:

Hi team,

I am following the HYPHY install instructions from the website. Everything was working fine until I arrive at this error message at the "make MPI" step:

[ 0%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/_hyExecutionContext.cpp.o [ 4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/alignment.cpp.o [ 4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllist.cpp.o [ 4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistx.cpp.o [ 8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl.cpp.o [ 8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl_iterator.cpp.o [ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/baseobj.cpp.o [ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan.cpp.o [ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan2.cpp.o [ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanhelpers.cpp.o [ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanruntime.cpp.o [ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/calcnode.cpp.o /home/hyphy/src/core/calcnode.cpp:5935:29: error: invalid operands to binary expression ('int' and 'nullptr_t') if (iterator->is_root() == nil && layout == 1) {


1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[2]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[1]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make: stopped in /usr/home/hyphy
Any suggestion as to how to proceed?

Thanks!

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <https://github.com/veg/hyphy/issues/789>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAgq3ReLiulZL7YhZRriErMk2J-cpNXvks5twvVPgaJpZM4T4XSc>.
nooryoussef commented 6 years ago

Hi Steven,

I think I was able to get the info you were asking for: Platform: FreeBSD 11.1 64 bits Compiler: clang version 4.0.0

Is that all? Thanks again

stevenweaver commented 6 years ago

Dear @GenStud,

Yes. Unfortunately, we haven't tested the HYPHYMPI target with clang on FreeBSD. I am able to compile the HYPHYMPI target on macOS using the system's default clang installation. Can you please confirm you are using the latest version of HyPhy?

This should be a straightforward fix, but I will need to be able to replicate the error first before fixing.

Best, Steven

nooryoussef commented 6 years ago

Hi Steven,

I followed the installation instructions and did: git clone https://github.com/veg/hyphy.git

That should be cloning the latest hyphy version (I think?)

This is exactly what I did/ have so far:

% git clone https://github.com/veg/hyphy.git
Cloning into 'hyphy'...
remote: Counting objects: 22999, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 22999 (delta 0), reused 0 (delta 0), pack-reused 22997
Receiving objects: 100% (22999/22999), 70.38 MiB | 6.06 MiB/s, done.
Resolving deltas: 100% (16900/16900), done.
Checking out files: 100% (1073/1073), done.
% cd hyphy
% cmake .
-- The C compiler identification is Clang 4.0.0
-- The CXX compiler identification is Clang 4.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_AVX_EXTENSIONS
-- Performing Test HAVE_AVX_EXTENSIONS - Failed
-- Performing Test HAVE_SSE3_EXTENSIONS
-- Performing Test HAVE_SSE3_EXTENSIONS - Failed
Set compiler flags to -fsigned-char -O3
-- 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: /usr/local/lib/libcurl.so (found version "7.59.0") 
-- Found PythonInterp: /usr/local/bin/python (found version "2.7.14") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Could NOT find OpenCL (missing: OPENCL_LIBRARIES) 
-- Found MPI_C: /usr/local/lib/libmpi.so (found version "3.1") 
-- Found MPI_CXX: /usr/local/lib/libmpicxx.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hyphy
% make MPI
Scanning dependencies of target HYPHYMPI
[  0%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/_hyExecutionContext.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/alignment.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllist.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistx.cpp.o
[  8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl.cpp.o
[  8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl_iterator.cpp.o
[ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/baseobj.cpp.o
[ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan.cpp.o
[ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan2.cpp.o
[ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanhelpers.cpp.o
[ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanruntime.cpp.o
[ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/calcnode.cpp.o
/home/hyphy/src/core/calcnode.cpp:5935:29: error: invalid operands to binary expression ('int' and 'nullptr_t')
    if (iterator->is_root() == nil && layout == 1) {
        ~~~~~~~~~~~~~~~~~~~ ^  ~~~
1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[2]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[1]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make: stopped in /usr/home/hyphy
spond commented 6 years ago

Dear @GenStud,

Good catch, LLVM. iterator->is_root() returns a bool (it used to be something different), so you can just edit the offending line to read

if (!iterator->is_root() && layout == 1)

and recompile.

Best, Sergei

nooryoussef commented 6 years ago

Hi Sergei,

Thanks for the response. I changed the specified line in calcnode.cpp. But I am now getting the following error.

% make MPI
Scanning dependencies of target HYPHYMPI
[  0%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/_hyExecutionContext.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/alignment.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllist.cpp.o
[  4%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistx.cpp.o
[  8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl.cpp.o
[  8%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/avllistxl_iterator.cpp.o
[ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/baseobj.cpp.o
[ 12%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan.cpp.o
[ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlan2.cpp.o
[ 16%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanhelpers.cpp.o
[ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/batchlanruntime.cpp.o
[ 20%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/calcnode.cpp.o
[ 25%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/calcnode2.cpp.o
[ 25%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/category.cpp.o
[ 29%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/constant.cpp.o
[ 29%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/error.cpp.o
[ 29%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/fisher_exact.cpp.o
[ 33%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/formula.cpp.o
[ 33%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/fstring.cpp.o
[ 37%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/global_object_lists.cpp.o
[ 37%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/hbl_env.cpp.o
[ 41%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/likefunc.cpp.o
[ 41%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/likefunc2.cpp.o
[ 45%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/likefuncocl.cpp.o
[ 45%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/list.cpp.o
[ 50%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/mathobj.cpp.o
[ 50%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/matrix.cpp.o
[ 54%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/nexus.cpp.o
[ 54%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/operation.cpp.o
[ 54%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/parser.cpp.o
[ 58%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/parser2.cpp.o
[ 58%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/polynoml.cpp.o
[ 62%] Building CXX object CMakeFiles/HYPHYMPI.dir/src/core/regex.cpp.o
/home/hyphy/src/core/regex.cpp:35:10: fatal error: 'alloca.h' file not found
#include <alloca.h>
         ^~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[2]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make[1]: stopped in /usr/home/hyphy
*** Error code 1

Stop.
make: stopped in /usr/home/hyphy

We made it a little further this time! Thanks again for your help

spond commented 6 years ago

Dear @GenStud,

alloca.h is a standard Linux/GNU file. You should to make sure it is available on your system in standard include directories.

Best, Sergei

Jehops commented 6 years ago

The alloca(3) function is found in on GNU/Linux, FreeBSD and other operating systems, so could this #include be removed? The build works without it on FreeBSD.

P.S., I just created a hyphy OS package for FreeBSD. I will submit it to the FreeBSD ports tree after a bit more testing.

stevenweaver commented 6 years ago

Thanks to @Jehops, this issue should be resolved with HyPhy 2.3.12.

Jehops commented 6 years ago

Unless I am missing something, the original issue (first comment) is still present in 2.3.12. I will submit another PR.