Page 1 of 1

Bug in internal netcdf for mac  [SOLVED]

Posted: Thu May 15, 2014 8:16 am
by ldamewood
There is a small bug in netcdf that makes it not compile on Mac OS X 10.9 using the Xcode compiler. It requires adding a single line of code to netcdf. I haven't seen any other post about this bug so I don't know if it's been addressed before. Since the abinit build system tries to build netcdf, I attached a patch for abinit v7.6.4 (it's a patch within a patch!) that fixed it for me. The abinit build system will apply the netcdf patch automatically.

Code: Select all

mv 0001-Fic-NetCDF-bug.log 0001-Fic-NetCDF-bug.patch
cd abinit-7.6.4
patch -p1 < ../0001-Fix-NetCDF-bug.patch
make clean && ./configure --with-trio-flavor="netcdf+etsf_io" && make

Re: Bug in internal netcdf for mac

Posted: Thu May 22, 2014 10:51 pm
by jbeuken
Hi,

I use the ports

netcdf +gcc48 +gfortran
netcdf-fortran
mpich-gcc48

from MacPorts under MacOS X 10.8

and use

with_netcdf_incs="-I/opt/local/include"
with_netcdf_libs="-L/opt/local/lib -lnetcdf -lnetcdff"

in my ac file and

everything works… without patch...

my 5¢

jmb

Re: Bug in internal netcdf for mac

Posted: Sat Jun 14, 2014 3:11 am
by ldamewood
I hope the patch will be useful for people who do not wish to use macports and useful for the build system maintainers in the next versions of abinit.