Pike on OpenBSD
Bernd Schoeller <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Hi -
I would love to run Roxen on my OpenBSD server, and the first step is to
get a current version of Pike to work on OpenBSD.
I have installed the following packages:
libnettle-3.2
gmp-5.0.2p3
gmake-4.2.1
The first hurdle is compilation of efuns.c:
Compiling modules/_Stdio/efuns.c
/home/schoelle/Code/Pike-v8.0.370/src/modules/_Stdio/efuns.c: In
function 'f_get_dir':
/home/schoelle/Code/Pike-v8.0.370/src/modules/_Stdio/efuns.c:1402:
error: 'name_max' undeclared (first use in this function)
/home/schoelle/Code/Pike-v8.0.370/src/modules/_Stdio/efuns.c:1402:
error: (Each undeclared identifier is reported only once
/home/schoelle/Code/Pike-v8.0.370/src/modules/_Stdio/efuns.c:1402:
error: for each function it appears in.)
The corresponding code is:
void f_get_dir(INT32 args)
{
[...]
#ifdef HAVE_READDIR_R
ptrdiff_t name_max = -1;
#endif
[...]
low_get_dir(dir, name_max);
stack_pop_n_elems_keep_top(args);
}
#endif /* __NT__ */
So name_max is defined conditionally, but it is used unconditionally.
Removing the #ifdef, compilation continues, but then I get the next error:
Compiling post_modules/GL/top.c
/home/schoelle/Code/Pike-v8.0.370/build/openbsd-6.0-amd64/tpike
-DNOT_INSTALLED -DPRECOMPILED_SEARCH_MORE
-m/home/schoelle/Code/Pike-v8.0.370/build/openbsd-6.0-amd64/master.pike
/home/schoelle/Code/Pike-v8.0.370/src/post_modules/GL/gen.pike
/home/schoelle/Code/Pike-v8.0.370/src/post_modules/GL/auto.c.in > auto.c.tmp
tpike(85013) in free(): error: bogus pointer (double free?) 0xebdd6208440
Abort trap (core dumped)
A stacktrace in GDB yields:
#0 0x00000c4a6ff37bca in thrkill () at <stdin>:2
#1 0x00000c4a6ff449d9 in *_libc_abort () at
/usr/src/lib/libc/stdlib/abort.c:52
#2 0x00000c4a6ff64309 in wrterror (d=0xc4a8a8c1270,
msg=0xc4a700b8dc3 "bogus pointer (double free?)", p=0xc47fd308440)
at /usr/src/lib/libc/stdlib/malloc.c:295
#3 0x00000c4a6ff657db in free (ptr=0xc47fd308440) at
/usr/src/lib/libc/stdlib/malloc.c:1364
#4 0x00000c47fcbd02b9 in really_free_mapping (m=0xc4ae765f0f0)
at /home/schoelle/Code/Pike-v8.0.370/src/mapping.c:307
#5 0x00000c47fcbdf02d in destruct_object (o=0xc4a86d9f340,
reason=Variable "reason" is not available.
)
at /home/schoelle/Code/Pike-v8.0.370/src/object.c:972
#6 0x00000c47fcbe16fc in destruct_objects_to_destruct_cb ()
at /home/schoelle/Code/Pike-v8.0.370/src/object.c:1067
#7 0x00000c47fcb428d3 in eval_instruction (
pc=0xc4a9dbb065e
"\006X\001�\001X\002�\001X\003�\001X\004�\001X\005�\023�8X\006\216")
at interpret_functions.h:2718
#8 0x00000c47fcb47310 in mega_apply_low (args=Variable "args" is not
available.
)
at /home/schoelle/Code/Pike-v8.0.370/src/interpret.c:2721
#9 0x00000c47fcbde3ce in call_pike_initializers (o=0xc4a86d9f0d0, args=0)
at /home/schoelle/Code/Pike-v8.0.370/src/object.c:338
#10 0x00000c47fcbe25af in get_master () at
/home/schoelle/Code/Pike-v8.0.370/src/object.c:702
#11 0x00000c47fcbe2ac9 in debug_master () at
/home/schoelle/Code/Pike-v8.0.370/src/object.c:720
#12 0x00000c47fcbcdc2a in load_pike_master ()
at /home/schoelle/Code/Pike-v8.0.370/src/pike_embed.c:397
#13 0x00000c47fcb2b794 in main (argc=6, argv=0x7f7ffffd7618)
at /home/schoelle/Code/Pike-v8.0.370/src/main.c:676
Anybody any hints where I should continue to investigate?
Thanks,
Bernd