Skip to content

mod_http3: Fix the static build of the QUIC transport sources - #1068

Open
arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-70368-http3-static-build
Open

arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-70368-http3-static-build

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

The QUIC transport sources under quic/ and quic/detail/ were only reachable through %.slo pattern rules. A static build (--enable-http3=static) needs .lo objects, so it stops with:

make: *** No rule to make target 'h3q_tls.lo', needed by 'libmod_http3.la'.  Stop.

This uses vpath so the stock .c.lo and .c.slo rules find those sources in both builds, and adds the C99 flags to LT_COMPILE as well as SH_COMPILE, so static objects are compiled the same way as shared ones (until now none of the static compiles carried -std=c99).

Tested from clean builds with nghttp3 1.18, ngtcp2 1.25 and OpenSSL 3.6. Static: fails on trunk; with this change all 18 sources build with -std=c99 and httpd links with mod_http3 compiled in. Shared: builds before and after, all 18 sources with -std=c99. An out-of-tree static build works as well.

Bugzilla: https://bz.apache.org/bugzilla/show_bug.cgi?id=70368 (reported by Pierre Brochard). The patch attached there switches the rules to %.lo, which fixes the static build but breaks the default shared one, hence vpath.

Not addressed here: the mod_http3 CI job builds the module shared only, which is why the static failure went unnoticed; a --enable-http3=static entry would cover it. Separately, with --with-http3-quic=openssl, config2.m4 lists h3q_ossl*.lo objects whose sources are not in the tree.

@jfclere this is your Makefile, would you take a look?

The QUIC transport sources under quic/ and quic/detail/ were only
reachable through %.slo pattern rules, so a static build
(--enable-http3=static), which needs .lo objects, failed with
"No rule to make target 'h3q_tls.lo'".  Use vpath so the stock .c.lo
and .c.slo rules find them for both builds, and add the C99 flags to
LT_COMPILE as well as SH_COMPILE so static objects are compiled the
same way as shared ones.

PR: 70368
Reported by: Pierre Brochard
@jfclere

jfclere commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Oops I have forgotten to commit a bunch of files for the --with-http3-quic=openssl
#1074
Once all OK I will merge all the stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants