-
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
Cause of failure and a workaround to build with --enable-nczarr-s3 on MacOS (+Windows?) #2521
Comments
Does it also build if you copy VERSION to a file called "version" (lowercase)? |
Good question. No, it fails with the same error as above. The compiler just finds the netCDF |
In any case, the problem (from my point of view) is that |
Unless relying on the AWS C SDK is completely untenable (and I've heard inconsistent reports on whether that's the case), I'd really like to see us avoid expending engineering effort on a library to support an API we have no control over and isn't our unique specialty. If we're maintaining that, then we have to maintain that knowledge internally as well. |
I think that Charlie's point is correct:
If we adopt your point of view, then we have no choice but to wait |
@DennisHeimbigner Well, let's not hold up creating a library to handle remote access to the S3 API, including all of the authentication options that people expect for S3, as some kind of "quick fix" either, especially given the engineering resources we have to devote to that. I'd rather see us continue to invest in trying to use existing libraries like aws-c-s3, given that it already exists and comes from AWS itself AFAICT. It's already packaged for conda-forge too--available on Linux, macOS, and Windows. While last I heard, there were problems setting up a dev environment around it, unless there are fundamental shortcomings in functionality there, I'd much rather see us invest limited engineering resources in bringing an existing open source library (and improving it as necessary) to solve the problem rather than do our own thing that we have to maintain on our own. It looks like the only time we reached out to them, they were responsive, so that's a positive sign. |
Charlie- I assume that you got aws-cpp-sdk to build on OSX, correct? |
On OSX, I simply installed and used the Homebrew package |
Two other questions.
|
|
You are right, I forgot that our S3 repo is private.
Wow! |
WRT the original VERSION issue. I could rename the netcdf-c VERSION file |
True. Also true that |
I do not use OSX except via github actions. But Ward and Ryan do. |
I think there is another way to do this, but it may be just as intrusive. |
I wonder why we do not see this under Windows, which is also case |
My guess is that only the MacOS/Clang system headers need to |
Apparently, the VERSION file is not an installed file. |
I did notice that g++ also has a "version" file. |
re: Unidata#2521 Charlie Zender has discovered that the netcdf created file VERSION conflicts with the C++ version file on OSX case-insensitive file systems, and maybe other case-insensitvie file systems. Note: 1. Cmake does not create the VERSION file 2. The VERSION file is not installed 3. It turns out that the VERSION file is not required by the autoconf build. It is possible that clients or package build system (e.g apt or brew) might use the VERSION file, so we cannot delete it altogether. So as a fix, we move the creation of the VERSION file to after the build is complete by inserting a all-local hook into netcdf-c/Makefile.am. # Misc. other changes 1. Suppressed warning by making use of the systeminfo command contingent on the platform being Windows.
Possibly fixed by PR #2527. |
This is based on today's snapshot of
4.9.1-develop
.The netCDF-C distribution, configured with
--enable-nczarr-s3
, FTBFS with Clang (and possibly GCC) on MacOS even though the Homebrew packageaws-cpp-sdk
provides the necessary librariesaws-cpp-sdk-s3
andaws-cpp-sdk-core
. The failure is apparently caused because MacOS by default installs a quasi case-insensitive filesystem that causes the netCDF top-level-directory fileVERSION
to be#include
'd into many system C++ files such ascstddef
that try to#include <version>
(example output follows). They getVERSION
instead ofversion
and the compilation fails.The full potential of NCZarr will not be reached until we can more easily build netCDF with
--enable-nczarr-s3
on MacOS and Windows (both case-insensitive filesystems by default). I think the current failure could be prevented with a compiler setting or code modification. But I ain't smart 'nuff to figger out how. So this is a challenge for you! A related StackOverflow article is hereIn the meantime, my laughably primitive workaround to build with
--enable-nczarr-s3
on MacOS is:CC='clang' CPPFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib -laws-cpp-sdk-s3" ./configure --enable-nczarr-s3 ...
make
[this breaks as described above/below]mv VERSION VERSION.orig
make && sudo make install
[this completes!]mv VERSION.orig VERSION
make check
[passes!]Without that workaround, I get a ton of failures, all like this:
The text was updated successfully, but these errors were encountered: