Discussion:
Working pcc on Linux/x86-64?
Irek Szczesniak
2012-08-11 13:29:28 UTC
Permalink
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()

Now if we add -g OR -O to the pcc command line the binaries starts to work.

Any clues why this happens?

Irek
Irek Szczesniak
2012-08-11 13:35:03 UTC
Permalink
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Ignore the whole comments, I used pcc1.0.0 installed on Suse instead
of pointing PATH to my self-build copy. Sorry.

So, stack trace for the crashing binaries is always:
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in __do_global_ctors_aux ()
#2 0x080482b8 in _init ()
#3 0xf7ffd8e8 in _r_debug ()
#4 0x08049ff4 in ?? ()

-O and -g do NOT help. pcc version is 20120810.

Anders, can you reproduce?

Irek
Anders Magnusson
2012-08-11 13:38:23 UTC
Permalink
Hi,
Post by Irek Szczesniak
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Ignore the whole comments, I used pcc1.0.0 installed on Suse instead
of pointing PATH to my self-build copy. Sorry.
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in __do_global_ctors_aux ()
#2 0x080482b8 in _init ()
#3 0xf7ffd8e8 in _r_debug ()
#4 0x08049ff4 in ?? ()
-O and -g do NOT help. pcc version is 20120810.
Anders, can you reproduce?
I must install suse first to be able to test. I'll do that as soon as I
get time for it.

-- Ragge
Irek Szczesniak
2012-08-11 13:45:02 UTC
Permalink
Hi,
Post by Irek Szczesniak
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Ignore the whole comments, I used pcc1.0.0 installed on Suse instead
of pointing PATH to my self-build copy. Sorry.
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in __do_global_ctors_aux ()
#2 0x080482b8 in _init ()
#3 0xf7ffd8e8 in _r_debug ()
#4 0x08049ff4 in ?? ()
-O and -g do NOT help. pcc version is 20120810.
Anders, can you reproduce?
I must install suse first to be able to test. I'll do that as soon as I get
time for it.
Werner, could you assist, please? It appears pcc works on Ubuntu but
fails on Suse 12.1. Is there anything which may cause an ABI
incompatibility between the two Linuxes (LSB violation?)?

Irek
Guido Berhoerster
2012-08-11 14:08:06 UTC
Permalink
Post by Irek Szczesniak
Hi,
Post by Irek Szczesniak
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Ignore the whole comments, I used pcc1.0.0 installed on Suse instead
of pointing PATH to my self-build copy. Sorry.
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in __do_global_ctors_aux ()
#2 0x080482b8 in _init ()
#3 0xf7ffd8e8 in _r_debug ()
#4 0x08049ff4 in ?? ()
-O and -g do NOT help. pcc version is 20120810.
Anders, can you reproduce?
I must install suse first to be able to test. I'll do that as soon as I get
time for it.
Werner, could you assist, please? It appears pcc works on Ubuntu but
fails on Suse 12.1. Is there anything which may cause an ABI
incompatibility between the two Linuxes (LSB violation?)?
I am the openSUSE maintainer for pcc and it works fine for me on
12.1/x86_64 (except for static linking). Can you post an actual
test case so I can reproduce the issue?
--
Guido Berhoerster
Irek Szczesniak
2012-08-11 14:40:33 UTC
Permalink
Post by Guido Berhoerster
Post by Irek Szczesniak
Hi,
Post by Irek Szczesniak
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Ignore the whole comments, I used pcc1.0.0 installed on Suse instead
of pointing PATH to my self-build copy. Sorry.
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in __do_global_ctors_aux ()
#2 0x080482b8 in _init ()
#3 0xf7ffd8e8 in _r_debug ()
#4 0x08049ff4 in ?? ()
-O and -g do NOT help. pcc version is 20120810.
Anders, can you reproduce?
I must install suse first to be able to test. I'll do that as soon as I get
time for it.
Werner, could you assist, please? It appears pcc works on Ubuntu but
fails on Suse 12.1. Is there anything which may cause an ABI
incompatibility between the two Linuxes (LSB violation?)?
I am the openSUSE maintainer for pcc and it works fine for me on
12.1/x86_64 (except for static linking). Can you post an actual
test case so I can reproduce the issue?
Testcase:
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
puts("hello GE healthcare");
return 0;
}

What was the last version which worked for you (exact download links,
please)? Are there updated RPMs we can use?

Irek
Guido Berhoerster
2012-08-11 14:55:05 UTC
Permalink
Post by Irek Szczesniak
Post by Guido Berhoerster
Post by Irek Szczesniak
Hi,
Post by Irek Szczesniak
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Ignore the whole comments, I used pcc1.0.0 installed on Suse instead
of pointing PATH to my self-build copy. Sorry.
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in __do_global_ctors_aux ()
#2 0x080482b8 in _init ()
#3 0xf7ffd8e8 in _r_debug ()
#4 0x08049ff4 in ?? ()
-O and -g do NOT help. pcc version is 20120810.
Anders, can you reproduce?
I must install suse first to be able to test. I'll do that as soon as I get
time for it.
Werner, could you assist, please? It appears pcc works on Ubuntu but
fails on Suse 12.1. Is there anything which may cause an ABI
incompatibility between the two Linuxes (LSB violation?)?
I am the openSUSE maintainer for pcc and it works fine for me on
12.1/x86_64 (except for static linking). Can you post an actual
test case so I can reproduce the issue?
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
puts("hello GE healthcare");
return 0;
}
What was the last version which worked for you (exact download links,
please)? Are there updated RPMs we can use?
For the above it is not very clear which pcc you are talking
about, are you using the offical package provided by openSUSE or
some self-compiled version?
The above example works fine with the official package from
openSUSE 12.1/12.2/Factory which is basically the 1.0.0 release
with a few, selected backported fixes. You can find the package
sources at
https://build.opensuse.org/package/files?package=pcc&project=devel%3Atools%3Acompiler

