wtsi-npg / npg_conda

NPG Conda recipes and tools
1 stars 15 forks source link

baton 2.0.1 fails to build with Werror=stringop-overflow #185

Closed kjsanger closed 3 years ago

kjsanger commented 4 years ago
ERROR:root:In file included from /opt/conda/conda-bld/baton-pkg_1598436768177/_build_env/x86_64-conda-linux-gnu/sysroot/usr/include/string.
h:637,                                                                                                                                     
ERROR:root:                 from query.c:30:                                                                                               
ERROR:root:query.c: In function 'prepare_obj_repl_list':                                                                                   
ERROR:root:query.c:287:5: error: '__builtin_strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflo
w=]                                                                                                                                        
ERROR:root:  287 |     strncpy(path1, path, len);                                                                                          
ERROR:root:      |     ^~~~~~~                                                                                                             
ERROR:root:query.c:280:18: note: length computed here                                                                                      
ERROR:root:  280 |     size_t len = strlen(path) + 1;                                                                                      
ERROR:root:      |                  ^~~~~~~~~~~~     
kjsanger commented 4 years ago

This looks to be triggered by a change in GCC version (observed with Conda GCC 9.3)

kjsanger commented 4 years ago

Resolved by #195