[Debian-med-packaging] Problems building latest phyml

Stephane Guindon stephane.guindon at lirmm.fr
Thu Aug 18 13:33:12 UTC 2016


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
>



More information about the Debian-med-packaging mailing list