IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 19 years ago

Closed 19 years ago

#987 closed defect (fixed)

error compiling psLib using configure with --enable-optimize

Reported by: koppenh@… Owned by: Paul Price
Priority: high Milestone:
Component: math Version: unspecified
Severity: normal Keywords:
Cc:

Description

Sorry for version unspecified I was using the one that came with ipp-2.3.
Where do I find the version?

this error only occurs when psLib is configured with the option --enable-optimize

probably a typo?

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../src -I../../src -I../../src/sys -I../../src/astro -I../../src/db -I../../src/fft -I../../src/fits -I../../src/imageops -I../../src/jpeg -I../../src/math -I../../src/mathtypes -I../../src/types -pthread -I/home/apus/koppenh/include/mysql -DHAVE_PSDB -I/home/apus/koppenh/include -I/home/apus/koppenh/inclu
de -pipe -O2 -g -DPS_NO_TRACE -Wall -Werror -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L -MT libpslibmath_la-psStats.lo -MD -MP -MF .deps/libpslibmath_la-psStats.Tpo -c psSt
ats.c -fPIC -DPIC -o .libs/libpslibmath_la-psStats.o
psStats.c: In function 'vectorFittedStats_v3':
psStats.c:1609: error: 'upperMean' undeclared (first use in this function)
psStats.c:1609: error: (Each undeclared identifier is reported only once
psStats.c:1609: error: for each function it appears in.)
psStats.c:1610: error: 'upperStdev' undeclared (first use in this function)
make[3]: * [libpslibmath_la-psStats.lo] Error 1
make[3]: Leaving directory `/home/apus/koppenh/ipp-2.3/psLib/src/math'
make[2]:
* [all-recursive] Error 1
make[2]: Leaving directory `/home/apus/koppenh/ipp-2.3/psLib/src'
make[1]: * [all] Error 2
make[1]: Leaving directory `/home/apus/koppenh/ipp-2.3/psLib/src'
make:
* [all-recursive] Error 1

Change History (1)

comment:1 by Paul Price, 19 years ago

Resolution: fixed
Status: newclosed

Some required code (a definition) was inside a !PS_NO_TRACE block, and so wasn't seen when compiled with optimisation. Moved the definition outside the block; checked in to CVS head. Here's the diff:

price@mithrandir:/home/mithrandir/price/ipp/psLib/src/math>cvs diff -u psStats.c
Index: psStats.c
===================================================================
RCS file: /cvsroot/pan-starrs/datasys/IPP/psLib/src/math/psStats.c,v
retrieving revision 1.216
diff -u -r1.216 psStats.c
--- psStats.c 20 Sep 2007 23:59:01 -0000 1.216
+++ psStats.c 24 Oct 2007 19:21:13 -0000
@@ -1596,9 +1596,9 @@

}


calculate upper mean & stdev from parabolic fit -- ignore this value

-#ifndef PS_NO_TRACE

float upperStdev = sqrt(-0.5/poly->coeff[2]);
float upperMean = poly->coeff[1]*PS_SQR(upperStdev);

+#ifndef PS_NO_TRACE

psTrace(TRACE, 6, "Parabolic Upper fit results: %f + %f x + %f x2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
psTrace(TRACE, 6, "The upper mean is %f.\n", upperMean);
psTrace(TRACE, 6, "The upper stdev is %f.\n", upperStdev);

@@ -1894,10 +1894,11 @@

}


calculate upper mean & stdev from parabolic fit -- ignore this value

-#ifndef PS_NO_TRACE

guessStdev = sqrt(-0.5/poly->coeff[2]);
guessMean = poly->coeff[1]*PS_SQR(guessStdev);

+#ifndef PS_NO_TRACE

psTrace(TRACE, 6, "Parabolic Symmetric fit results: %f + %f x + %f x2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);

+ guessStdev = sqrt(-0.5/poly->coeff[2]);

psTrace(TRACE, 6, "The symmetric mean is %f.\n", guessMean);
psTrace(TRACE, 6, "The symmetric stdev is %f.\n", guessStdev);

#endif

Note: See TracTickets for help on using tickets.