* * * * *

                            Adventures in updating

Before I go to the trouble of installing the latest version of Apache [1], I
want to ensure my updates to mod_litbook [2] will compile on the lastest
version of Apache. I've been developing it using Apache 2.4.38, a version
from 2019 (and because I'm using mod_lua [3] it's vulnerable to CVE-2021-
44790 [4]). So I pull down the latest version (as of this writing, the latest
stable version is 2.4.54) and start compiling.

I then got a compilation error about a missing field in a structure
definition. Great! I think. Just how much of my system will I have to have to
upgrade? I start investigating and find something odd—said field not only
exists, it exists in the source code for Apache! The very codebase I'm
compiling. Yet, for some reason, the compiler thinks the field doesn't exist.

At this point, I was reminded of Sherlock Holmes: “When you have eliminated
the impossible, whatever remains, however improbable, must be the truth.” So
the compiler must be picking up the incorrect header from somewhere. And
“somewhere” ended up being the normal location of all system wide headers.
The Apache 2.4.38 versions must have been installed such that such that one
could compile Apache modules outside of the Apache source code directories.

It was a matter of identifying all such headers and removing them. Once I did
that, Apache 2.5.54 compiled cleanly, along with mod_litbook [5], and it's
now running fine on my development system.

So that's something else to keep in mind.

Sigh.

[1] https://httpd.apache.org/docs/2.4/
[2] gopher://gopher.conman.org/0Phlog:2022/11/28.1
[3] https://httpd.apache.org/docs/2.4/mod/mod_lua.html
[4] https://nvd.nist.gov/vuln/detail/CVE-2021-44790
[5] https://github.com/spc476/mod_litbook

Email author at [email protected]