Open gus-correa opened 3 years ago
Trying to build the Fedora 33 RPM's, the spec file also creates a build directory (netcdf-c-4.8.0/build), and also gives:
netcdf_dispatch.h: No such file or directory #include "netcdf_dispatch.h"
A workaround is to make a symbolic link for netcdf-c-4.8.0/include/netcdf_dispatch.h
to <build_dir>/include/netcdf_dispatch.h
.
@DennisHeimbigner and @WardF this is perhaps related to the recent changes to have the dispatch version in one place, and generate the .h file? Apparently the build systems are not putting the generated file where it needs to go?
The -I flags from above are:
-I -I../../netcdf-c-4.8.0/libdispatch -I.. -I../../netcdf-c-4.8.0/include -I../../netcdf-c-4.8.0/oc2
These are generated from netcdf-c/lib_flags.am, which has this line:
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
I suspect that top_builddir is not being properly set.
You might look at include/Makefile and see what value is being assigned to AM_CPPFLAGS.
@gnw3 is this issue still active? Have you tried release 4.8.1?
netcdf-c-4.8.0 on Linux CentOS 7.9 with gcc 4.8.5.
I am trying to build off the source tree, assuming that it can handle VPATH. $ cd build_gnu-4.8.5
$ ../netcdf-c-4.8.0/configure --prefix=/opt/swinst/netCDF/C/netcdf-c-4.8.0-gnu-4.8.5 [... configure output. It seems to be successful.]
$ make make all-recursive ... make[2]: Entering directory
/opt/swinst/netCDF/C/build_gnu-4.8.5/libdispatch' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../netcdf-c-4.8.0/libdispatch -I.. -I../../netcdf-c-4.8.0/include -I../../netcdf-c-4.8.0/oc2 -MT libdispatch_la-dparallel.lo -MD -MP -MF .deps/libdispatch_la-dparallel.Tpo -c -o libdispatch_la-dparallel.lo
test -f 'dparallel.c' || echo '../../netcdf-c-4.8.0/libdispatch/'`dparallel.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../netcdf-c-4.8.0/libdispatch -I.. -I../../netcdf-c-4.8.0/include -I../../netcdf-c-4.8.0/oc2 -MT libdispatch_la-dparallel.lo -MD -MP -MF .deps/libdispatch_la-dparallel.Tpo -c ../../netcdf-c-4.8.0/libdispatch/dparallel.c -fPIC -DPIC -o .libs/libdispatch_la-dparallel.o In file included from ../../netcdf-c-4.8.0/libdispatch/dparallel.c:9:0: ../../netcdf-c-4.8.0/include/ncdispatch.h:30:29: fatal error: netcdf_dispatch.h: No such file or directoryinclude "netcdf_dispatch.h"
compilation terminated. make[2]: [libdispatch_la-dparallel.lo] Error 1 make[2]: Leaving directory `/opt/swinst/netCDF/C/build_gnu-4.8.5/libdispatch' make[1]: [all-recursive] Error 1 make[1]: Leaving directory `/opt/swinst/netCDF/C/build_gnu-4.8.5' make: *** [all] Error 2
** It created netcdf_dispatch.h in build_gnu-4.8.5/include. However, it doesn't seem to be looking for it there. The compilation command doesn't have build_gnu-4.8.5/include among the include search directories. Am I missing something maybe?
Thank you, Gus Correa
To report a non-security related issue, please provide:
If you have a general question about the software, please view our Suggested Support Process.