This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > I can trigger the problem. I have a startup script which defines env > variables, from here make check fails. > If I run "make check" as a user after this it works fine. > If I run "make check" as root again after the setup script it fails. > As root when I set the following it fails up until the last make check > > 504 export CXX=g++ > 505 export CC=gcc > 506 make check > 507 cat test.bjm > 508 export FC=gfortran > 509 export F77=gfortran > 510 make check > 511 cat test.bjm > 512 export PATH=/usr/local/bin:$PATH > 513 make check > 514 cat test.bjm > 515 export CPPFLAGS=" -O -fPIC -I/usr/local/include " > 516 make check > > If you do the reverse sequence, it fails until the last make check > 502 export PATH=/usr/local/bin:$PATH > 503 make check > 504 cat test.bjm > 505 export CPPFLAGS=" -O -fPIC -I/usr/local/include " > 506 make check > 507 cat test.bjm > 508 export FC=gfortran > 509 export F77=gfortran > 510 export CXX=g++ > 511 export CC=gcc > 512 make check > > Not sure why as root, you need to set these as they already should be > setup after the initial configure ? > Can you try without setting -fPIC? Setting -fPIC implies that you are trying to build shared libraries. If that is what you are trying to do, then please rerun configure with --enable-shared and try again. There is usually a little more to building shared libraries than just setting -fPIC, so something might be going wrong because of that. I also suggest that you try with the latest snapshot release. It's possible that your root login has stricter settings for what will be tolerated from memory calls. We had some malloc(0) calls that have recently been removed, and one of those could be causing your problem: ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-daily.tar.gz Let me know if this helps. Thanks, Ed Ticket Details =================== Ticket ID: BHO-596671 Department: Support netCDF Priority: Critical Status: Closed