-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netcdf-c has c++ dependency when linking and library built with --disable-libxml2 --disable-shared #2851
Comments
Not sure what can be done about this. DAP4 requires an XML parser: either tinyxml (built-in) or libxml2. |
@DennisHeimbigner would turning off |
So as far as I can tell, C++ is needed for these files: So yes, turning off DAP4 and NCZARR should disable the need for any xml library. |
If don't have libxml2 available, and we don't enable nczarr or DAP4, it seems like we can avoid compiling tinyxml2 and retain |
I think that is correct. |
configure options:
./configure --disable-libxml2 --disable-parallel4 --disable-shared --disable-dap-remote-tests --prefix=${CI_PROJECT_DIR}/netcdf-c
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 to
operator 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 function
tinyxml2::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 to
operator 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
The text was updated successfully, but these errors were encountered: