[netcdfgroup] Compile problems with NetCDF 3.6.3 and gcc's -D_FORTIFY_SOURCE=2

Hello all,

On Mac OS X 10.5.4 using gcc 4.2.1 (from Xcode 3.1), I have tried to
build NetCDF 3.6.3 like so:

export CC=/usr/bin/gcc-4.2
export CXX=/usr/bin/g++-4.2
export MACOSX_DEPLOYMENT_TARGET=10.5
export SDKROOT=/Developer/SDKs/MacOSX10.5.sdk
export CFLAGS="-isysroot ${SDKROOT} -O0 -D_FORTIFY_SOURCE=2 -arch i386"
export CXXFLAGS="-isysroot ${SDKROOT} -O0 -D_FORTIFY_SOURCE=2 -arch i386"
./configure --disable-shared --prefix=/my/path/to/folder
make check

It spews lots of stuff, but ends early, giving:

*** Testing ncgen.
*** creating classic file c0.nc from c0.cdl...
./run_tests.sh: line 8: 28089 Abort trap              ./ncgen -b -o
c0.nc $srcdir/c0.cdl
FAIL: run_tests.sh
=========================================
1 of 1 tests failed
Please report to support@xxxxxxxxxxxxxxxx
=========================================
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

If I remove the -D_FORTIFY_SOURCE=2 then all is well.

Is this a known problem?  Can anyone repro?

D_FORTIFY_SOURCE is nicely explained here:
<http://www.redhat.com/magazine/009jul05/features/execshield/#checks>

--
____________________________________________________________
Sean McBride, B. Eng                 sean@xxxxxxxxxxxxxxxxxx
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada




  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: