-
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 4.6.1 build error on macOS 10.13: ocprint link fails #1095
Comments
Do you have the capability to build from the git repo? That is, can you clone from git, and then run autoreconf -i to build the configure script and the Makefile.in files? If so, you can comment out the following lines in ncdump/Makefile.am:
If you don't know how to do this, let me know and I will do a special dist for you without these lines. Seems like if a program is not going to be installed, there is no reason for it to be in the build. @DennisHeimbigner can we move ocprint to one of the test directories? Or build it only with a special configure flag? |
@edhartnett I learned some I can before I run And, technically, ocprint is indeed installed (when built) because I see it in the bin directory when I build my Baselibs. There is just some bug somewhere that I'm triggering when it's built. The program not installed (in autotools land) is nc4print, at least. But ocprint is definitely not built in CMake as far as I can see from the CMakeLists.txt. |
Good catch, I'm wiring in ocdump to cmake right now. It will be merged in with the latest PR group. |
Okay. These two lines before I run
stop Once I do that, netCDF builds to completion. |
There are a couple of files and programs that are in the github repo |
Oh, good to know, I will mark it as such in the next group of PR's. |
ocprint is having a build problem, not an install problem. Suggest that you move whatever is not part of the library to a test directory. Then they user may see a test failure, but they will still be able to do make all and get the library built. Just marking this as noinst_ will not solve the problem, I believe. |
Can someone try the build on a mac using normal gcc instead of mpicc? |
Testing now. |
I'm not having any problems (using the current |
So is this a false alarm? |
I’ve fixed the issue I was seeing. Let me test against 4.6.1. |
I am losing the track. I thought you said it worked fine. What issue were you |
The change I added so that it builds with cmake works fine. That change is in |
@DennisHeimbigner I can try tomorrow on my system with gcc and not mpicc. I was just building as I usually do (with Parallel HDF5). Note that it will be with GCC 8.2 and not Clang. I have never gotten Clang and ESMF to work right, so I make it a mission to make sure clang never invades my builds. But, as I noted, netCDF-C 4.5.0 builds just fine with the same configure line... ETA: Also note: I've never built netcdf with Clang, but since 4.6.1 doesn't seem to build it, it's sort of a null point of proof. |
@DennisHeimbigner I get the same failure with gcc using autotools:
|
ok, two possibilities come to mind.
|
|
I think that the thing that changed was that all of the .rc processing code was |
Check that. It should appear with the C flag, not the T flag |
I just noticed that you appear to be going directly to |
I will take a closer look at this. I suspect the error, whatever it is, is going to be more subtle than an outright build system configuration error, given that we build on OSX regularly without issue. |
@mathomp4 do you have the OSX developer tools installed? I presume you installed gcc, gfortan and such through a third party package manager, or perhaps by hand. I just read back and see that it was built by hand. So, I wonder, do you have the OSX dev tools installed? I’m just looking for differences that would explain the issue you’re seeing vs. our inability to recreate it. |
@WardF I'm not sure, though it is possible. I had to run But, yes, while I use things like |
Also, for @DennisHeimbigner, I tried a |
I guess I am stumped since we cannot seem to reproduce the error. |
@mathomp4 are you still seeing this issue? |
I will let you know soon. I've downloaded netCDF 4.6.2 and am building. |
@WardF It looks good! I have 4.6.2's libdispatch does seem to have triggered a build issue in NCO amazingly similar to one I found a few years ago. I've pinged Charlie Zender on his list about that one. I'll try and test out the optimizations to the opens and wait for the new netcdf-fortran so I can start bugging all of you with "How can I get zfp working with my code?" |
Sounds good thanks :) |
Environment Information
configure
)C
code to recreate the issue?Summary of Issue
My build of netcdf-C 4.6.1 on macOS 10.13.5 isn't quite working. I'm building with GCC 8.1.0 (built from source) and Open MPI 3.1.0. I built HDF5 with
--enable-parallel
so mpicc is my C compiler in this stage.From my scan of the build log, libnetcdf.a is made, but when ocprint tries to link I get:
As a test, I took netcdf-C 4.5.0 (which had worked before on this machine) and tried building it instead (feeding in the exact same libraries that went into the build above) and ocprint, etc all built just fine.
As a second test, I built with
--disable-dap
instead (see originalconfigure
line below) and it will build becauseocprint
is avoided. But, this netCDF build is for a model and one of the requirements for the netCDF built is that it have OpenDAP capability, thus I can't disable dap for production.Any ideas on how to fix this with autotools? I thought I'd troll around the CMakeLists.txt files to see if ocprint was being built/linked with extra libraries perhaps with CMake. When I did so I see:
(which is in the oc2/CMakeLists.txt, not the ncdump/CMakeLists.txt).
Huh. Indeed, the autotools build seems to build things that CMake doesn't (e.g., nc4print which doesn't seem to appear in any CMakeLists.txt file in the tarball...and isn't installed, just built?).
Is there a way to get autotools build to skip ocprint? I don't think I need it (I've never used it and I know of no one else who has), but it would at least let me get a (partially) DAP-enabled netCDF built. (NOTE: I had thought about using a CMake build, but I'd probably need more help with that. I don't really know how to translate all of that configure line to CMake, especially the --includedir line. I didn't see in the INSTALL.md on how to translate that flag.)
Steps to reproduce the behavior
My configure line is:
And, as I said before, I can build 4.5.0 just fine using all the same infrastructure, but 4.6.1 won't.
The text was updated successfully, but these errors were encountered: