This beat is technotronic.
Dec. 6th, 2009 08:31 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
A post for the geeks.
The following is for the benefit of Google. If you're using mod_macro and you see this horrible, horrible error:
# /etc/init.d/apache configtest [Fri Dec 04 17:02:45 2009] [crit] [Fri Dec 04 17:02:45 2009] file mod_macro.c, line 156, assertion "macros" failed Abort - core dumped
— it doesn't mean your mod_macro.c failed to link properly — it means you tried to use a couple of macros without defining them. Go fix your conf files.
I contemplate an esoteric scripting language called faffsh, where scripts have extension .palaver . The interpreter will, of course, be an unmodified copy of bash.
Update: Let me absolutely assure you:
- If mod_macro crashes on a configtest in this manner, your config uses a macro before defining it.
- If you're absolutely certain this isn't happening, go back and look, 'cos it is.
- If you've looked and you really are absolutely certain, look again at the precise order the definition and use are being loaded in. 'Cos THAT'S WHAT IT MEANS. YOU GOT IT WRONG. GO FIX IT.
If you need to convince yourself of this, try recompiling mod_macro.so with debug on:
/usr/local/apache/bin/apxs -c -i -a -D MOD_MACRO_DEBUG=1 mod_macro.c
This will make a lot of noise on configtest, but it'll tell you each step of the process. If you don't see "macro MACRO_NAME is new" before you see the attempt to use it, then it hasn't been defined before use. Really really.