This package currently fails to build (at least on the amd64
architecture) with link time optimizations enabled. For a background
for LTO please see
https://wiki.debian.org/ToolChain/LTO
The goal is to enable this optimization by default in an upcoming
Debian release in dpkg-buildflags for 64bit architectures. The goal
is to get this package to build with link time optimizations, or to
explicitly disable link time optimizations for this package build.
To reproduce the build failure, enable the lto optimization in
testing/unstable by adding "optimize=+lto" to DEB_BUILD_MAINT_OPTIONS
in the debian/rules file, or if this macro is unset, just set it:
export DEB_BUILD_MAINT_OPTIONS = optimize=+lto
Please try to fix the build with lto enabled, fixing the packaging or
forwarding the issue upstream. If the issue cannot be fixed,
explicitly disallow building the package with lto by adding to your
rules file:
export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
or adding that string to your existing setting of DEB_BUILD_MAINT_OPTIONS.
The full build log can be found at:
http://qa-logs.debian.net/2022/06/09/dpkglto/ferret-vis_7.6.0-4_unstable_dpkglto.log
The last lines of the build log are at the end of this report.
[...]
utl/store_string.F:74:147: warning: type of 'save_c_string' does not match original declaration [-Wlto-type-mismatch]
74 | . mr_c_pointer(mr), offset, istat )
| ^
ccr/save_c_string.c:45:6: note: type mismatch in parameter 6
45 | void FORTRAN(save_c_string)(char *string, int *inlen, char ***fer_ptr, int *offset, int *stat)
| ^
ccr/save_c_string.c:45:6: note: type 'void' should match type 'long int'
ccr/save_c_string.c:45:6: note: 'save_c_string_' was previously declared here
ccr/save_c_string.c:45:6: note: code may be misoptimized unless '-fno-strict-aliasing' is used
utl/match4.F:77:132: warning: type of 'tm_match_captial_name' does not match original declaration [-Wlto-type-mismatch]
77 | . len_to_test, result)
| ^
../fmt/src/tm_match_capital_name.c:41:6: note: type mismatch in parameter 5
41 | void FORTRAN(tm_match_captial_name)(char *test_name, char *model_name, int *len_str, int *result)
| ^
../fmt/src/tm_match_capital_name.c:41:6: note: type 'void' should match type 'long int'
../fmt/src/tm_match_capital_name.c:41:6: note: 'tm_match_captial_name_' was previously declared here
../fmt/src/tm_match_capital_name.c:41:6: note: code may be misoptimized unless '-fno-strict-aliasing' is used
utl/get_string_element.F:75:132: warning: type of 'get_c_string' does not match original declaration [-Wlto-type-mismatch]
75 | CALL GET_C_STRING(ptr_array(i,j,k,l,m,n), int_buff, slen+1)
| ^
ccr/get_c_string.c:44:6: note: 'get_c_string_' was previously declared here
44 | void FORTRAN(get_c_string)(char **ptr_ptr, char *outstring, int *maxlen)
| ^
ccr/get_c_string.c:44:6: note: code may be misoptimized unless '-fno-strict-aliasing' is used
utl/gcf_get_imposed_axes.F:231:132: warning: type of 'efcn_get_custom_axis' does not match original declaration [-Wlto-type-mismatch]
231 | . unit, modulo)
| ^
efn/efcn_get_custom_axis.F:14:37: note: 'efcn_get_custom_axis' was previously declared here
14 | SUBROUTINE EFCN_GET_CUSTOM_AXIS(id, axis, dlo, dhi, ddel,
| ^
efn/efcn_get_custom_axis.F:14:37: note: code may be misoptimized unless '-fno-strict-aliasing' is used
utl/display_dependency.F:57:140: warning: type of 'display_dependency_sub' does not match original declaration [-Wlto-type-mismatch]
57 | . work(1,5), work(1,6), work(1,7), work(1,8), work(1,9) )
| ^
utl/display_dependency_sub.F:1:46: note: 'display_dependency_sub' was previously declared here
1 | SUBROUTINE DISPLAY_DEPENDENCY_SUB (
| ^
utl/display_dependency_sub.F:1:46: note: code may be misoptimized unless '-fno-strict-aliasing' is used
utl/get_dependency_status.F:94:161: warning: type of 'depend_stat_var' does not match original declaration [-Wlto-type-mismatch]
94 | . status_string(slen+3:) )
| ^
utl/depend_stat_var.F:1:39: note: 'depend_stat_var' was previously declared here
1 | SUBROUTINE DEPEND_STAT_VAR( work, string )
| ^
utl/depend_stat_var.F:1:39: note: code may be misoptimized unless '-fno-strict-aliasing' is used
ccr/../../fer/common/ferret.h:123:6: warning: type of 'store_mr_ptr_' does not match original declaration [-Wlto-type-mismatch]
123 | void FORTRAN(store_mr_ptr)(double *index, long *alen, double *pointer);
| ^
mem/store_mr_ptr.F:1:31: note: 'store_mr_ptr' was previously declared here
1 | SUBROUTINE STORE_MR_PTR(mr, i8_size, array)
| ^
mem/store_mr_ptr.F:1:31: note: code may be misoptimized unless '-fno-strict-aliasing' is used
lto1: fatal error: multiple prevailing defs for 'mr_num_dims'
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: [Makefile:153: ferret] Error 1 (ignored)
chmod +x ferret_c
chmod: cannot access 'ferret_c': No such file or directory
make[3]: *** [Makefile:154: ferret] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/fer'
make[2]: *** [Makefile:109: ncdf4] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/fer'
make[1]: *** [debian/rules:36: override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:12: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2