Opened 19 years ago
Closed 19 years ago
#987 closed defect (fixed)
error compiling psLib using configure with --enable-optimize
| Reported by: | 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

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 @@
-#ifndef PS_NO_TRACE
+#ifndef PS_NO_TRACE
@@ -1894,10 +1894,11 @@
-#ifndef PS_NO_TRACE
+#ifndef PS_NO_TRACE
+ guessStdev = sqrt(-0.5/poly->coeff[2]);