stephaneguindon / phyml

PhyML -- Phylogenetic estimation using (Maximum) Likelihood
GNU General Public License v3.0
175 stars 61 forks source link

failure to compile phyml on macOS - call to undeclared function 'VELOC_Velocity_Variance_Along_Edge' #193

Closed ludjwick closed 3 months ago

ludjwick commented 4 months ago

I am working on macOS Sonoma 14.5 and I tried to install PhyML by following the instruction on github, running

sh ./autogen.sh
brew install pkg-config autoconf automake
./configure --enable-phyml
make

After this, I get the following error:


.:  Building [phyml]. Version 3.3.20230824 :.

gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT utilities.o -MD -MP -MF .deps/utilities.Tpo -c -o utilities.o utilities.c
utilities.c:11717:47: error: call to undeclared function 'VELOC_Velocity_Variance_Along_Edge'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      for(i=0;i<tree->mmod->n_dim;++i) var += VELOC_Velocity_Variance_Along_Edge(d,i,tree);
                                              ^
utilities.c:11743:43: error: call to undeclared function 'VELOC_Velocity_Variance_Along_Edge'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  for(i=0;i<tree->mmod->n_dim;++i) var += VELOC_Velocity_Variance_Along_Edge(d,i,tree);
                                          ^
2 errors generated.
make[2]: *** [utilities.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I'll add that I don't have experience with C compilers, apologies if there's an easy solution. Thanks in advance for the help.

hwells-biotia commented 3 months ago

Hi, I ran into the same error and wanted to pass along a solution I found. This VELOC_Velocity_Variance_Along_Edge function was added in a recent commit (within the last month or so) so I imagine there is some ongoing development here. I was able to circumvent this issue by rolling back to the commit right before these changes were implemented which you can get to by running the following from your cloned git repository:

git checkout daf6c9104e4b63b601a95e4a862fcc19c6643fbb

Hope this helps, Heather

stephaneguindon commented 3 months ago

Yes, sorry about that. I've just fixed this issue and PhyML should now compile normally. See 7059fdc.

harmanshal commented 3 months ago

cannot find 7059fdc

Yes, sorry about that. I've just fixed this issue and PhyML should now compile normally. See 7059fdc.

stephaneguindon commented 3 months ago

Forgot to push... Here it is: 7059fdc