/proc and build environments - Debian

This is a discussion on /proc and build environments - Debian ; This is probably a FAQ, and I guess I knew the answer at one point. What are the requirements for /proc and buildds? Can packages assume that /proc/self/stat exist in a buildd environment? The following is from mundy.debian.org, from a ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: /proc and build environments

  1. /proc and build environments

    This is probably a FAQ, and I guess I knew the answer at one point.
    What are the requirements for /proc and buildds? Can packages assume
    that /proc/self/stat exist in a buildd environment?

    The following is from mundy.debian.org, from a testing-security build:

    | Setting up gij-4.3 (4.3.1-9) ...
    | GC Warning: Couldn't read /proc/stat
    | Couldn't read /proc/self/stat
    | /var/lib/dpkg/info/gij-4.3.postinst: line 29: 10104 Aborted gcj-dbtool-4.3 -n /var/lib/gcj-4.3/classmap.db
    | dpkg: error processing gij-4.3 (--configure):
    | subprocess post-installation script returned error exit status 2

    I don't know yet if the crash is related to the lack of /proc. (The
    package builds fine on caballero.debian.org, the sid buildd.)


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Re: /proc and build environments

    On Sat, Sep 13, 2008 at 10:43:40AM +0200, Florian Weimer wrote:
    > This is probably a FAQ, and I guess I knew the answer at one point.
    > What are the requirements for /proc and buildds? Can packages assume
    > that /proc/self/stat exist in a buildd environment?
    >
    > The following is from mundy.debian.org, from a testing-security build:
    >
    > | Setting up gij-4.3 (4.3.1-9) ...
    > | GC Warning: Couldn't read /proc/stat
    > | Couldn't read /proc/self/stat
    > | /var/lib/dpkg/info/gij-4.3.postinst: line 29: 10104 Aborted gcj-dbtool-4.3 -n /var/lib/gcj-4.3/classmap.db
    > | dpkg: error processing gij-4.3 (--configure):
    > | subprocess post-installation script returned error exit status 2
    >
    > I don't know yet if the crash is related to the lack of /proc. (The
    > package builds fine on caballero.debian.org, the sid buildd.)


    Can't do much about it when this is during Build-Depends installation I
    guess, except keeping the Build-Depends sane. In this case, maybe the
    gij packages could fail more graciously if /proc is not available.

    Are you sure gij-4.3 is not just dragged in via Recommends, i.e. the
    buildd chroot is properly setup? AFAICT, you did not mention which
    package failed above (if you can disclose it), so it's hard to
    investigate further I guess.


    Michael


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Re: /proc and build environments

    Florian Weimer, le Sat 13 Sep 2008 10:43:40 +0200, a écrit :
    > This is probably a FAQ, and I guess I knew the answer at one point.
    > What are the requirements for /proc and buildds?


    >From a Debian GNU/Hurd point of view, it is well known that /proc is

    needed for quite a few packages (and that used to pose FTBFS for
    hurd-i386).

    Samuel


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  4. Re: /proc and build environments

    * Michael Banck:

    > Are you sure gij-4.3 is not just dragged in via Recommends, i.e. the
    > buildd chroot is properly setup? AFAICT, you did not mention which
    > package failed above (if you can disclose it), so it's hard to
    > investigate further I guess.


    It's cacao-oj6 and openjdk-6, part of test builds to assess build time.
    So the dependency is real. gij-4.3 just happens to run a GCJ-compiled
    binary during its postinst. I suspect due to the lack of /proc, no such
    binaries run inside the chroot (but this is mostly speculation on my
    part).


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  5. Re: /proc and build environments

    On Sat, Sep 13, 2008 at 10:43:40AM +0200, Florian Weimer wrote:
    > This is probably a FAQ, and I guess I knew the answer at one point.
    > What are the requirements for /proc and buildds? Can packages assume
    > that /proc/self/stat exist in a buildd environment?


    There are packages that require it. I would be suprised if there are
    many buildds that doesn't have it for unstable. But it's easy to also
    add it to the other chroots when they get set up.

    In any case, I suggest you contact the buildd maintainers.


    Kurt


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  6. Re: /proc and build environments

    On Sat, 2008-09-13 at 12:54 +0200, Michael Banck wrote:
    > On Sat, Sep 13, 2008 at 10:43:40AM +0200, Florian Weimer wrote:
    > > This is probably a FAQ, and I guess I knew the answer at one point.
    > > What are the requirements for /proc and buildds? Can packages assume
    > > that /proc/self/stat exist in a buildd environment?
    > >
    > > The following is from mundy.debian.org, from a testing-security build:
    > >
    > > | Setting up gij-4.3 (4.3.1-9) ...
    > > | GC Warning: Couldn't read /proc/stat
    > > | Couldn't read /proc/self/stat
    > > | /var/lib/dpkg/info/gij-4.3.postinst: line 29: 10104 Aborted gcj-dbtool-4.3 -n /var/lib/gcj-4.3/classmap.db
    > > | dpkg: error processing gij-4.3 (--configure):
    > > | subprocess post-installation script returned error exit status 2
    > >
    > > I don't know yet if the crash is related to the lack of /proc. (The
    > > package builds fine on caballero.debian.org, the sid buildd.)

    >
    > Can't do much about it when this is during Build-Depends installation I
    > guess, except keeping the Build-Depends sane. In this case, maybe the
    > gij packages could fail more graciously if /proc is not available.


    Depending on the architecture, this and several other files in /proc may
    be required by the Boehm garbage collector which is part of gcj's
    implementation of the Java virtual machine. The quoted message comes
    from this:

    ptr_t GC_linux_stack_base(void)
    {
    /* We read the stack base value from /proc/self/stat. We do this */
    /* using direct I/O system calls in order to avoid calling malloc */
    /* in case REDIRECT_MALLOC is defined. */
    ...
    f = open("/proc/self/stat", O_RDONLY);
    if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
    ABORT("Couldn't read /proc/self/stat");
    }

    Ben.


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iD8DBQBIzYa379ZNCRIGYgcRAkcLAJ4iMyl6xUQ1qABLiyDO+A r8ItG/ZQCeNg4P
    wQIZLWMmALT37j/x18wYX7A=
    =0xH2
    -----END PGP SIGNATURE-----


  7. Re: /proc and build environments

    * Ben Hutchings:

    > Depending on the architecture, this and several other files in /proc may
    > be required by the Boehm garbage collector which is part of gcj's
    > implementation of the Java virtual machine. The quoted message comes
    > from this:
    >
    > ptr_t GC_linux_stack_base(void)
    > {
    > /* We read the stack base value from /proc/self/stat. We do this */
    > /* using direct I/O system calls in order to avoid calling malloc */
    > /* in case REDIRECT_MALLOC is defined. */
    > ...
    > f = open("/proc/self/stat", O_RDONLY);
    > if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
    > ABORT("Couldn't read /proc/self/stat");
    > }


    Aha, thanks. I somehow missed that the second message was fatal. So it
    is definitely the lack of /proc which causes the installation failure.


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread