Open phildurbin opened 7 months ago
Not sure what can be done about this. DAP4 requires an XML parser: either tinyxml (built-in) or libxml2.
@DennisHeimbigner would turning off dap4
and nczarr
remove the requirement for compiling tinyxml
in the absense of libxml2
? e.g., if DAP4 and nczarr are disabled, do we need an xml parser at all? I don't think we do, and I can gate it off if need be.
So as far as I can tell, C++ is needed for these files: ./libncxml/tinyxml2.cpp ./libncxml/ncxml_tinyxml2.cpp ./nczarr_test/tst_pure_awssdk.cpp ./libdispatch/ncs3sdk_aws.cpp ./libnczarr/zs3sdk.cpp
So yes, turning off DAP4 and NCZARR should disable the need for any xml library. As for tinyxml vs libxml2, if libxml2 is available, then the tinyxml2 code in libncxml should not need to be compiled.
If don't have libxml2 available, and we don't enable nczarr or DAP4, it seems like we can avoid compiling tinyxml2 and retain libnetcdf
as a pure C library.
I think that is correct.
Then trying to compile the netcdf-fortran (or anything down stream) requires -lstdc++; eg gcc -o conftest -I/tis/releases/ac/zlib/1.2.11-1/include -I/tis/releases/ac/hdf4/4.2.16-3/include -I/tis/releases/ac/hdf5/1.14.3-5/include -I/tis/releases/ac/szip/2.1.1-3/include -I/tis/releases/ac/jpeg/9.1-1/include -I/scratch/pdurbin/tmp2/netcdf-c/include -L/tis/releases/ac/zlib/1.2.11-1/lib -L/tis/releases/ac/hdf4/4.2.16-3/lib -L/tis/releases/ac/hdf5/1.14.3-5/lib -L/tis/releases/ac/szip/2.1.1-3/lib -L/tis/releases/ac/jpeg/9.1-1/lib -L/scratch/pdurbin/tmp2/netcdf-c/lib ~/tmp.c -lnetcdf -lnetcdf -lhdf5_hl -lhdf5 -lm -lz -ldl -lcurl -lsz -ljpeg usr/bin/ld: /scratch/pdurbin/tmp2/netcdf-c/lib/libnetcdf.a(ncxml_tinyxml2.o): in function
ncxml_parse': /scratch/pdurbin/netcdf-c-4.9.2/libncxml/ncxml_tinyxml2.cpp:35: undefined reference to
operator new(unsigned long)' /usr/bin/ld: /scratch/pdurbin/netcdf-c-4.9.2/libncxml/ncxml_tinyxml2.cpp:35: undefined reference tooperator delete(void*)' /usr/bin/ld: /scratch/pdurbin/tmp2/netcdf-c/lib/libnetcdf.a(ncxml_tinyxml2.o):(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to
__gxx_personality_v0' /usr/bin/ld: /scratch/pdurbin/tmp2/netcdf-c/lib/libnetcdf.a(tinyxml2.o): in functiontinyxml2::DynArray<char, 20>::EnsureCapacity(int)': /scratch/pdurbin/netcdf-c-4.9.2/libncxml/tinyxml2.h:308: undefined reference to
operator new[](unsigned long)' /usr/bin/ld: /scratch/pdurbin/netcdf-c-4.9.2/libncxml/tinyxml2.h:312: undefined reference tooperator delete[](void*)' /usr/bin/ld: /scratch/pdurbin/netcdf-c-4.9.2/libncxml/tinyxml2.h:308: undefined reference to
operator new[](unsigned long)' ... tmp.c is attached as tmp.c.txt which came from configure in netcdf-fortan tmp.c.txt