OpenSUSE 12.1 TumbleWeed Fail to buildroot

Hi, I am using OpenSUSE 12.1 and since installing it clean if fails to buildroot OpenWRT (mips cross compile).
It was working fine on 11.4 and all the dependencies were properly installed.

make[5]: Leaving directory `/home/alphasparc/openwrt/backfire/build_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/gcc-4.3.3-initial/mips-openwrt-linux-uclibc/libgcc'
make[4]: Leaving directory `/home/alphasparc/openwrt/backfire/build_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/gcc-4.3.3-initial'
# XXX: glibc insists on linking against libgcc_eh
( cd /home/alphasparc/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.3.3 ;  -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; cp libgcc.a libgcc_initial.a; )
cp: cannot stat `libgcc.a': No such file or directory
make[3]: *** [/home/alphasparc/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/stamp/.gcc-initial_installed] Error 1
make[3]: Leaving directory `/home/alphasparc/openwrt/backfire/toolchain/gcc'
make[2]: *** [toolchain/gcc/compile] Error 2
make[2]: Leaving directory `/home/alphasparc/openwrt/backfire'
make[1]: *** [/home/alphasparc/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/home/alphasparc/openwrt/backfire'
make: *** [world] Error 2

On Sat, 19 Nov 2011 21:16:03 +0000, alphasparc wrote:

> Hi, I am using OpenSUSE 12.1 and since installing it clean if fails to
> buildroot OpenWRT (mips cross compile).
> It was working fine on 11.4 and all the dependencies were properly
> installed.

How are you building OpenWRT?

What version have you checked out, and are you updating regularly, or just
starting from a fresh build?

How far into the build do you get this error?

The reason I ask is that I regularly update my OpenWRT install myself,
building on x86_64 on 11.4, and I ran into a somewhat similar issue with
uClibc myself about 6-8 months ago. The issue turned out to be that the
OpenWRT devs had updated uClibCc and my build method wasn’t cleaning
things up well enough to deal with the change.

My build process now involves doing a make distclean before any build,
so the entire toolchain is rebuilt each time I build.

Takes a little longer, but it’s worth it in terms of not having build
headaches.

I think the issue you’re having isn’t with tools you’ve installed for
openSUSE, but with the cross-compiler toolchain that OpenWRT builds as
part of its build.

Here’s how I build:

— snip —

#!/bin/bash
pushd .
cd /home/jhenderson/Downloads/openwrt
make distclean
cp config.txt .config
svn update
scripts/feeds update
cat installed-packages.txt | awk ‘{print "scripts/feeds install " $1}’ | sh
cp config.txt .config
make menuconfig
make
popd

— snip —

The file “installed-packages.txt” comes from:

ssh router opkg list-installed >> installed-packages.txt

That way if I use opkg to install a new package on my router (or to remove
an existing one), that change gets incorporated into my new build.

I’m running a build right now on my 12.1 system, but it usually takes a little
bit to finish. I’ll report back when it’s done.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

I always take the Stable Backfire branch.
Well, it always worked on 11.4 but it failed during the toolchain compilation stage on 12.1.
Btw I learn something new ;), incorporate new package automatically.

On Sun, 20 Nov 2011 03:16:03 +0000, alphasparc wrote:

> I always take the Stable Backfire branch.
> Well, it always worked on 11.4 but it failed during the toolchain
> compilation stage on 12.1.

I wonder if doing a make distclean would help with this for you. My
build is still running (had an unrelated issue lock the system up during
the build on 12.1, and had to restart it - didn’t realize that it wasn’t
going when I left for dinner and just got back).

> Btw I learn something new ;), incorporate new package automatically.

It’s a pretty handy thing.

I’ve run into a handful of issues over the last year or so of building
openWRT, and the team that makes the software has agreed that some things
during the build can get confusing. One of them suggested the ‘make
distclean’ route between builds, but that wipes the config out, too
(hence why I back it up to config.txt).

What kind of router are you building for? Mine’s a DIR-825 (D-link).
Always good to talk with others using the same router stuff. :slight_smile:

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Building it for TP-Link WR1043ND.
I delete the buildroot again and rebuilt it but got the same error.
There is no error indicating the package error/download fail/dependency not installed but instead when I googled the error the Project Maintainers said that it was something wrong with the compiler/libraries.

On Sun, 20 Nov 2011 09:26:02 +0000, alphasparc wrote:

> Building it for TP-Link WR1043ND.

OK, I can try flipping my configuration over to that once it’s done
building just to see if that is working with my D-Link’s firmware (I need
to know that builds).

> I delete the buildroot again and rebuilt it but got the same error.

How are you doing the deletion? From my experience, the only reliable
way to do that is ‘make distclean’ and re-select the packages.

> There is no error indicating the package error/download fail/dependency
> not installed but instead when I googled the error the Project
> Maintainers said that it was something wrong with the
> compiler/libraries.

Thing is, the cross-compiler/libraries are built during the build process

  • and aren’t the ones you installed to build the system. (I may be
    explaining something you already know; if I am, I apologise.) That’s why
    doing a ‘make distclean’ is recommended - the toolchain is completely
    rebuilt that way, so the missing library will be rebuilt. Deleting the
    build directory isn’t sufficient because not everything that’s compiled
    ends up in that directory (most especially the compiler and tools IIRC).

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun, 20 Nov 2011 09:26:02 +0000, alphasparc wrote:

> Building it for TP-Link WR1043ND.
> I delete the buildroot again and rebuilt it but got the same error.
> There is no error indicating the package error/download fail/dependency
> not installed but instead when I googled the error the Project
> Maintainers said that it was something wrong with the
> compiler/libraries.

Also, if you do a make with out v=99, how far does the build go? Just
trying to see if I’m getting past the point you are.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2011-11-19 22:16, alphasparc wrote:
> Hi, I am using OpenSUSE 12.1 and since installing it clean if fails to
> buildroot OpenWRT (mips cross compile).

Your subject says that you are using tumbleweed. Please move the question
to the tumbleweed forum.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On Sun, 20 Nov 2011 09:26:02 +0000, alphasparc wrote:

> Building it for TP-Link WR1043ND.
> I delete the buildroot again and rebuilt it but got the same error.
> There is no error indicating the package error/download fail/dependency
> not installed but instead when I googled the error the Project
> Maintainers said that it was something wrong with the
> compiler/libraries.

I’ve just completed my build and it ran fine. Looks like the target for
your router and mine is the same - the AR71xx target, so it should build
OK for you if you save your .config, do a ‘make distclean’, and then copy
your .config back.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun, 20 Nov 2011 03:16:03 +0000, alphasparc wrote:

> I always take the Stable Backfire branch.

Can you let me know where you’re grabbing the source or how you’re
grabbing it?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

I am using OpenSUSE x86_64 and I did a clean install from the KDE CD Image not the DVD or an upgrade.

svn checkout svn://svn.openwrt.org/openwrt/branches/backfire

I follow the instructions here

On Mon, 21 Nov 2011 13:56:02 +0000, alphasparc wrote:

> I am using OpenSUSE x86_64 and I did a clean install from the KDE CD
> Image not the DVD or an upgrade.

OK, but I still need to know where you’re pulling the Backfire sources
from and how you’re doing the build - and if you’re doing a ‘make
distclean’ before starting a new build.

The issue seems to not be with the openSUSE compiler components, but
rather with the components that are built for doing cross-compiling.

I can try to duplicate the issue, but I need to know the answers to these
questions so I can.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

From the stable backfire branch

svn checkout svn://svn.openwrt.org/openwrt/branches/backfire

AFAIK make distclean is done if you want to get back the original pristine source after builds.
For me I have tried both distclean and even nuke the folder and checkout the code repeatedly from backfire branch.

On Mon, 21 Nov 2011 23:16:03 +0000, alphasparc wrote:

> From the stable backfire branch
>
> Code:
> --------------------
> svn checkout svn://svn.openwrt.org/openwrt/branches/backfire
> --------------------
>
> AFAIK make distclean is done if you want to get back the original
> pristine source after builds.

That’s true, however I’ve found (and the maintainers confirmed to me
several months ago) that when upgrades take place to things like uclibc,
a ‘make clean’ isn’t sufficient. Additionally, a ‘make menuconfig’ with
an immediate save will update things in the .config file if a version
changes (such as uclibc’s version being updated).

> For me I have tried both distclean and even nuke the folder and checkout
> the code repeatedly from backfire branch.

Now the latter of those should definitely resolve it - unless it’s
something in your .config that’s tripping it up. ‘make menuconfig’ and
saving it (without making any changes) might get around it.

At what point in the process do you get the error? I’m building now from
a pristine checkout of the branch you’re using on 12.1, and it’s as far
as “tools/cmake compile”. I just selected the ar71xx generic target and
no other build options when I did a make menuconfig.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Mon, 21 Nov 2011 23:16:03 +0000, alphasparc wrote:

> From the stable backfire branch
>
> Code:
> --------------------
> svn checkout svn://svn.openwrt.org/openwrt/branches/backfire
> --------------------
>
> AFAIK make distclean is done if you want to get back the original
> pristine source after builds.
> For me I have tried both distclean and even nuke the folder and checkout
> the code repeatedly from backfire branch.

It looks like (going back to your initial message) the build is bombing
for you in the toolchain - I’m getting past that point with a basic
setup, but I bomb out when trying to build the image itself.

I’m thinking I might need your .config file to try to dupe the issue
you’re having - my failure happens with mkfs.jffs2. That doesn’t happen
with the bleeding-edge release I use on my own router, though.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

I tried to reproduce the problem by doing an upgrade install on my previous cloned OpenSUSE 11.4 to 12.1.
This is the problem


checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code 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 and/or MPFR 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.

This message did not appear while I was building on 11.4 so somehow someone bonk the mpfr.h header on 12.1
I did also have this message while building on 12.1 but I thought it was because I didn’t satisfy the dependencies so I zypper mpfr in.
Zyppering mpfr in will result in the problem described in the first post.

On Wed, 23 Nov 2011 16:06:03 +0000, alphasparc wrote:

> This message did not appear while I was building on 11.4 so somehow
> someone bonk the mpfr.h header on 12.1 I did also have this message
> while building on 12.1 but I thought it was because I didn’t satisfy the
> dependencies so I zypper mpfr in. Zyppering mpfr in will result in the
> problem described in the first post.

Hmmmm…

What version of libmpfr4 is installed when you pull it in with zypper?

I’m not seeing that particular set of messages when I try to build on
either platform - but I show version 3.0.0-2.1 on my 11.4 system and
3.0.1-3.1.5 on my 12.1 system.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C


Repository: openSUSE Current OSS
Name: libmpfr4
Version: 3.0.1-3.1.5
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date

Are you building trunk or backfire stable?

On Thu, 24 Nov 2011 01:26:03 +0000, alphasparc wrote:

> Code:
> --------------------
>
> Repository: openSUSE Current OSS Name: libmpfr4 Version: 3.0.1-3.1.5
> Arch: x86_64 Vendor: openSUSE Installed: Yes Status: up-to-date
>
> --------------------
>
> Are you building trunk or backfire stable?

I build both.

Looks like you’re running the same version I am. Looks also like I need
to build an x64 VM in case it is a platform-specific issue. (My laptop’s
only 32-bit)

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C



checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.



sudo zypper info libmpfr4
Loading repository data...
Reading installed packages...
Information for package libmpfr4:
Repository: openSUSE Current OSS
Name: libmpfr4
Version: 3.0.1-3.1.5
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 349.0 KiB
Summary: MPFR multiple-precision floating-point computation shared library
Description: 
The MPFR library is a C library for multiple-precision floating-point
computations with exact rounding (also called correct rounding). It is
based on the GMP multiple-precision library.
Authors:
--------
    Guillaume Hanrot
    Paul Zimmermann
    Vincent Lefèvre
    Patrick Pélissier



sudo zypper info gmp-devel
Loading repository data...
Reading installed packages...
Information for package gmp-devel:
Repository: openSUSE Current OSS
Name: gmp-devel
Version: 5.0.2-8.1.5
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 6.0 MiB
Summary: Include Files and Libraries for Development with the GNU MP Library
Description: 
These libraries are needed to develop programs which calculate with
huge numbers (integer and floating point).
Authors:
--------
    Torbjorn Granlund <tege@zevs.sics.se>


if I


sudo zypper in mpfr-devel

Then this error occurs



make[5]: Leaving directory `/home/alphasparc/openwrt/backfire/build_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/gcc-4.3.3-initial/mips-openwrt-linux-uclibc/libgcc'
make[4]: Leaving directory `/home/alphasparc/openwrt/backfire/build_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/gcc-4.3.3-initial'
# XXX: glibc insists on linking against libgcc_eh
( cd /home/alphasparc/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.3.3 ;  -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; cp libgcc.a libgcc_initial.a; )
cp: cannot stat `libgcc.a': No such file or directory
make[3]: *** [/home/alphasparc/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/stamp/.gcc-initial_installed] Error 1
make[3]: Leaving directory `/home/alphasparc/openwrt/backfire/toolchain/gcc'
make[2]: *** [toolchain/gcc/compile] Error 2
make[2]: Leaving directory `/home/alphasparc/openwrt/backfire'
make[1]: *** [/home/alphasparc/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/home/alphasparc/openwrt/backfire'
make: *** [world] Error 2