[Debian-med-packaging] Problems building latest phyml

Andreas Tille andreas at an3as.eu
Sat Jun 24 19:13:20 UTC 2017


Hi Stephane,

I'm currently busy trying to build

     3.3.20170530

but I do not manage to build it.  By the help of some other Debian developers
I developed some patches here

     https://anonscm.debian.org/cgit/debian-med/phyml.git/tree/debian/patches

I severely doubt that you can build phyml without the two patches starting with
fix_* in the name.  But even with these patches the build ends up with

...
gcc  -g -O2 -fdebug-prefix-map=/build/phyml-3.3.20170530+dfsg=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/libhmsbeagle-1 -DBEAGLE  -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-z,now -o phyml-beagle 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 m4.o io.o make.o nexus.o init.o xml.o mixt.o beagle_utils.o -lm -lhmsbeagle -lm 
spr.o: In function `Prune_Regraft_Time_Tree':
./src/spr.c:2087: undefined reference to `DATE_List_Of_Regraft_Nodes'
./src/spr.c:2184: undefined reference to `DATE_Assign_Primary_Calibration'
./src/spr.c:2208: undefined reference to `DATE_Assign_Primary_Calibration'
mcmc.o: In function `MCMC_Prune_Regraft':
./src/mcmc.c:5107: undefined reference to `DATE_List_Of_Regraft_Nodes'
./src/mcmc.c:5256: undefined reference to `DATE_Assign_Primary_Calibration'
./src/mcmc.c:5294: undefined reference to `DATE_Assign_Primary_Calibration'
./src/mcmc.c:5138: undefined reference to `DATE_List_Of_Regraft_Nodes'
mcmc.o: In function `MCMC_Prune_Regraft_Weighted':
./src/mcmc.c:5524: undefined reference to `DATE_Assign_Primary_Calibration'
./src/mcmc.c:5558: undefined reference to `DATE_Assign_Primary_Calibration'
mcmc.o: In function `MCMC_Prune_Regraft_Local':
./src/mcmc.c:5943: undefined reference to `DATE_Assign_Primary_Calibration'
./src/mcmc.c:5981: undefined reference to `DATE_Assign_Primary_Calibration'
times.o: In function `TIMES_Lk_Times':
./src/times.c:697: undefined reference to `DATE_Update_T_Prior_MinMax'
times.o: In function `TIMES_Randomize_Tree_With_Time_Constraints':
./src/times.c:1803: undefined reference to `DATE_Assign_Primary_Calibration'
./src/times.c:1804: undefined reference to `DATE_Update_T_Prior_MinMax'
./src/times.c:1822: undefined reference to `DATE_Check_Calibration_Constraints'
./src/times.c:1826: undefined reference to `DATE_Check_Time_Constraints'
beagle_utils.o: In function `update_beagle_partials':
./src/beagle_utils.c:217: undefined reference to `Set_All_P_Lk'
collect2: error: ld returned 1 exit status


which I have no idea how to fix.  Could you check these issues please.

Kind regards

       Andreas.

On Thu, Aug 18, 2016 at 03:33:12PM +0200, Stephane Guindon wrote:
> Hi Andreas (et al.),
> 
> Thanks for all this. I've made a few very dirty commit early on this summer
> and hoping to clean up all this sometime in Septembre. It might be a good
> idea to wait until to build a Debian package for PhyML...
> 
> Regards,
> 
> -Stephane-
> 
> 
> On 17/08/2016 16:33, Andreas Tille wrote:
> > Hi,
> > 
> > involving upstream into the discussion now.
> > 
> > On Wed, Aug 17, 2016 at 02:48:35PM +0100, James Cowgill wrote:
> > > > So lets come to the real build errors of [1]: I just fixed the first issue
> > > > in a new patch (please git pull) but I do not understand this one:
> > 
> > Stephane, I've created a simple fix for a missing declaration[2].
> > 
> > Remark: Back than when I was doing some C programming I was told to use
> > register variables when tying to swap values.  May be the compiler does
> > this now on its own ...
> > 
> > > > ...
> > > > gcc  -I. -I..   -Wdate-time -D_FORTIFY_SOURCE=2  -Wall -O2 -msse -fomit-frame-pointer -funroll-loops -Wempty-body -Wuninitialized  -I/usr/include/libhmsbeagle-1 -lhmsbeagle -ldl  -c -o lk.o lk.c
> > > > lk.c: In function 'Update_PMat_At_Given_Edge':
> > > > lk.c:2449:31: error: invalid initializer
> > > >         int p_matrices[1]     = b_fcus->Pij_rr_idx;
> > > >                                 ^~~~~~
> > > > lk.c:2450:31: error: invalid initializer
> > > >         double branch_lens[1] = len;
> > > 
> > > You can't initialize an array with a scalar value (double[] != double).
> > > Also, using an array of fixed size 1 is a code smell (why use an array
> > > at all?)
> > > 
> > > The quick fix here is probably to wrap the values in curly braces to
> > > form a correct array initializer.
> > 
> > My patch [3] implements this hint given by James (thanks for the hint)
> > but I agree with James that this code looks a bit suspicious - thus I
> > would like to clarify whether this is really what should be done.
> > 
> > Unfortunately this is not the last issue.  I'm also running into a
> > linker error which I do not have time to track down for the moment:
> > 
> > libtool: link: gcc -Wall -O2 -msse -fomit-frame-pointer -funroll-loops -Wempty-body -Wuninitialized -I/usr/include/libhmsbeagle-1 -Wl,-z -Wl,relro -o phyml-beagle 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 m4.o io.o make.o nexus.o init.o xml.o mixt.o beagle_utils.o  -ldl -lhmsbeagle -lm
> > times.o: In function `TIMES_Lk_Birth_Death':
> > times.c:(.text+0x47cd): undefined reference to `DATE_J_Sum_Product'
> > times.o: In function `TIMES_Randomize_Tree_With_Time_Constraints':
> > times.c:(.text+0x62c8): undefined reference to `DATE_Assign_Primary_Calibration'
> > times.c:(.text+0x62d0): undefined reference to `DATE_Update_T_Prior_MinMax'
> > times.c:(.text+0x63b7): undefined reference to `DATE_Check_Calibration_Constraints'
> > times.c:(.text+0x63c5): undefined reference to `DATE_Check_Time_Constraints'
> > collect2: error: ld returned 1 exit status
> > Makefile:1738: recipe for target 'phyml-beagle' failed
> > 
> > 
> > Kind regards
> > 
> >         Andreas.
> > 
> > 
> > [2] https://anonscm.debian.org/cgit/debian-med/phyml.git/tree/debian/patches/fix_declaration_of_temp.patch
> > [3] https://anonscm.debian.org/cgit/debian-med/phyml.git/tree/debian/patches/fix_wrong_initialisation_of_array.patch
> > 
> 
> 

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list