stephaneguindon / phyml

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

Failing to compile phytime and rf #157

Closed V-Z closed 2 years ago

V-Z commented 2 years ago

Hello, I try to compile phytime as follows:

./autogen.sh
./configure --enable-phytime
make
...
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT mcmc.o -MD -MP -MF .deps/mcmc.Tpo -c -o mcmc.o mcmc.c
mcmc.c: In function ‘MCMC_Root_Time’:
mcmc.c:1505:3: warning: implicit declaration of function ‘PHYREX_Update_Ldsk_Rates_Given_Edges’ [-Wimplicit-function-declaration]
 1505 |   PHYREX_Update_Ldsk_Rates_Given_Edges(tree);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f .deps/mcmc.Tpo .deps/mcmc.Po
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT stats.o -MD -MP -MF .deps/stats.Tpo -c -o stats.o stats.c
...
gcc  -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native   -o phytime main.o utilities.o optimiz.o lk.o bionj.o models.o free.o help.o simu.o eigen.o pars.o alrt.o interface.o cl.o spr.o times.o draw.o rates.o mcmc.o stats.o mg.o tiporder.o io.o make.o mixt.o init.o nexus.o date.o tbe.o sse.o avx.o ancestral.o xml.o -lm -lm
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: tiporder.o: in function `TIPO_main':
tiporder.c:(.text+0x4f2c): undefined reference to `Wrap_Geo_Lk'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: mcmc.o: in function `MCMC_Root_Time':
mcmc.c:(.text+0x3ee0): undefined reference to `PHYREX_Update_Ldsk_Rates_Given_Edges'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1687: phytime] Error 1
make[2]: Leaving directory „/home/vojta/balickovani/home:vojtaeus/PhyML-phytime/phyml-3.3.20211021/src“
make[1]: *** [Makefile:365: all-recursive] Error 1
make[1]: Leaving directory „/home/vojta/balickovani/home:vojtaeus/PhyML-phytime/phyml-3.3.20211021“
make: *** [Makefile:306: all] Error 2

Similarly for rf:

./autogen.sh
./configure --enable-rf
make
...
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT mcmc.o -MD -MP -MF .deps/mcmc.Tpo -c -o mcmc.o mcmc.c
mcmc.c: In function ‘MCMC_Root_Time’:
mcmc.c:1505:3: warning: implicit declaration of function ‘PHYREX_Update_Ldsk_Rates_Given_Edges’ [-Wimplicit-function-declaration]
 1505 |   PHYREX_Update_Ldsk_Rates_Given_Edges(tree);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f .deps/mcmc.Tpo .deps/mcmc.Po
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT times.o -MD -MP -MF .deps/times.Tpo -c -o times.o times.c
...
mv -f .deps/sse.Tpo .deps/sse.Po
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT avx.o -MD -MP -MF .deps/avx.Tpo -c -o avx.o avx.c
mv -f .deps/avx.Tpo .deps/avx.Po
gcc  -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native   -o rf main.o utilities.o optimiz.o lk.o bionj.o models.o free.o help.o simu.o eigen.o pars.o alrt.o interface.o cl.o spr.o draw.o stats.o rates.o mcmc.o times.o tiporder.o mg.o io.o make.o nexus.o init.o xml.o mixt.o tbe.o date.o ancestral.o sse.o avx.o -lm -lm
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: tiporder.o: in function `TIPO_main':
tiporder.c:(.text+0x4f2c): undefined reference to `Wrap_Geo_Lk'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: mcmc.o: in function `MCMC_Root_Time':
mcmc.c:(.text+0x3ee0): undefined reference to `PHYREX_Update_Ldsk_Rates_Given_Edges'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: mcmc.o: in function `MCMC_One_Node_Rate':
mcmc.c:(.text+0x14c27): undefined reference to `Wrap_Lk_Rates'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1691: rf] Error 1
make[2]: Leaving directory „/home/vojta/balickovani/home:vojtaeus/PhyML-rf/phyml-3.3.20211021/src“
make[1]: *** [Makefile:365: all-recursive] Error 1
make[1]: Leaving directory „/home/vojta/balickovani/home:vojtaeus/PhyML-rf/phyml-3.3.20211021“
make: *** [Makefile:306: all] Error 2

Such compilation of Summer 2020 release is completely fine, but Autumn 2021 fails. Building "basic" PhyML as well as MPI version is fine in any case. More generally, which feature --enable-xxx from configure am I supposed to build? :-) Would it be possible to build more binaries in single step (e.g. --enable-phyml --enable-phyml-mpi --enable-rf)? This has always failed for me in any version...

stephaneguindon commented 2 years ago

Hi there, Sorry for the delay in responding. I took this issue as an opportunity to do a fair bit of code cleaning, which took me a while. I have updated the Autumn 2021 release. Please feel free to take a look. Regards, -Stephane-

V-Z commented 2 years ago

Hello, thank You for the update. Now, I'm able to compile with --enable-phyml, --enable-phyml-mpi, --enable-phyrex, --enable-phytime and --enable-rf.

Compilation with --enable-test keeps failing (Well, am I supposed to compile that? It was working with the Summer 2020 release...):

./autogen.sh
./configure --enable-test
make
...
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT avx.o -MD -MP -MF .deps/avx.Tpo -c -o avx.o avx.c
mv -f .deps/avx.Tpo .deps/avx.Po
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT ancestral.o -MD -MP -MF .deps/ancestral.Tpo -c -o ancestral.o ancestral.c
mv -f .deps/ancestral.Tpo .deps/ancestral.Po
gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -MT date.o -MD -MP -MF .deps/date.Tpo -c -o date.o date.c
mv -f .deps/date.Tpo .deps/date.Po
gcc  -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native   -o test main.o utilities.o optimiz.o lk.o bionj.o models.o free.o help.o simu.o eigen.o pars.o alrt.o interface.o cl.o spr.o draw.o tbe.o stats.o rates.o mcmc.o times.o mg.o io.o make.o nexus.o init.o xml.o mixt.o sse.o avx.o ancestral.o date.o -lm -lm
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: mcmc.o: in function `MCMC_One_Node_Rate':
mcmc.c:(.text+0x14c17): undefined reference to `Wrap_Lk_Rates'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1656: test] Error 1
make[2]: Leaving directory „/home/vojta/balickovani/home:vojtaeus/PhyML-test/phyml-3.3.20211118/src“
make[1]: *** [Makefile:365: all-recursive] Error 1
make[1]: Leaving directory „/home/vojta/balickovani/home:vojtaeus/PhyML-test/phyml-3.3.20211118“
make: *** [Makefile:306: all] Error 2

Mostly similar errors I get also for --enable-tiporder, --enable-part, --enable-phycont (well, it requires continuous.h, I'm not sure what this dependency is), --enable-evolve, --enable-invitee, --enable-geo, --enable-checkpoint, --enable-phyrexsim and --enable-date. Interestingly, with --enable-rwrap compilation works, but it doesn't produce any binary, so I'm not sure... :-) So, which of the --enable-XXX flags am I supposed to use? Which modules should work?

So far You can see my packaging for Linux:

The others failing are not packaged (I just tried locally, but as they were never working, i haven't submitted the packages).

stephaneguindon commented 2 years ago

Hi there. I would focus only on phyml, phyml-mpi (--enable-phyml-mpi) and phyrex (--enable-phyrex) right now when it comes to packaging tools for Linux. These three binaries are relatively stable. The others are not. I use them mostly on my side for experimental purposes.

V-Z commented 2 years ago

OK, so we let it as it is now. :-)