Opened 23 months ago
Last modified 23 months ago
#63846 assigned defect
apache2 @2.4.52: error: implicit declaration of function 'ERR_GET_FUNC' is invalid in C99
Reported by: | josephsacco | Owned by: | ryandesign (Ryan Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | monterey | Cc: | Schamschula (Marius Schamschula), mascguy (Christopher Nielsen), radarhere (Andrew Murray) |
Port: | apache2, openssl3 |
Description
The recent upgrade for openssl3 breaks apache2. Log file attached.
-Joseph
Attachments (1)
Change History (18)
Changed 23 months ago by josephsacco
comment:1 Changed 23 months ago by Schamschula (Marius Schamschula)
I'm not sure what is going on here. I got a clean rebuild on Mojave.
comment:2 Changed 23 months ago by josephsacco
Apologies for being sloppy. This error occurs on Monterey.
-Joseph
comment:3 Changed 23 months ago by ryandesign (Ryan Schmidt)
Keywords: | monterey added; apache2 openssl removed |
---|---|
Port: | openssl3 added |
Summary: | upgrading openssl 3 breaks apache2 → apache2 @2.4.52: error: implicit declaration of function 'ERR_GET_FUNC' is invalid in C99 |
comment:4 Changed 23 months ago by ryandesign (Ryan Schmidt)
Here's a confirming log from the buildbot: https://build.macports.org/builders/ports-12_arm64-builder/builds/8149/steps/install-port/logs/stdio
comment:5 follow-up: 9 Changed 23 months ago by jmroot (Joshua Root)
ERR_GET_FUNC
is gone in openssl 3. https://www.openssl.org/news/changelog.html#openssl-30
comment:6 Changed 23 months ago by jmroot (Joshua Root)
Cc: | Schamschula added |
---|---|
Keywords: | monterey removed |
Owner: | set to ryandesign |
Status: | new → assigned |
comment:7 Changed 23 months ago by ryandesign (Ryan Schmidt)
I'm not working on this right now if anyone else wants to.
comment:8 Changed 23 months ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:9 follow-up: 16 Changed 23 months ago by mascguy (Christopher Nielsen)
Keywords: | monterey added |
---|
Replying to jmroot:
ERR_GET_FUNC
is gone in openssl 3. https://www.openssl.org/news/changelog.html#openssl-30
Agreed, based on the changelog. However, unless I'm missing something (?), why would builds be succeeding for pre-Monterey macOS versions...?
comment:10 follow-up: 14 Changed 23 months ago by mascguy (Christopher Nielsen)
It appears to be an implicit function declaration, causing a compilation failure on ARM. Yet, wouldn't one expect a link-time failure on x86_64, if that function truly doesn't exist anymore...?
ssl_engine_init.c:1375:22: error: implicit declaration of function 'ERR_GET_FUNC' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
Unless they're dynamically loading the library at runtime, I suppose. Hmmm...
comment:11 Changed 23 months ago by radarhere (Andrew Murray)
Cc: | radarhere added |
---|
comment:12 Changed 23 months ago by Schamschula (Marius Schamschula)
Cc: | radarhere removed |
---|
I get the same error on my Intel MBP running Monterey.
comment:13 Changed 23 months ago by radarhere (Andrew Murray)
Cc: | radarhere added |
---|
comment:14 Changed 23 months ago by jmroot (Joshua Root)
Replying to mascguy:
Unless they're dynamically loading the library at runtime, I suppose.
Yes, that is exactly how apache modules work. It will be a runtime failure when built with a compiler that allows implicit declarations.
comment:15 Changed 23 months ago by Schamschula (Marius Schamschula)
comment:16 follow-up: 17 Changed 23 months ago by ryandesign (Ryan Schmidt)
Replying to mascguy:
why would builds be succeeding for pre-Monterey macOS versions...?
Implicit declaration of function is an error in Xcode 12 or later, which is used by macOS 11 and later builders. macOS 10.15 and earlier builders use earlier Xcode versions in which implicit declaration of function is only a warning.
comment:17 Changed 23 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
Implicit declaration of function is an error in Xcode 12 or later, which is used by macOS 11 and later builders. macOS 10.15 and earlier builders use earlier Xcode versions in which implicit declaration of function is only a warning.
That's understood. What I failed to originally consider though, is the dynamic, pluggable nature of Apache. (And runtime linking, vs. static.)
Regardless, we need to step back, and consider where implicit function declarations are truly errors across-the-board. This is certainly one great example, and there are undoubtedly others.
main.log