[Nix-dev] broken pipe with bison and recursive make

Lluís Batlle viriketo at gmail.com
Wed Jan 13 06:42:46 CET 2010


Hello Rohan,

what platform are you using? linux?

I remember building gold without problems, some time ago, with a
simple "--enable-gold".
I was trying that with the binutils 2.20, of the stdenv-updates
branch, on linux.

Regards,
Lluís.

2010/1/13 Rohan Hart <rohan.hart17 at gmail.com>:
> Hi
>
> I'm trying to build binutils with gold but bison is giving a "broken
> pipe" error.  I thought this might be related to the bug which was
> fixed some time ago in nix-env but it turns out that the recursive
> make itself has this problem and simply cd'ing to the correct
> directory and make'ing allowed bison to build.
>
> I've hacked around this issue with the following preBuild script (in a
> copied version of binutils so that I don't rebuild all of Nix) but
> would be interested if there's a better way.
>
> thanks
> Rohan
>
> ------------------------------------------------------------------------
>
> {stdenv, fetchurl, noSysDirs, bison}:
>
> stdenv.mkDerivation rec {
>  name = "binutils-gold-2.19.1";
>
>  src = fetchurl {
>    url = "mirror://gnu/binutils/binutils-2.19.1.tar.bz2";
>    sha256 = "1xirhxwc94bk6hn2k6i5ly4knbcjsqgy2lp7kl1s5q5csys2b0iy";
>  };
>
>  patches = [
>    # Turn on --enable-new-dtags by default to make the linker set
>    # RUNPATH instead of RPATH on binaries.  This is important because
>    # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
>    ./new-dtags.patch
>  ];
>
>  inherit noSysDirs;
>
>  buildInputs = [ bison ];
>
>  preConfigure = ''
>    # Clear the default library search path.
>    if test "$noSysDirs" = "1"; then
>        echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
>    fi
>  '';
>
>  configureFlags = "--disable-werror --enable-gold"; # needed for dietlibc build
>
>  preBuild = ''
>    # make gold non-recursively to avoid broken pipe
>
>    # first some dependancies
>    make all-bfd
>    make all-libiberty
>
>    # now gold
>    make configure-gold
>    cd gold
>    make
>  '';
>
>  meta = {
>    description = "GNU Binutils, tools for manipulating binaries
> (linker, assembler, etc.)";
>
>    longDescription = ''
>      The GNU Binutils are a collection of binary tools.  The main
>      ones are `ld' (the GNU linker) and `as' (the GNU assembler).
>      They also include the BFD (Binary File Descriptor) library,
>      `gprof', `nm', `strip', etc.
>    '';
>
>    homepage = http://www.gnu.org/software/binutils/;
>
>    license = "GPLv3+";
>
>    /* Give binutils a lower priority than gcc-wrapper to prevent a
>       collision due to the ld/as wrappers/symlinks in the latter. */
>    priority = "10";
>  };
> }
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>



More information about the nix-dev mailing list