Illegal instruction in mod_maxminddb when compiled for Raspberry Pi
woodscooter opened this issue · 4 comments
I'm unable to run Apache2 with mod_maxminddb. When the module is available ( a2enmod maxminddb), Apache will not restart, with a message like
Process: 24603 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
With the module available, apache2ctl configtest returns
Illegal instruction
Action 'configtest' failed.
The Apache error log may have more information.
but there's no further information from configtest about where that illegal instruction is, and the error log is not written to.
However, configtest says Syntax OK and Apache2 restarts just fine when mod_maxminddb is not available (a2dismod maxminddb) so I deduce the illegal instruction appears in that mod_
mod_maxminddb was built from the tarball 1.1.0 from GitHub here.
./configure ran successfully. Although there were issues recorded in the log, the final exit code was 0.
My Apache is 2.4.10, on a Raspberry Pi Model B Rev2 running Debian 8 (Jessie). I'm attaching the config.log and my modified apache2.conf (modified at lines 156..159 and 215).
The same 'Illegal instruction' error occurs when using an unmodified apache2.conf so I don't think it can be a configuration issue.
Based on your error, it sounds like you are targeting the wrong ARM architecture. I don't have much experience compiling things for the various ARM architectures. You may have better luck asking on a Raspberry Pi forum or Stack Overflow.
You are right. I've now built Apache2.4 and maxminddb on a Raspberry Pi 3 and the 'Illegal instruction' error does not occur.
Now I'm getting Failed to open /usr/local/share/GeoIp/GeoLite2-Country.mmdb: Error opening the specified MaxMind DB file
but that's a different matter altogether.
Thanks for setting me on the right path.
I suspect that should be GeoIP
with a capital P in the path config.
Well spotted, sir! I have been looking for higher level causes for that failure for an unreasonably long time, and there it is, in plain sight. Case closed.