Package Source installation ,showing error

Latest response

Hi,
When i'm trying to install GCC source packages, than showing

[root@01 ~]# CC='/home/gcc' ./configure --prefix=/home/gcc

Showing Error:
From config.log

configure:4483: error: in `/gcc-6.3.0':
configure:4487: error: C compiler cannot create executables

  • Red Hat Enterprise Linux Server release 6.6 (Santiago) Is not subscribed.
    Is it any technical restriction for without OS subscription ? or other issue ?

Please check attached IMAGE.

Regards
Roman
System Admin

Responses

Hi Roman,

Image is not attached. If gcc is already installed, I don't think not having a subscription should be an issue.

CC='/home/gcc' ./configure --prefix=/home/gcc

The setting "CC='/home/gcc' implies that /home/gcc would have to be the actual C compiler binary to use while executing the configure script.

On the other hand, "./configure --prefix=/home/gcc" implies you're beginning to build a new version of the gcc compiler, to be installed into directories like /home/gcc/bin and /home/gcc/lib.

I see two fundamental problems there: 1.) /home/gcc can be either an executable file or a directory, but not both at the same time. 2.) You cannot use a compiler that you haven't yet successfully built to configure itself!

If you are trying to bootstrap a gcc compiler installation from scratch (i.e. build a compiler without having any previous version of it installed), I believe you should find special instructions for that case somewhere in GCC documentation. This involves first automatically building a very simple version of the compiler, and then using it to build a more complex version, repeating this cycle as necessary.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.