Hello everybody, I am brand new to this community and I hope some of you could give me some hints on how solve a problem I am facing.
I need to install Zlib, HDF5 and NetCDF (C and Frotran) and the compilation must be done with PGI.
The problem is this:
I start by
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/:$PATH
Then in the directory of zlib-master, I try
CC=pgcc CXX=pgc++ ./configure --includedir=/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/include/
CC=pgcc CXX=pgc++ ./configure --includedir=/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/include/:/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/include_acc/
and
CC=pgcc CXX=pgc++ ./configure --includedir=/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/include/:/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/include_acc/:/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/extras/qd/include/
and it just does not moves forward. I get the following error:
Checking for shared library support…
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.
and the log file says:
./configure --includedir=/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/include/:/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/include_acc/:/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/extras/qd/include/
fim 25.nóv 2021, 08:43:26 GMT
=== ztest7708.c ===
extern int getchar();
int hello() {return getchar();}
pgcc -c ztest7708.c
… using gcc
Checking for obsessive-compulsive compiler options…
=== ztest7708.c ===
int foo() { return 0; }
pgcc -c -O3 ztest7708.c
Checking for shared library support…
=== ztest7708.c ===
extern int getchar();
int hello() {return getchar();}
pgcc -w -c -O3 -fPIC ztest7708.c
pgcc -shared -Wl,-soname,libz.so.1,–version-script,zlib.map -O3 -fPIC -o ztest7708.so ztest7708.o
/usr/bin/ld: warning: /opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/lib/nvhpc.ld contains output sections; did you forget -T?
Building shared library libz.so.1.2.11 with pgcc.
=== ztest7708.c ===
#include <stdio.h>
#include <stdlib.h>
size_t dummy = 0;
pgcc -c -O3 ztest7708.c
“/usr/include/stdio.h”, line 183: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 217: error: attribute “malloc” does not take arguments
__THROW attribute_malloc __wur __attr_dealloc_free;
^
“/usr/include/stdio.h”, line 254: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 288: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 303: error: attribute “malloc” does not take arguments
__THROW attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 309: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 824: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc (pclose, 1) __wur;
^
“/usr/include/stdlib.h”, line 565: error: attribute “malloc” does not take arguments
__attr_dealloc_free;
^
“/usr/include/stdlib.h”, line 569: error: attribute “malloc” does not take arguments
__THROW __attr_dealloc (reallocarray, 1);
^
9 errors detected in the compilation of “ztest7708.c”.
(exit code 2)
Checking for size_t… No.
=== ztest7708.c ===
long long dummy = 0;
pgcc -c -O3 ztest7708.c
Checking for long long… Yes.
=== ztest7708.c ===
#include <stdio.h>
int main(void) {
if (sizeof(void *) <= sizeof(int)) puts(“int”);
else if (sizeof(void *) <= sizeof(long)) puts(“long”);
else puts(“z_longlong”);
return 0;
}
pgcc -O3 -o ztest7708 ztest7708.c
“/usr/include/stdio.h”, line 183: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 217: error: attribute “malloc” does not take arguments
__THROW attribute_malloc __wur __attr_dealloc_free;
^
“/usr/include/stdio.h”, line 254: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 288: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 303: error: attribute “malloc” does not take arguments
__THROW attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 309: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc_fclose __wur;
^
“/usr/include/stdio.h”, line 824: error: attribute “malloc” does not take arguments
attribute_malloc __attr_dealloc (pclose, 1) __wur;
^
7 errors detected in the compilation of “ztest7708.c”.
(exit code 2)
Failed to find a pointer-size integer type.
** ./configure aborting.
The problem is that I cannot overwrite the default address: /usr/include/
Can someone please give me a hand with this? I am really lost.
All best,
CrArGr