--- Begin Message ---
Package: cpl-plugin-xshoo
Version: 2.4.0+dfsg-1
Tags: sid patch
Severity: important
Justification: FTBFS
User: [email protected]
Usertags: mips-patch
While trying to build cpl-plugin-xshoo on mips/mipsel architecture,
build fails on testing with an error:
> =================================
> 3 of 79 tests failed
> Please report to [email protected]
> =================================
> make[4]: *** [check-TESTS] Error 1
Here are 3 tests that fails:
> FAIL: test_xsh_detect_continuum
> FAIL: test_xsh_flux_conservation
> FAIL: test_xsh_correl_gaussians
Tests test_xsh_detect_continuum and test_xsh_flux_conservation,
fails with an error:
> [ INFO ] Test-XSH_DETECT_CONTINUUM: detect_continuum
> [ INFO ] Test-XSH_DETECT_CONTINUUM: recipe_id: xsh_orderpos
> [ INFO ] Test-XSH_DETECT_CONTINUUM: Create Order List with 3 orders
> [ INFO ] Test-XSH_DETECT_CONTINUUM: Create polynomials of degree 2
> [ INFO ] Test-XSH_DETECT_CONTINUUM: Add to order list
> [ INFO ] Test-XSH_DETECT_CONTINUUM: config update 0
> [ INFO ] Test-XSH_DETECT_CONTINUUM: pre_overscan=0
> [ INFO ] Test-XSH_DETECT_CONTINUUM: Saving PRE image "dtc_img_pre.fits"
> [ ERROR ] Test-XSH_DETECT_CONTINUUM: An error occurred, dumping error trace:
> [ ERROR ] Test-XSH_DETECT_CONTINUUM:
> [ ERROR ] Test-XSH_DETECT_CONTINUUM: Illegal output
> [ ERROR ] Test-XSH_DETECT_CONTINUUM: in [3]cpl_table_new_column() at
> cpl_table.c:1161
> [ ERROR ] Test-XSH_DETECT_CONTINUUM:
> [ ERROR ] Test-XSH_DETECT_CONTINUUM: Illegal output
> [ ERROR ] Test-XSH_DETECT_CONTINUUM: in [2]xsh_order_list_save() at
> xsh_data_order.c:841
> [ ERROR ] Test-XSH_DETECT_CONTINUUM:
> [ ERROR ] Test-XSH_DETECT_CONTINUUM: Illegal output
> [ ERROR ] Test-XSH_DETECT_CONTINUUM: in [1]main() at
> test-xsh_detect_continuum.c:200
> [ ERROR ] Test-XSH_DETECT_CONTINUUM:
The reason for this behaviour is incorrect usage of sprintf function,
in file xsh/xsh_data_order.c.
Test test_xsh_correl_gaussians fails because of uninitialized variable norm,
in file tests/test-xsh_correl_gaussians.c.
Patch adapt-sprintf-usage.patch contains previously described changes.
With these changes I was able to successfully build cpl-plugin-xshoo
for mips and mipsel.
On armel, armhf and powerpc build also fails on
test_xsh_detect_continuum and test_xsh_flux_conservation tests,
so I believe that this patch could resolve issues for these archs as well.
Could you please consider including this patch?
Best Regards,
Dejan
diff -ur cpl-plugin-xshoo-2.4.0+dfsg.orig/xsh/tests/test-xsh_correl_gaussians.c cpl-plugin-xshoo-2.4.0+dfsg/xsh/tests/test-xsh_correl_gaussians.c
--- cpl-plugin-xshoo-2.4.0+dfsg.orig/xsh/tests/test-xsh_correl_gaussians.c 2014-03-02 15:19:52.000000000 +0000
+++ cpl-plugin-xshoo-2.4.0+dfsg/xsh/tests/test-xsh_correl_gaussians.c 2014-06-06 08:46:07.000000000 +0000
@@ -313,7 +313,7 @@
//double mean_i, double mean_t ;
//double rms_i, rms_t ;
//double sum, sqsum ;
- double norm ;
+ double norm=0;
int maxpos ;
int nsteps ;
int i ;
diff -ur cpl-plugin-xshoo-2.4.0+dfsg.orig/xsh/xsh_data_order.c cpl-plugin-xshoo-2.4.0+dfsg/xsh/xsh_data_order.c
--- cpl-plugin-xshoo-2.4.0+dfsg.orig/xsh/xsh_data_order.c 2012-12-09 15:13:56.000000000 +0000
+++ cpl-plugin-xshoo-2.4.0+dfsg/xsh/xsh_data_order.c 2014-06-06 08:43:14.000000000 +0000
@@ -240,23 +240,23 @@
char colname[32] ;
float coef ;
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_CENTER, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_CENTER, k ) ;
check(xsh_get_table_value(table, colname, CPL_TYPE_FLOAT, i, &coef));
check(cpl_polynomial_set_coeff(result->list[i].cenpoly,
&k,coef));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_EDGLO, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_EDGLO, k ) ;
check(xsh_get_table_value(table, colname, CPL_TYPE_FLOAT, i, &coef));
check(cpl_polynomial_set_coeff(result->list[i].edglopoly,
&k,coef));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_EDGUP, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_EDGUP, k ) ;
check(xsh_get_table_value(table, colname, CPL_TYPE_FLOAT, i, &coef));
check(cpl_polynomial_set_coeff(result->list[i].edguppoly,
&k,coef));
/* Compatibility with old order table (had only SLIT) */
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_SLICUP, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_SLICUP, k ) ;
if ( cpl_table_has_column( table, colname ) == 1 ) {
check(xsh_get_table_value(table, colname, CPL_TYPE_FLOAT, i, &coef));
check(cpl_polynomial_set_coeff(result->list[i].slicuppoly,
@@ -265,7 +265,7 @@
else check(cpl_polynomial_set_coeff(result->list[i].slicuppoly,
&k, 0.));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_SLICLO, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_SLICLO, k ) ;
if ( cpl_table_has_column( table, colname ) == 1 ) {
check(xsh_get_table_value(table, colname, CPL_TYPE_FLOAT, i, &coef));
check(cpl_polynomial_set_coeff(result->list[i].sliclopoly,
@@ -836,21 +836,21 @@
/* Create as many column as needed, according to the polynomial degree */
for( k = 0 ; k<= pol_degree ; k++ ) {
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_CENTER, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_CENTER, k ) ;
check(
cpl_table_new_column(table, colname, CPL_TYPE_FLOAT));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_EDGUP, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_EDGUP, k ) ;
check(
cpl_table_new_column(table, colname, CPL_TYPE_FLOAT));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_EDGLO, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_EDGLO, k ) ;
check(
cpl_table_new_column(table, colname, CPL_TYPE_FLOAT));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_SLICUP, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_SLICUP, k ) ;
check(
cpl_table_new_column(table, colname, CPL_TYPE_FLOAT));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_SLICLO, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_SLICLO, k ) ;
check(
cpl_table_new_column(table, colname, CPL_TYPE_FLOAT));
}
@@ -881,7 +881,7 @@
/* Get and Write coef from center polynomial */
check(coef = cpl_polynomial_get_coeff(order_list->list[i].cenpoly,&k));
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_CENTER, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_CENTER, k ) ;
check(cpl_table_set(table, colname,i,coef));
/* Get and Write coef from upper polynomial */
@@ -889,7 +889,7 @@
check(coef = cpl_polynomial_get_coeff(order_list->list[i].edguppoly,&k));
}
else coef = 0.0 ;
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_EDGUP, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_EDGUP, k ) ;
check(cpl_table_set(table, colname,i,coef));
/* Get and Write coef from lower polynomial */
@@ -897,7 +897,7 @@
check(coef = cpl_polynomial_get_coeff(order_list->list[i].edglopoly,&k));
}
else coef = 0.0;
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_EDGLO, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_EDGLO, k ) ;
check(cpl_table_set(table, colname,i,coef));
/* Get and Write coef from slic lower polynomial */
@@ -905,7 +905,7 @@
check(coef = cpl_polynomial_get_coeff(order_list->list[i].sliclopoly,&k));
}
else coef = 0.0 ;
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_SLICLO, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_SLICLO, k ) ;
check(cpl_table_set(table, colname, i, coef));
/* Get and Write coef from slic upper polynomial */
@@ -913,7 +913,7 @@
check(coef = cpl_polynomial_get_coeff(order_list->list[i].slicuppoly,&k));
}
else coef = 0.0 ;
- sprintf( colname, "%s%d", XSH_ORDER_TABLE_COLNAME_SLICUP, k ) ;
+ sprintf( colname, "%s%lld", XSH_ORDER_TABLE_COLNAME_SLICUP, k ) ;
check(cpl_table_set(table, colname, i, coef));
}
--- End Message ---