[Insight-developers] CMake Configuration Anomolies for redhat9 gcc 3.2

Hans J. Johnson hans-johnson at uiowa.edu
Mon, 12 Jan 2004 09:41:27 -0600


Hello Build Experts,

I've been trying to diagnose a problem that occurs when building with
compiler optimizations in gcc 3.2 on redhat 9 system.   The
optimizations cause the Wrapping code to fail.  I am fairly confident
that it is because some of the automatically defined "HAVE_???" CMake
variabls are being miss diagnosed.

I must admit that I don't really understand how the automatic
determination of compiler compatibility works.

I have 2 builds (tesla.uiowa->Linux-g++-3.­2-dbg,
tesla.uiowa->Linux-g++-3.­2-opt), the opt version fails.  A completly
clean build has been done for both of these.  The main difference
between the two builds is that one is "-g" and the other is "-O3".  Here
is the diff between the two CMakeCache.txt files:

17c17
< BUILDNAME:STRING=Linux-g++-3.2-dbg
---
> BUILDNAME:STRING=Linux-g++-3.2-opt
74c74
< CMAKE_CXX_FLAGS:STRING= -g -fstrict-aliasing -UNDEBUG  -Wall
-Wcast-qual -Wstrict-prototypes
---
> CMAKE_CXX_FLAGS:STRING= -DNDEBUG -O3 -funroll-loops
-fno-omit-frame-pointer -fstrict-aliasing
95c95
< CMAKE_C_FLAGS:STRING= -g -UNDEBUG  -Wall -Wstrict-prototypes
---
> CMAKE_C_FLAGS:STRING= -DNDEBUG -O3 -funroll-loops
-fno-omit-frame-pointer
1350c1350
< HAVE__DOPRNT_COMPILED:INTERNAL=FALSE
---
> HAVE__DOPRNT_COMPILED:INTERNAL=TRUE
1352c1352
< HAVE__SYSTEM_CONFIGURATION_COMPILED:INTERNAL=FALSE
---
> HAVE__SYSTEM_CONFIGURATION_COMPILED:INTERNAL=TRUE
1941,1942c1941,1942
< //Test
< VCL_STATIC_CONST_INIT_NO_DEFN:INTERNAL=0
---
> //VXL test
> VCL_STATIC_CONST_INIT_NO_DEFN:INTERNAL=1


I hope that this helps track down the problems.

Regards,
Hans