-
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
Duplicate symbol isinf and isnan on macOS using Intel OneAPI #2132
Comments
Probably historical. At some point, it is possible that OSX did not define isinf and isnan. |
BTW is __INTEL_COMPILER the actual preprocessor macro for the intel compiler? |
Yes, |
Then your solution is the best, I think. |
1. Issue Unidata#2043 * FreeBSD build fails because of conflicts in defining the fileno() function. So removed all extern declarations of fileno. 2. Issue Unidata#2124 * There were a couple of problems here. * I was conflating msys with mingw and they need separate handling of paths. So treat mingw like windows. * memio.c was not always writing the full content of the memory to file. Untested fix by properly accounting for zero size writes. * Fix bug when skipping white space in tst_xcache.c 3. Issue Unidata#2105 * On MINGW, bash and other POSIX utilities use a mounted root directory, but executables compiled for Windows do not recognise the mount point. Ensure that Windows paths are used in tests of Windows executables. 4. Issue Unidata#2132 * Apparently the Intel C compiler on OSX defines isnan etc. So disable declaration in dutil.c under that condition. 5. Fix and re-enable test_rcmerge.sh by allowing override of where to look for .rc files 6. CMakeLists.txt suppresses certain ncdump directory tests because of differences in printing floats/doubles. * Extend the list to include those that also fail under mingw. * Suppress the mingw tests in ncdump/Makefile.am
Fixed by #2138 |
I almost opened a new issue, but found this one.... When compiling 4.9.0 on macos (big sur) with FC=ifort CC=clang (13.0), configure sets HAVE_DECL_ISINF=1. The logic in dutil.c around the isinf/isnan functions does not use this flag, but instead has
which causes the isinf/isnan code to be included and can result in a link error for duplicate definition. (It works correctly if CC=icc instead of clang). I recompiled after inserting an additional condition on HAVE_DECL_ISINF into dutil.c, and it seems to work fine. Obviously netcdf-c doesn't use the fortran compiler, but I set FC out of habit and it probably has no effect. Is there a reason not to use the HAVE_DECL_ISINF flag in dutil.c? It is also possible that there is still something screwy in my system (just updated to Big Sur), but excluding those functions fixed a duplicate symbol error I got when compiling WRF. |
I'm working on getting |
I should add one detail that I was compiling with --disable-shared, which may or may not make any difference in linking error. Also 'make check' was happy in either case (before/after change to dutil.c), so I don't really know. I think I just used the conditional in include/isnan.h: #if ! (defined(isinf) || HAVE_DECL_ISINF) |
DWesl (26): DEV: Add autools-generated files to .gitignore. CI: Add Cygwin CI run. CI, TST: Check that test plugins don't get installed with DESTDIR BLD: Get netCDF4 build working on Windows. DEV, TST: Move test plugins to check_LTLIBRARIES instead of tmp_LTLIBRARIES. BLD: Try fixing the export-symbols problem on MinGW CI, DBG: Upload MinGW test logs on failure. TST: Add code for MinGW to findplugin.sh. TST: Mark tst_filter.sh XFAIL on MinGW CI: Try to skip failing NCZarr Plugin tests on MinGW TST: Mark NCZarr plugins XFAIL on MinGW TST: tst_h_strbug and tst_h_refs pass on Cygwin now BLD: Use host platform instead of build platform for platform-specific checks. CI: Prep Cygwin CI run for adding CMake build. BLD: Get CMake build compiling on Cygwin. BUG: Robustify nulldup definition. TST: Mark nczarr s3 cleanup test XFAIL on Cygwin instead of skipping. CI: Disable CMake tests on Cygwin and MinGW. CI: Revert Windows CI run on push. BLD: Fix syntax in configure.ac. BLD: Avoid specifying -version-info and -avoid-version BLD: Specify -avoid-version on MinGW and Cygwin; -version-info otherwise STY: Move nulldup backup definition from cp_win32.c to ncconfigure.h FIX: ifndef requires no parentheses. BLD: Declare nulldup backup definition static not extern CI: Change autotools CI build to out-of-tree build. Dan Ibanez (1): Rename variable to avoid function name conflict Dennis Heimbigner (65): Fix nc_def_var_fletcher32 operation Update release notes Use env variable USERPROFILE instead of HOME for windows and mingw. Update release notes restart github Make public a limited API for programmatic access to internal .rc tables Update Release Notes Fix errors: Use env variable USERPROFILE instead of HOME for windows and mingw. Cleanup szip handling some more Update release notes fix RELEASENOTES undebug Minimal changes to RELEASENOTES to get a working patch force rebuild Fix way CMake handle -DPLUGIN_INSTALL_DIR Update Release notes debug1 Ensure that netcdf_json.h does not interfere with ncjson. Update RELEASENOTES.md Fix bad cmake install location Fix some bugs in the blosc filter wrapper Update release notes Update blosc testing Provide a default enum const when fill value does not match any enum const. Update release notes debug1 Fix support for reading arrays of HDF5 fixed size strings Windows specific blosc fixed debug1 nodebug Add option to control accessing external servers Add support for Zarr string type to NCZarr Update release notes" update release notes Fix LGTM alert: too few args Update nczarr documentation update file permission Fix some problems with PR Unidata/netcdf-c#2492 Update release notes Update Release Notes Fix missing files Catch Xarray dimension inconsistencies Fix some addtional errors in NCZarr Update release notes update file permission Cleanup built test sources in nczarr_test restore Move construction of VERSION file to end of the build Turn off extraneous debug output test test test2 merged Fix race condition in ncdump (and other) tests. Update RELEASE notes test3 Restore DAP4 functionality and testing test4 ckp Suppress nczarr_test/tst_unknown filter test (and its nczarr_test equivalen) Update Release Notes retry Fix infinite loop in file inferencing Fix Memory Leak Dženan Zukić (1): Fix AWS SDK linking errors Edward Hartnett (37): checking doxygen version updated Doxyfile.in turned on WARN_AS_ERROR and added documentation build to CI fixed case of --enable-doxygen but doxygen not found installing doxygen in CI when needed installing doxygen in CI when needed installing doxygen in CI when needed installing doxygen in CI when needed installing doxygen in CI when needed change to trigger CI updated release notes change to rerun CI change to trigger CI change to trigger CI fixed RELEASE_NOTES.md fixed missing quote fixed missing quote changed backslash to and change to trigger CI change to trigger CI moved quantize error documentation fix and test quantize mode for NC_CLASSIC_MODEL documentation code and documentation cleanup code and documentation cleanup adding pre-processor constant NC_MAX_FILENAME to nc_tests.h more quantize testing more quantize testing more quantize testing more quantize testing more testing of quantize more testing of quantize more testing of quantize more testing of quantize more testing of quantize more testing of quantize more testing of quantize Greg Sjaardema (2): Minor update to doxygen function documentation For loop initial declarations are only allowed in C99 mode James Edwards (1): make UDF0 not require NC_NETCDF4 Jim Edwards (3): add udf2 fix magic remove whitespace changes fix syntax error Magnus Ulimoen (3): Prevent cmake writing to source dir fix musl build Use int64_t instead of __int64 Stephen Herbener (3): Added an ncdump -t calendars test using variable length string Modifications to enable the use of variable length string attributes for both Moved the new ncdump_tst_calendars_nc4 test to the "USE_HDF5" section. Ward Fisher (103): Add manual GitHub actions triggers for the tests. Added a check for xml2-config as a test for the libxml2-dev header files. Add libxml2 install to mingw GitHub actions. Generate nc_test/run_pnetcdf_tests.sh when using cmake, in support of Unidata/netcdf-c#2435 Fixing cmake-based run_pnetcdf_tests.sh Building test programs invoked by run_pnetcdf_tests.sh Fix cache check. Run one-off tests first. Fix a typo. Fix a typo. Make pnetcdf tests run in serial fashion when using cmake Work in a one-line change as originally suggested in Unidata/netcdf-c#2426. Updated CMakeLists to avoid the error described in Unidata/netcdf-c#2271 configure.ac logic for disabling quantize. Update release notes. Guard _declspec(dllexport) in support of Unidata/netcdf-c#2446 Changed attribute case in documentation in support of Unidata/netcdf-c#2481 Address jump-misses-init issue. Remove stray conflict markers that made their way into the branch. Adding all-error-codes.md back in to distribution documentation. Remove obsolete tags from Doxyfile. Updating doxygen files. Doxygen update, reorganizing. Update hdf5 version in github actions. Added an additional check for zstd.h in configure.ac Clean up (on linux) an issue with uintptr_t Add a check for stdint.h in order to fix a weird issue where libzstd-dev, when present, was masking a missing data type declaration. Adding additional flags to nc-config to indicate presence of newer functionality, and plugin directory location. Added plugin directory to nc-config Add various newer options to nc-config Updated release notes. Updated release notes. Adding NC_HAS_BLOSC and NC_HAS_BZ2 to netcdf_meta.h in support of Unidata/netcdf-c#2511 Update cmakelists.txt in support of Unidata/netcdf-c#2511 Updated release notes. Updated test logic in nc-config.in file. Corrected an error. Correct nccopy4 dependency on tst_fillbug. Added a dependency to tst_nans to nccopy4 Added additional dependencies. Add LDFLAGS for two plugins, nczstdfilters and nczhdf5filters, in support of Unidata/netcdf-c#2478 Add prepreqs to ncdump/tst_nccopy4, revising some race condition related errors. Add blank filter quickstart guide file. Updated release notes. Working towards writing the quick start for plugins and integrating it into doxygen. Roughed in initial quickstart Working on filter quickstart document. Continuing to flesh out the quick-start guide. Further editing. Updated SO version. Updated for next release cycle. Manually bump version in diff-compare to get RC1 out the door, this will need to be automatically excluded from the test at some point otherwise we will see this test fail every time the VERSION string changes. Copy zmap reference files for cmake-based tests. Update release notes. Add generated files to distclean. Correct an issue with 'make distcheck' where out-of-source tests were failing. Working on another make distcheck failure. Correct an issue observed in out-of-source builds. Updated RELEASE_NOTES Updated the relees notes. Correct a typo in support of Unidata/netcdf-c#2534 Make dap4 reference dap instead of hard-wired to be disabled. Add a check for HAVE_DECL_ISINF and HAVE_DECL_ISNAN in support of Unidata/netcdf-c#2132 Fix mismatched arguments warning in CMakeLists.txt Restore release date for 4.9.1 RC1 in release notes. Added target release date for RC2. Supported headers for hdf4 are not installed in actions, and there does not appear (currently) to be an easy way to reinstall these. Update release date. DAP4 is back on for cmake-based builds. Add an old static file. Added another old static html page in preparation for updating. Fix a logic error re: DAP4 tests, when DAP4 is specified, but hdf5/netcdf4 support is disabled. Added S3 status to libnetcdf.settings, turned byterange on by default. Cleaning up NCZARR_S3 summary, turning on byterange by default. Add libcurl-dev to cygwin github actions Correct libcurl development package. Add libiconv-devel to cygwin CI Correct version string change that should not have ended up in this branch. Correct logic for running DAP4 tests when HDF5 is not enabled. Update whitespace. Correct lingering merge issue. Merging Unidata/netcdf-c#2583 manually into the v4.9.1 wellspring branch. Fix a doxygen warning-treated-as-error Add new test, tst_calendars_nc4.sh, to automake-based builds. Fix an issue I introduced with make distcheck Remove internal flag from byterange documentation. Update additional documentation infrastructure. Update github action configuration scripts. Small tweak. Updating filter documentation with a quickstart guide. Remove dangling file. A bit of doxygen cleanup. re-added quickstart filters document. Clean up some garbled output from Doxygen. Change in support of Unidata/netcdf-c#2599 Update release notes with v4.9.1 release date. Updating for v4.9.1 release. Updating in preparation for 4.9.1 Updating in prep for the v4.9.1 release. Updated .gitignore. Added autoconf generated files for a stand-alone release. Added generated manfile for a stand-alone release. Update Release Notes with proper release date. Yuriy Chernyshov (1): Fix typo in CMakeLists.txt wkliao (3): use malloc to increase read chunk size from 1 KB to 4 MB typo fix replace 4194304 with READ_BLOCK_SIZE
I'm building NetCDF 4.8.1 and I'm getting duplicate symbol on macOS (11.6.0, XCode 13.0) using Intel OneAPI 2021.2.0.
Intel declares
isnan
andisInf
inlibimf
, and NetCDF declares it here (for __APPLE__ only):netcdf-c/libdispatch/dutil.c
Line 358 in 228e7f5
Not sure why that's necessary in the first place, but if it's required maybe it should check if
__APPLE__
and also not__INTEL_COMPILER
.The text was updated successfully, but these errors were encountered: