gcc install fails silently (AVR build)
Georg-Johann Lay
gjl@gcc.gnu.org
Thu Jul 19 11:30:00 GMT 2012
Sylvain Leroux schrieb:
> Hi Georg-Johann,
> And thanks for your answer. Some comments inline:
>
> On 07/18/2012 09:35 PM, Georg-Johann Lay wrote:
>> If you also downloaded the sources to /tmp/gcc-4.7.1 don't install
>> the compiler to that location.
> gcc source, build and install are three different directories.
>
>
>> You tried without the program suffix?
>>
>> If you configure without program-suffix and -prefix, the default name of
>> the compiler will ne avr-gcc and also an avr-gcc-4.7.1 will be installed.
> Just to make it clear, I was not able to find any combination of program
> suffix/prefix that leads to /all/ my binaries being installed as
> 'avr-XXXX-4.7.1'...
>
> I made some further tests:
> (1) When I configure without program-suffix and -prefix, I indeed got
> gcc installed as 'avr-gcc-4.7.1' -- but all other binaries lack the
> '-4.7.1' suffix (including g++):
> sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \
> --target=avr --enable-languages=c,c++
> sh$ make -j9 && make install
> sh$ ls /tmp/gcc-4.7.1/bin/
> avr-c++ avr-g++ avr-gcc-4.7.1 avr-gcc-nm avr-gcov
> avr-cpp avr-gcc avr-gcc-ar avr-gcc-ranlib
The ar, nm and ranlib prefixes look odd.
These tools are part of binutils and configured/installed with
binutils.
The gcc prefix/suffix has no effect on them, at least if you
don't build binutils in-tree.
> (2) When I only add the '-4.7.1' suffix, gcc is still installed as
> 'avr-gcc-4.7.1' and all other binaries have the correct suffix -- but no
> longer their prefix:
> sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \
> --target=avr --enable-languages=c,c++ \
> --program-suffix=-4.7.1
> sh$ make -j9 && make install
> sh$ ls /tmp/gcc-4.7.1/bin/
> avr-gcc-4.7.1 cpp-4.7.1 gcc-4.7.1 gcc-nm-4.7.1 gcov-4.7.1
> c++-4.7.1 g++-4.7.1 gcc-ar-4.7.1 gcc-ranlib-4.7.1
>
> (3) When I only add the 'avr-' prefix things are going just like in (1)
> (without -prefix and -suffix): gcc is installed as 'avr-gcc-4.7.1' and
> all other binaries only have the 'avr-' prefix:
> sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \
> --target=avr --enable-languages=c,c++ \
> --program-prefix=avr-
> sh$ make -j9 && make install
> sh$ ls /tmp/gcc-4.7.1/bin/
> avr-c++ avr-g++ avr-gcc-4.7.1 avr-gcc-nm avr-gcov
> avr-cpp avr-gcc avr-gcc-ar avr-gcc-ranlib
>
> (4) When I both configure with prefix 'avr-' and suffix '-4.7.1', I got
> all my binaries installed with the correct prefix and suffix -- except
> that gcc is /missing/ !
> sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \
> --target=avr --enable-languages=c,c++ \
> --program-prefix=avr- \
> --program-suffix=-4.7.1
> sh$ make -j9 && make install
> sh$ ls /tmp/gcc-4.7.1/bin/
> avr-c++-4.7.1 avr-g++-4.7.1 avr-gcc-nm-4.7.1 avr-gcov-4.7.1
> avr-cpp-4.7.1 avr-gcc-ar-4.7.1 avr-gcc-ranlib-4.7.1
>
> (5) When I use a different suffix and no prefix, gcc still is installed
> as ''avr-gcc-4.7.1' whereas the other binaries are installed with the
> requested suffix:
> sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \
> --target=avr --enable-languages=c,c++ \
> --program-suffix=-custom
> sh$ make -j9 && make install
> sh$ ls /tmp/gcc-4.7.1/bin/
> avr-gcc-4.7.1 cpp-custom gcc-custom gcc-ranlib-custom g++-custom
> c++-custom gcc-ar-custom gcc-nm-custom gcov-custom
>
>
> It appears that for some reason the installation of gcc does not follow
> the same path as for the other binaries.
>
>
> - Sylvain
If you think it's a bug you can open a problem report.
You can post your patch to gcc-patches@ and discuss it there, and
maybe it's a good idea to also CC one of the build machinery maintainers
as listed in MAINTAINERS.
Johann
More information about the Gcc-help
mailing list