Re: compiling error for version 4.9.0 and 4.9.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31 March 2015 at 11:17, Pengcheng Yang <yangpc@xxxxxxxxxxxxxxxx> wrote:
> Hi all,
>
> I have compiled gcc-4.9.2, but the same error reoccurred.
>
> the command is:
> ./configure --prefix=/panfs/home/kang/yangpc/soft/lib/gcc-4.9.2/

Firstly, don't use ./configure to build GCC, see
https://gcc.gnu.org/wiki/FAQ#configure


> --with-gmp=/panfs/home/kang/yangpc/soft/lib/gmp-5.1.3/
> --with-mpfr=/panfs/home/kang/yangpc/soft/lib/packages/mpfr-3.1.2/
> --with-mpc=/panfs/home/kang/yangpc/soft/lib/mpc/ --disable-multilib

Secondly, it is much easier to build gmp, mpfr and mpc directly in the
GCC tree, instead of installing them separately, see
https://gcc.gnu.org/wiki/InstallingGCC for how to use the
contrib/download_prerequisites script that means you don't need to use
--with-gmp and --with-mpfr and --with-mpc.

Thirdly, your paths look suspicious. The prefix for gcc, gmp and mpc
is .../soft/lib/ but the prefix for mpfr is .../soft/lib/packages ...
which is also the build path shown below. Make sure you are not trying
to build in the source tree, and are not trying to build in the
install location specified with --prefix.


> g++: braced spec '%:sanitize(address):%{!shared:libasan_preinit%O%s}
> %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan
> --no-whole-archive -Bdynamic}}%{!static-libasan:-lasan}}
> %{%:sanitize(thread):%{static-libtsan:%{!shared:-Bstatic --whole-archive
> -ltsan --no-whole-archive -Bdynamic}}%{!static-libtsan:-ltsan}}
> %{%:sanitize(leak):%{static-liblsan:%{!shared:-Bstatic --whole-archive
> -llsan --no-whole-archive -Bdynamic}}%{!static-liblsan:-llsan}}' is invalid
> at '%'
> make[3]: *** [xg++] Error 1
> make[3]: Leaving directory
> `/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2/host-x86_64-unknown-linux-gnu/gcc'
> make[2]: *** [all-stage1-gcc] Error 2
> make[2]: Leaving directory
> `/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory
> `/panfs/home/kang/yangpc/soft/lib/packages/gcc-4.9.2'
> make: *** [all] Error 2




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux