Trying to get Pike (7.8.700 still) to compile on Debian GNU/Hurd (which was
officially released(!) on May 23, for some value of "released"), I found three
issues:
1. PATH_MAX used as the size of the buffer passed to realpath() in system.c.
pathnames can be arbirarily long on Hurd, so one should in this instance pass
NULL to realpath and let it allocate the returned string itself.
2. mach/message.h, which defines mach_msg_type_number_t, is not included by
mach/task_info.h (or either of the other two .h files); we have to include it
ourselves directly.
3. The GTK2 module uses a couple of Xlib functions without explicitly linking
with -lX11, instead relying on the GTK libs to pull it in. This practice is
discouraged/deprecated, but apparently still works with the toolchains on most
of the architectures; I don't know why Debian GNU/Hurd is different in this
regard.
I've created a patch that addresses these issues, but I'm not sure if it
integrates in the most clean way. It's also untested, because pike dies right
away when run to generate the documentation (I've: uncommented the several
fprintf calls in object.c):
Need a new master object...
Builtin_constants: 0x871ae3c
Cannot load master object yet!
/home/holmgren/pike7.8-7.8.700/src/object.c:695: Fatal error:
Couldn't load master object.
No stack - no backtrace.
Backtrace from gdb:
#9 0x08144d47 in debug_fatal (fmt=fmt@entry=0x84b6eb7 "Couldn't load master
object.\n") at /home/holmgren/pike7.8-7.8.700/src/error.c:654
#10 0x08186ce9 in debug_master () at
/home/holmgren/pike7.8-7.8.700/src/object.c:695
#11 0x083beca9 in resolve_syms () at /Users/hww3/pike-
build/src/post_modules/GSSAPI/gssapi.cmod:434
#12 0x083bf12d in get_dd_oid (gss_oid=0x182d8c0) at /Users/hww3/pike-
build/src/post_modules/GSSAPI/gssapi.cmod:351
#13 0x083ca9c8 in pike_module_GSSAPI_init () at /Users/hww3/pike-
build/src/post_modules/GSSAPI/gssapi.cmod:4450
#14 0x082106d7 in init_modules () at
/home/holmgren/pike7.8-7.8.700/src/module.c:424
#15 0x0817b7a5 in init_pike_runtime (exit_cb=0x80e6f00 <exit@plt>) at
/home/holmgren/pike7.8-7.8.700/src/pike_embed.c:418
#16 0x080e8f1d in main (argc=4, argv=0x3dffd68) at
/home/holmgren/pike7.8-7.8.700/src/main.c:610
It seems that _static_modules isn't set yet. Any idea why? Or rather, why is
debug_master() called while initializing the static modules?
Oh, now I know! The problem is of course that the modules aren't being linked
dynamically at all. That's probably the reason behind issue #3, too. I guess
there's been some code rot because nobody ever links the modules statically.
You might want to look into why static modules don't work - but probably
not...
--
Magnus Holmgren holmgren(a)debian.org
Debian Developer