Re: Ups, pbuilder chroot broken - here comes the real build error (Was: New version of phyml: Can't exec "gcc": No such file or directory)

2016-08-17 Thread James Cowgill
Hi,

On 17/08/16 14:36, Andreas Tille wrote:
> On Wed, Aug 17, 2016 at 01:55:23PM +0100, James Cowgill wrote:
>>
>> I think there might be something up with your pbuilder chroot.s
> 
> After updating this the strange error vanished - sorry for the noise.
> 
>> At least
>> the initial stages of the build work fine for me with sbuild (gcc errors
>> out later though).
> 
> 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:
> 
> ...
> 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.

James



signature.asc
Description: OpenPGP digital signature


Ups, pbuilder chroot broken - here comes the real build error (Was: New version of phyml: Can't exec "gcc": No such file or directory)

2016-08-17 Thread Andreas Tille
Hi James,

On Wed, Aug 17, 2016 at 01:55:23PM +0100, James Cowgill wrote:
> 
> I think there might be something up with your pbuilder chroot.s

After updating this the strange error vanished - sorry for the noise.

> At least
> the initial stages of the build work fine for me with sbuild (gcc errors
> out later though).

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:

...
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;
   ^~~
Makefile:1847: recipe for target 'lk.o' failed
make[4]: *** [lk.o] Error 1
...


Any idea?

Kind regards

  Andreas.


[1] https://anonscm.debian.org/git/debian-med/phyml.git

-- 
http://fam-tille.de