Skip to content

Debian builds of 1.0.13 fail: BayesCBC.c

Seen with Debian Buster (gcc 8.3.0), Bullseye (10.2.1), Ubuntu Focal (9.4.0):

[ 36%] Building C object src/CMakeFiles/libbayeswave.dir/BayesCBC.c.o                                                                                                                                                                                                                   
cd /build/bayeswave-1.0.13/obj-x86_64-linux-gnu/src && /usr/bin/cc -Dlibbayeswave_EXPORTS  -g -O2 -fdebug-prefix-map=/build/bayeswave-1.0.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fopenmp -fPIC   -std=gnu11 -o CMakeFiles/libbayeswave.dir/BayesCBC.c.o   -c /build/bayeswave-1.0.13/src/BayesCBC.c                                                                                                                                                                                                                    
In file included from /build/bayeswave-1.0.13/src/BayesCBC.c:22:                                                                                                                                                                                                                        
/build/bayeswave-1.0.13/src/BayesCBC.c: In function 'fringdown':                                                                                                                                                                                                                        
/build/bayeswave-1.0.13/src/BayesCBC.c:217:8: error: expected '(' before '__builtin_isnan'                                                                                                                                                                                              
     if isnan(f) {                                                                                                                                                                                                                                                                      
        ^~~~~                                                                                                                                                                                                                                                                           
/build/bayeswave-1.0.13/src/BayesCBC.c: In function 'ParseInjectionXMLParameters':                                                                                                                                                                                                      
/build/bayeswave-1.0.13/src/BayesCBC.c:5924:9: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]                                                                                                                                 
         fscanf(in, "%500[^\n]\n", stream);                                                                                                                                                                                                                                             
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                              
make[3]: *** [src/CMakeFiles/libbayeswave.dir/build.make:196: src/CMakeFiles/libbayeswave.dir/BayesCBC.c.o] Error 1                                                                                                                                                                     
make[3]: Leaving directory '/build/bayeswave-1.0.13/obj-x86_64-linux-gnu'                                                                                                                                                                                                               

Adding parentheses around this offending isnan() seems to silence the compiler.

Edited by Steffen Grunewald