compiling Pike on NetBSD

Unknown <[email protected]> Tue, 01 Oct 2019 14:21:01 +0200
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
> Hi!
>
> I am trying to build Pike on NetBSD. I get a pike binary, but it crashes 
> when it tries to compile(?) post_modules/GL/gen.pike. I get this stack 
> trace from the generated core file:
>
> #0  0x000074c529ded1e4 in ?? ()
> #1  0x000000000042a169 in eval_instruction (pc=<optimized out>) at 
> /export/home/joern/pike/Pike-v8.0.702/src/interpret.c:1711
[...]

Try running paxctl +m on the pike binary. Alternatively you can try
compiling pike --without-machine-code.

> I actually want to build the Roxen webserver, and compiling Pike there 
> with '-O0", I see
>
> #0  0x000076730e9e81e4 in ?? ()
> #1  0x0000000000431ad3 in eval_instruction (pc=0x76730e9e81e4 
> "UH\211\345AWAVAUATSH\203\354\bI\211\377M\213/I\307E") at
> /export/home/joern/roxen/roxen-6.1.246-src/pike/src/interpret.c:1711
> #2  0x00000000004358bb in apply_low_safe_and_stupid (o=0x76730e9af0d0, 
> offset=4) at /export/home/joern/roxen/roxen-6.1.2
> 46-src/pike/src/interpret.c:2926
>
> When compiling the current Pike sources, I always get "optimized out", 
> even when turning off the optimizer with '-O0'.
>
> Can anybody help me dig deeper to what the problem is?

The problem is most likely due to that recent releases of NetBSD have
changed the default policy regarding use of mprotect(2).

> The build environment is:
>
> NetBSD 8.1/amd64 (i.e. 64-bit ABI)
> GCC 5.5.0
> all required prerequisites are installed (e.g. gmp 6.1.2 or nettle 3.5.1)

	/grubba