I am trying to install NetCDF with PGI. However, to do so, I first need to install zlib and when I try to do that, I do:
export C_INCLUDE_PATH=/the/path/to/include/:$C_INCLUDE_PATH
export PATH=/the/path/to/compilers/bin/:$PATH
Then I try:
CC=pgcc CXX=pgc++ ./configure --archs="x86_64"
I get the following error:
Building shared library libz.so.1.2.11 with pgcc.
Checking for size_t... No.
Checking for long long... Yes.
Failed to find a pointer-size integer type.
** ./configure aborting.```
The **configure.log** says, among other things:
```pgcc -c -O3 x86_64 ztest212261.c
ztest212261.c:
"/usr/include/stdio.h", line 183: error: attribute "__malloc__" does not take arguments
__attribute_malloc__ __attr_dealloc_fclose __wur;
Can someone give me a hint on this? Thank you in advance.
In order to compile netcdf-c and their dependencies, you need to not only link the
includepath but alsolibpath. So you need to do something likeAnd for the configuration, you also need to set
CFLAGSand such.