g***@sdf.org
2011-11-15 16:54:16 UTC
Hi list,
I'm trying to install pcc (version 1.0.0) on my Debian computer (AMD64),
and... it doesn't work :(
I did the usual:
$ cd pcc-libs-1.0.0
$ ./configure --prefix=$HOME/opt/pcc
$ make
$ make install
$ cd ../pcc-1.0.0
$ ./configure --prefix=$HOME/opt/pcc
$ make
$ make install
but:
$ echo "int main () { return 0; }" >> foo.c
$ pcc foo.c
ld: cannot find /usr/lib64/crt1.o: No such file or directory
ld: cannot find /usr/lib64/crti.o: No such file or directory
So I figured out that I should define the "--with-libdir" option of the
configure script, which I did:
$ ./configure --prefix=$HOME/opt/pcc --with-libdir=$HOME/opt/pcc/lib/pcc/x86_64-unknown-linux-gnu/1.0.0.RELEASE/lib
$ make
$ make install
$ cd ..
$ echo "int main () { return 0; }" >> foo.c
$ pcc foo.c
$
Everything seems to be fine now, but...
$ ./a.out
Segmentation fault
$ gdb -q a.out
Reading symbols from a.out...(no debugging symbols found)...done.
(gdb) run
Starting program: a.out
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000001 in ?? ()
(gdb) bt
#0 0x0000000000000001 in ?? ()
#1 0x00000000004003ce in __do_global_ctors_aux ()
#2 0x00000000004002e9 in _init ()
#3 0x0000000000000000 in ?? ()
(gdb) Quit
$
What did I do wrong, and what should I do in order to make it work?
Best,
--ghe
I'm trying to install pcc (version 1.0.0) on my Debian computer (AMD64),
and... it doesn't work :(
I did the usual:
$ cd pcc-libs-1.0.0
$ ./configure --prefix=$HOME/opt/pcc
$ make
$ make install
$ cd ../pcc-1.0.0
$ ./configure --prefix=$HOME/opt/pcc
$ make
$ make install
but:
$ echo "int main () { return 0; }" >> foo.c
$ pcc foo.c
ld: cannot find /usr/lib64/crt1.o: No such file or directory
ld: cannot find /usr/lib64/crti.o: No such file or directory
So I figured out that I should define the "--with-libdir" option of the
configure script, which I did:
$ ./configure --prefix=$HOME/opt/pcc --with-libdir=$HOME/opt/pcc/lib/pcc/x86_64-unknown-linux-gnu/1.0.0.RELEASE/lib
$ make
$ make install
$ cd ..
$ echo "int main () { return 0; }" >> foo.c
$ pcc foo.c
$
Everything seems to be fine now, but...
$ ./a.out
Segmentation fault
$ gdb -q a.out
Reading symbols from a.out...(no debugging symbols found)...done.
(gdb) run
Starting program: a.out
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000001 in ?? ()
(gdb) bt
#0 0x0000000000000001 in ?? ()
#1 0x00000000004003ce in __do_global_ctors_aux ()
#2 0x00000000004002e9 in _init ()
#3 0x0000000000000000 in ?? ()
(gdb) Quit
$
What did I do wrong, and what should I do in order to make it work?
Best,
--ghe