Opened 18 months ago
Last modified 7 months ago
#67455 assigned defect
ncarg @6.6.2: disables implicit declaration of function errors
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | tenomoto (Takeshi Enomoto) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | Dave-Allured (Dave Allured) | |
Port: | ncarg |
Description
Xcode 12 and later consider implicit declaration of functions to be an error.
The ncarg portfile contains this line to disable that error:
configure.cflags-append -Wno-error=implicit-function-declaration
See #61275 in which this line was added.
This makes the software the port builds potentially incompatible with Apple Silicon processors.
This line should be removed and the problem should be fixed correctly: by declaring functions before using them. See WimplicitFunctionDeclaration for much more information.
The port maintainer need not be the one to do this. It is an upstream matter that should be resolved by the developers of ncarg. A good first step would be to report the problem to them and add the URL of the report to this ticket so we can keep an eye on it.
Change History (9)
comment:1 Changed 16 months ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:2 follow-up: 3 Changed 7 months ago by nilason (Nicklas Larsson)
comment:3 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to nilason:
closure.c:11:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
That is a different, unrelated error.
comment:4 Changed 7 months ago by Dave-Allured (Dave Allured)
Upstream, NCARG was put into "maintenance mode" five years ago. There has not been any stable release since then. However, they accepted dozens of maintenance patches into their development branch, from Fedora, Conda, and other sources. This includes a few bits from Macports.
I expect that these patches included fixes for implicit declarations. We should try the latest tag version. I will try this myself soon, unless someone does it first.
comment:5 follow-up: 6 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
We are already using the latest tag version, 6.6.2 from 2019. In their November 2020 update blog post they promised to "put out periodic bug-fix releases" but sadly they appear never to have done so and none of their subsequent blog posts mention NCL.
Both of the bugs reported in this ticket have been reported upstream 15 months ago at https://github.com/NCAR/ncl/issues/193 with no response.
comment:6 Changed 7 months ago by Dave-Allured (Dave Allured)
Okay, I misunderstood what is a "tag version". What I meant was, I would like to try the latest development snapshot.
comment:7 follow-up: 8 Changed 7 months ago by tenomoto (Takeshi Enomoto)
I pushed the commit that is against Ryans' suggestion to enable build on Sonoma. I imagine many scientists and engineers, including myself and my students, still need NCL. [405bac09ffbec42dc246997293fcdb4d29c9d995/macports-ports]
I manually edited 100+ files to comply C99, wasting a number of holidays.
I found the compiler option -Wno-error=implicit-function-declaration
before completing the patches.
Probably I should have used an automated tool such as cprotol.
comment:8 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Sorry you spent so much time on it and that the developers don't seem to care to fix it themselves. It's annoying when upstream developers ignore compiler warnings for decades and then disappear by the time the warnings become errors.
If there's an automated tool to fix these things that would be great. Is "cprotol" the name of the tool? I'm not familiar with it and couldn't find anything when I searched that name.
For future reference, the revision shouldn't be increased just to fix a build error. Only increase the revision if something will change for those users who already had the port installed. See the documentation of the revision keyword at https://guide.macports.org/#reference.keywords.
comment:9 Changed 7 months ago by tenomoto (Takeshi Enomoto)
I misspelled. The correct name is cproto
https://invisible-island.net/cproto/cproto.html. It creates header from source. I have not used it but it is in MacPorts. NCL/NCARG has been maintained by NCAR, i.e. paid staff and the most users (scientists and students) are not familiar with the internals.
Indeed it was a mistake to increase the revision.
This is now a problem at least for macOS 14/arm64, log extract from CI runner (from a rev-bump PR):