I was planning to update the package to a later CVS snapshot due
to the slow releases but haven't gotten round to it since it
entails quite a bit of testing work.
--
Guido Berhoerster
Irek Szczesniak
2012-08-11 15:32:59 UTC
Permalink
Post by Guido Berhoerster
Post by Irek Szczesniak
Post by Guido Berhoerster
Post by Irek Szczesniak
Hi,
Post by Irek Szczesniak
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Ignore the whole comments, I used pcc1.0.0 installed on Suse instead
of pointing PATH to my self-build copy. Sorry.
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in __do_global_ctors_aux ()
#2 0x080482b8 in _init ()
#3 0xf7ffd8e8 in _r_debug ()
#4 0x08049ff4 in ?? ()
-O and -g do NOT help. pcc version is 20120810.
Anders, can you reproduce?
I must install suse first to be able to test. I'll do that as soon as I get
time for it.
Werner, could you assist, please? It appears pcc works on Ubuntu but
fails on Suse 12.1. Is there anything which may cause an ABI
incompatibility between the two Linuxes (LSB violation?)?
I am the openSUSE maintainer for pcc and it works fine for me on
12.1/x86_64 (except for static linking). Can you post an actual
test case so I can reproduce the issue?
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
puts("hello GE healthcare");
return 0;
}
What was the last version which worked for you (exact download links,
please)? Are there updated RPMs we can use?
For the above it is not very clear which pcc you are talking
about, are you using the offical package provided by openSUSE or
some self-compiled version?
The above example works fine with the official package from
openSUSE 12.1/12.2/Factory which is basically the 1.0.0 release
with a few, selected backported fixes. You can find the package
sources at
https://build.opensuse.org/package/files?package=pcc&project=devel%3Atools%3Acompiler
Ah. A collegue already tested that one. It fails to compile Blast and
ast-ksh and produces Staden binaries which don't work for whatever
hellish reason. See below.
Post by Guido Berhoerster
I was planning to update the package to a later CVS snapshot due
to the slow releases but haven't gotten round to it since it
entails quite a bit of testing work.
I was talking about the recent 20120810 snapshot. pcc1.0.0 is utterly
*useless* because it can't compile software like Blast, Staden or
ast-ksh (ksh93), which are cornerstones for our Bioinformatics
business.

Irek
Anders Magnusson
2012-08-15 19:55:36 UTC
Permalink
I was planning to update the package to a later CVS snapshot due to
the slow releases but haven't gotten round to it since it entails
quite a bit of testing work.
Slow releases are an unfortunate side effect of only doing pcc hacking
as a hobby project. Sorry :-/
For the record I have a vague plan to try to fix all reported bugs now
and then make a new release.
There are _lots_ of bugs fixed since 1.0.0.

-- Ragge

ольга крыжановская
2012-08-11 19:26:42 UTC
Permalink
Irek, please pull the sources via cvs -d
:pserver:***@pcc.ludd.ltu.se:/cvsroot co pcc pcc-libs
I managed to build a pcc which can compile a hello world application.
Unfortunately a more complex application fails:

wget --http-user="I accept www.opensource.org/licenses/eclipse"
--http-passwd="."
'http://www2.research.att.com/~gsf/download/tgz/INIT.2012-08-01.tgz
wget --http-user="I accept www.opensource.org/licenses/eclipse"
--http-passwd="."
'http://www2.research.att.com/~gsf/download/tgz/ast-ksh.2012-08-01.tgz
(export PATH=$HOME/pccinstall/bin:$PATH ; CC=$HOME/pccinstall/bin/pcc
~/bin/ksh ./bin/package make 2>&1 | tee -a buildlog.log)
package: update /home/fleyta/work/ast_ksh_20120801/build_pcc/bin/execrate
package: initialize the
/home/fleyta/work/ast_ksh_20120801/build_pcc/arch/linux.i386-64 view
package: update
/home/fleyta/work/ast_ksh_20120801/build_pcc/arch/linux.i386-64/lib/probe/C/make/probe
package: update
/home/fleyta/work/ast_ksh_20120801/build_pcc/arch/linux.i386-64/bin/mamake
major internal compiler error:
/home/fleyta/work/ast_ksh_20120801/build_pcc/src/cmd/INIT/mamake.c,
line 372
/home/test001/pccinstall/lib/ccom terminated with status 1

Olga
Post by Irek Szczesniak
Has anyone managed to get a working pcc on Linux/x86-64 (we use Suse
12.1 right now)? pcc foo.c -o foo compiles the code but when we start
it the binaries all crash with
(gdb) where
#0 0x00000001 in ?? ()
#1 0x08048378 in ?? ()
#2 0x080482b8 in ?? ()
Now if we add -g OR -O to the pcc command line the binaries starts to work.
Any clues why this happens?
Irek
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ ***@gmail.com \-`\-'----.
`'-..-| / http://twitter.com/fleyta \ |-..-'`
/\/\ Solaris/BSD//C/C++ programmer /\/\
`--` `--`
Loading...