Opened 4 weeks ago

Last modified 3 weeks 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)

main.log (799.7 KB) - added by josephsacco 4 weeks ago.
main.log

Download all attachments as: .zip

Change History (18)

Changed 4 weeks ago by josephsacco

Attachment: main.log added

main.log

comment:1 Changed 4 weeks ago by Schamschula (Marius Schamschula)

I'm not sure what is going on here. I got a clean rebuild on Mojave.

comment:2 Changed 4 weeks ago by josephsacco

Apologies for being sloppy. This error occurs on Monterey.

-Joseph

comment:3 Changed 4 weeks ago by ryandesign (Ryan Schmidt)

Keywords: monterey added; apache2 openssl removed
Port: openssl3 added
Summary: upgrading openssl 3 breaks apache2apache2 @2.4.52: error: implicit declaration of function 'ERR_GET_FUNC' is invalid in C99

comment:4 Changed 4 weeks ago by ryandesign (Ryan Schmidt)

comment:5 Changed 4 weeks ago by jmroot (Joshua Root)

comment:6 Changed 4 weeks ago by jmroot (Joshua Root)

Cc: Schamschula added
Keywords: monterey removed
Owner: set to ryandesign
Status: newassigned

comment:7 Changed 4 weeks ago by ryandesign (Ryan Schmidt)

I'm not working on this right now if anyone else wants to.

comment:8 Changed 4 weeks ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:9 in reply to:  5 ; Changed 4 weeks 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...?

https://ports.macports.org/port/apache2/builds/

comment:10 Changed 4 weeks 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...

Last edited 4 weeks ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:11 Changed 4 weeks ago by radarhere (Andrew Murray)

Cc: radarhere added

comment:12 Changed 4 weeks ago by Schamschula (Marius Schamschula)

Cc: radarhere removed

I get the same error on my Intel MBP running Monterey.

comment:13 Changed 4 weeks ago by radarhere (Andrew Murray)

Cc: radarhere added

comment:14 in reply to:  10 Changed 4 weeks 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 4 weeks ago by Schamschula (Marius Schamschula)

In 9535fdff21d764948182c6bc3f3c9e6fc318f23f/macports-ports (master):

apache2: fix "ERR_GET_FUNC" is invalid with openssl 3.0

Uses upstream patch
See: #63846

comment:16 in reply to:  9 ; Changed 4 weeks ago by ryandesign (Ryan Schmidt)

Replying to mascguy:

why would builds be succeeding for pre-Monterey macOS versions...?

https://ports.macports.org/port/apache2/builds/

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 in reply to:  16 Changed 4 weeks 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. build-time.)

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.

Last edited 3 weeks ago by mascguy (Christopher Nielsen) (previous) (diff)
Note: See TracTickets for help on using tickets.