[Slackbuilds-users] pcc

B Watson yalhcru at gmail.com
Sat Oct 25 20:36:55 UTC 2014

Has anyone built pcc (and pcc-libs) on 14.1? It build fine here, but
anything I compile with it will just segfault when it runs (gdb says it
happens in glibc's init code, before the program's main() ever runs).

Happens on 32-bit -current, 32-bit 14.0, and 64-bit 14.1 for me. I still
have an old 13.0 box, and pcc works fine there. I suspect it works on
13.37, since that was the version it was originally submitted for.

Have mailed the maintainer, not yet gotten a response (but it's only
been a day, I'll be patient). Just wondering if anyone else gets the
same results I do:

# ulimit -c unlimited    # so we get core dumps
# cat hello.c
#include <stdio.h>

int main(int argc, char **argv) {
   printf("hello world\n");
   return 0;
# pcc -g -o hello hello.c
# ./hello
Segmentation fault (core dumped)
$ gdb -c core ./hello
(gdb) bt
#0  0x0000000000000001 in ?? ()
#1  0x0000000000400469 in __ctors ()
#2  0x00000000004004d6 in __do_global_ctors_aux ()
#3  0x0000000000400374 in _init ()
#4  0x0000000000000001 in ?? ()
#5  0x0000000000400583 in __libc_csu_init ()
#6  0x00002b6476283d15 in __libc_start_main () from /lib64/libc.so.6
#7  0x00000000004003e9 in _start () at ../sysdeps/x86_64/start.S:123

The stack trace looks a little different on 32-bit (it says the stack
is corrupted, in fact).

If I compile like this:

# pcc -c hello
# gcc -o hello hello.o

...then all is well.

If I don't hear back from the maintainer in a few days, I'd like to try
to fix this and take over maintenance of the build.

More information about the SlackBuilds-users mailing list