[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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)



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

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: