Modify

Opened 7 years ago

Last modified 4 years ago

#8746 reopened defect

target x86 broken (R 25209)

Reported by: rossb@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: toolchain Version: Trunk
Keywords: Cc:

Description

Problems from:

[rossb@Dev_OpenWrt trunk]$ svn info Path: . URL: svn://svn.openwrt.org/openwrt/trunk Repository Root: svn://svn.openwrt.org/openwrt Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73 Revision: 25209 Node Kind: directory Schedule: normal Last Changed Author: jow Last Changed Rev: 25209 Last Changed Date: 2011-01-28 12:04:08 -0500 (Fri, 28 Jan 2011)

Fail:

checking for the correct version of mpfr.h... yes checking for the correct version of mpc.h... no configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations. Source code for these libraries can be found at their respective hosting sites as well as at  ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also  http://gcc.gnu.org/install/prerequisites.html for additional info. If you obtained GMP, MPFR and/or MPC from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages. make[3]: *** /mnt/sda3/trunk/build_dir/toolchain-i386_gcc-4.5.1+l_uClibc-0.9.32/gcc-linaro-4.5-2010.12-0-minimal/.configured Error 1 make[3]: Leaving directory `/mnt/sda3/trunk/toolchain/gcc/minimal' make[2]: *** [toolchain/gcc/minimal/compile] Error 2 make[2]: Leaving directory `/mnt/sda3/trunk' make[1]: *** /mnt/sda3/trunk/staging_dir/toolchain-i386_gcc-4.5.1+l_uClibc-0.9.32/stamp/.toolchain_install Error 2 make[1]: Leaving directory `/mnt/sda3/trunk'

Attachments (0)

Change History (13)

comment:1 Changed 7 years ago by acinonyx

Do you have "libmpc" installed at your system?

comment:2 Changed 7 years ago by loswillios

you need the package providing libmpc.h

eg, libmpc-devel on fedora

comment:3 Changed 7 years ago by rossb@…

I installed GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. and got past the header version problem, however, the libraries cannot be found, even if I set the paths by:

a) LD_LIBRARY_PATH or
b) for above libs, ./configure --prefix=/usr

I also tried:
"Alternatively, if GMP,MPC,MPFR source distributions are found in a subdirectory of your GCC sources named gmp, mpc, mpfr, it will be built together with GCC."

from:
http://gcc.gnu.org/install/prerequisites.html

checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also

It seems the best way to fix this is to include gmp/mpfr/mpc libraries in the tarball (gcc-linaro-4.5-2010.12-0.tar.bz2) as per prerequisite recommendations and modify build accordingly. This will solve the problem in a build OS independent manner.

Haven said this, my competence is not yet at the point I can do this.

For the record, I am using a Centos 5 VM for dev.

comment:4 Changed 7 years ago by acinonyx

  • Resolution set to fixed
  • Status changed from new to closed

It should be fixed in r25283.

comment:5 Changed 7 years ago by hamvil

  • Component changed from packages to toolchain
  • Resolution fixed deleted
  • Status changed from closed to reopened

The issue is still open when compiling an x86 target. BTW shouldn't the make menuconfig check if these libs are available on the system before proceeding?

comment:6 Changed 7 years ago by peteyf

replicated here as well

comment:7 Changed 7 years ago by nbd

Did you guys try a fresh build with a clean config?

comment:8 Changed 7 years ago by nbd

  • Resolution set to no_response
  • Status changed from reopened to closed

comment:9 Changed 7 years ago by rossb@…

  • Resolution no_response deleted
  • Status changed from closed to reopened
This IS still a problem.

Here's my workaround,from: trunk/feeds/packages/devel/gcc/Makefile

U will need to change paths to match your buildsystem

define Build/Prepare
        $(call Build/Prepare/Default)
        $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c
        $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(PKG_BUILD_DIR)/gcc/version.c
        (cd $(PKG_BUILD_DIR)/libstdc++-v3; $(AUTOCONF_2_64_PATH)/autoconf;);
        $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(PKG_BUILD_DIR)/libstdc++-v3/configure
        wget -P $(PKG_BUILD_DIR) http://url/Files/OpenWrt/gmp-4.3.2.tar.bz2
        cd $(PKG_BUILD_DIR); tar -xvf gmp-4.3.2.tar.bz2; mv gmp-4.3.2 gmp; cd -;
        wget -P $(PKG_BUILD_DIR) http://url/Files/OpenWrt/mpfr-2.4.2.tar.bz2
        cd $(PKG_BUILD_DIR); tar -xvf mpfr-2.4.2.tar.bz2; mv mpfr-2.4.2 mpfr; cd -;
        wget -P $(PKG_BUILD_DIR) http://url/Files/OpenWrt/mpc-0.8.1.tar.gz
        cd $(PKG_BUILD_DIR); tar -xvf mpc-0.8.1.tar.gz; mv mpc-0.8.1 mpc; cd -;
endef

comment:10 Changed 7 years ago by nbd

ok, now this report is starting to make a little bit of sense. nothing in your previous comments or description indicated that you were talking about building the gcc package and not the cross-toolchain.
instead of using this workaround, a better way to deal with this issue would be to create packages for mpc, gmp and mpfr.

comment:11 Changed 7 years ago by anonymous

gcc prerequisites (link above) clearly states these packages are REQUIRED for building gcc. Doubt that creating separate packages will solve the problem...

May be able to install them on host system, but sought a way to make gcc self-contained and host agnostic

comment:12 Changed 7 years ago by nbd

If you're cross-compiling gcc, then of course you need to cross-compile those libraries too. The host variant of those libraries are already built as part of tools/

comment:13 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.