[Top][All Lists]

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

Re: GUB and mpfr/mpc

From: David Kastrup
Subject: Re: GUB and mpfr/mpc
Date: Sun, 26 Oct 2014 16:51:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

"Phil Holmes" <address@hidden> writes:

> ----- Original Message ----- 
> From: "Phil Holmes" <address@hidden>
> To: "Federico Bruni" <address@hidden>
> Cc: <address@hidden>
> Sent: Saturday, October 25, 2014 3:39 PM
> Subject: Re: GUB and mpfr/mpc
>> It's my computer (or strictly, a VM on my computer).
>> So it would appear that in order to use a current version of gcc, I
>> need at least 12.04 and I might as well go to 14.04 in order to
>> build GUB?
>> --
>> Phil Holmes
> OK - I've downloaded 14.04, installed it in a VM, updated it,
> installed git, cloned GUB and run make bootstrap.  I get:
> building package: tools::librestrict
> *** Stage: download (librestrict, tools)
> *** Stage: untar (librestrict, tools)
> *** Stage: patch (librestrict, tools)
> *** Stage: shadow (librestrict, tools)
> *** Stage: compile (librestrict, tools)
> Command barfed: cd /home/gub/gub/target/tools/build/librestrict-1.9.a
> && gcc -W -Wall -fno-stack-protector -I. -fPIC -shared -o
> restrict-stat.c || gcc -W -Wall -I. -fPIC -shared
> -o restrict-stat.c
> Tail of target/tools/log/librestrict.log >>>>>>>>
> ./xstatconv.c:269:5: error: 'struct stat' has no member named '__unused5'
> buf->__unused5 = 0;
> ^
> Command barfed: cd /home/gub/gub/target/tools/build/librestrict-1.9.a
> && gcc -W -Wall -fno-stack-protector -I. -fPIC -shared -o
> restrict-stat.c || gcc -W -Wall -I. -fPIC -shared
> -o restrict-stat.c
> <<<<<<<< Tail of target/tools/log/librestrict.log
> *** Failed target: tools::librestrict
> make: *** [bootstrap-git] Error 1
> Anyone know why?

struct stat is defined in <sys/stat.h> (for example).  It does not
contain anything like __unused5 as far as I can see.  My guess would be
that this is defined in an alternative version in some header file of
restrict-stat.c and that this definition and the system definition get
mixed up, possibly by something else including the system definition via
some other means.

But I have, frankly, no idea what librestrict might be and what it is
used for.  So this is totally handwavy.

Actually, I read on <URL:>


    A common problem with [making reproducible cross] builds is using
    files or features that are not controlled by the [GUB] build
    process, but just happen to be on the build host and happen to
    differ between most build hosts.

    GUB uses the LD_PRELOAD feature with the gub/specs/
    package and code from ./librestrict/restrict.c to disallow reading
    from build host files. This makes for much better reprocucibility,
    especially between different build hosts.

    The downside to this LIBRESTRICT feature is that quite a few
    packages are not prepared for cross building. LIBRESTRICT will catch
    these errors and they have to be fixed in the package's spec file.

    This is what such a LIBRESTRICT assertion could like

 tried to open () file /home/janneke/vc/lilypond/lily/
        cc1plus: internal compiler error: Aborted
        Please submit a full bug report,
        with preprocessed source if appropriate.
        See  for instructions.
        [1]10:42:08 address@hidden:~/vc/gub

    you often find these in config.log files when package-dependant code
    blondly looks in /usr/include or /usr/lib.

So it would appear that librestrict has been written by Jan.  The error
you see does not appear like a failure of librestrict (like described)
but rather a failure to build librestrict in the first place.


David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]