ghe | 15 Nov 2011 17:48
Favicon

Compiling pcc?


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
(Continue reading)

Szabolcs Nagy | 15 Nov 2011 21:08

Re: Compiling pcc?

* ghe <at> sdf.org <ghe <at> sdf.org> [2011-11-15 17:48:31 +0100]:
> I'm trying to install pcc (version 1.0.0) on my Debian computer
> (AMD64), and... it doesn't work :(
> 

what you did looks reasonable

don't use 1.0.0 but the latest cvs source
you may want to compile with the -v flag
to see if everything is ok
(with -X you can look at the generated temporary files)
check if environment is ok
try static linking with -static
look at the generated asm and .o (readelf, objdump)
to figure out if it's a linker or code generation issue

ghe | 15 Nov 2011 21:31
Favicon

Re: Compiling pcc?


>
> * ghe <at> sdf.org <ghe <at> sdf.org> [2011-11-15 17:48:31 +0100]:
>> I'm trying to install pcc (version 1.0.0) on my Debian computer 
>> (AMD64), and... it doesn't work :(
>>
>
> what you did looks reasonable
>
> don't use 1.0.0 but the latest cvs source
>

Thank you, this simple advice solved it...  It is still necessary to give a
--with-libdir=$HOME/opt/pcc/lib/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib option to the
configure script, but it seems to work correctly now.

>
> you may want to compile with the -v flag
> to see if everything is ok
> (with -X you can look at the generated temporary files)
> check if environment is ok
> try static linking with -static
> look at the generated asm and .o (readelf, objdump)
> to figure out if it's a linker or code generation issue
>

Thorsten Glaser | 15 Nov 2011 23:00
Picon
Gravatar

Re: Compiling pcc?

ghe <at> sdf.org dixit:

> I'm trying to install pcc (version 1.0.0) on my Debian computer (AMD64), and...

Use Debian stable or older – newer has Multiarch and will not
currently work. It is on my TODO, though.

Also, /usr/lib64 looks bogus.

bye,
//mirabilos
--

-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
						-- Edward Burr

ghe | 16 Nov 2011 00:04
Favicon

Re: Compiling pcc?


>
>> I'm trying to install pcc (version 1.0.0) on my Debian computer 
>> (AMD64), and...
>
> Use Debian stable or older -- newer has Multiarch and will not currently 
> work. It is on my TODO, though.
>

Well, changing the operating system to install a compiler is not really a solution :)

>
> Also, /usr/lib64 looks bogus.
>

Indeed.  But compiling after giving the option
--with-libdir=$HOME/opt/pcc/lib/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib to "configure"
does solve the problem.

--ghe


Gmane