• What is the directory /usr/lib/.build-id?

    From William Unruh@2:250/1 to All on Thu Aug 29 06:24:07 2019
    Mga7.1, recently installed.
    There is a directory
    /usr/lib/.build-id, which has 256 subdirecties (all of the hex numbers
    from 00 to ff) and each of which has on average 40 links. The links are
    36 hex numbers long and point to a whole variety of files in the
    filesystem.
    eg
    lrwxrwxrwx 1 root root 54 Apr 16 14:29 d84926052d4256c3fffe1d75b31e5b8bd73051 -> ../../../../usr/lib64/libakregatorinterfaces.so.5.11.0

    just to pick a random one.
    This takes up 9MB of space which means about 1K for each link.

    Installed from the Mageia 7.1 installation DVD

    Can I erase them? And why are they there?


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Aug 29 06:36:09 2019
    On Thu, 29 Aug 2019 05:24:07 -0000 (UTC), William Unruh wrote:
    Mga7.1, recently installed.
    There is a directory
    /usr/lib/.build-id, which has 256 subdirecties (all of the hex numbers
    from 00 to ff) and each of which has on average 40 links. The links are
    36 hex numbers long and point to a whole variety of files in the
    filesystem.
    eg
    lrwxrwxrwx 1 root root 54 Apr 16 14:29
    d84926052d4256c3fffe1d75b31e5b8bd73051 -> ../../../../usr/lib64/libakregatorinterfaces.so.5.11.0

    just to pick a random one.
    This takes up 9MB of space which means about 1K for each link.

    Installed from the Mageia 7.1 installation DVD

    Can I erase them? And why are they there?

    For help in debugging a problem. Take a look at https://bugs.mageia.org/show_bug.cgi?id=24654

    I have opened several bug reports about missing build-id files. Response
    on mageia dev discussion list suggested not a real problem so I modified
    my install scripts to ignore any problems with them.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Aug 29 06:49:39 2019
    On 2019-08-29, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 29 Aug 2019 05:24:07 -0000 (UTC), William Unruh wrote:
    Mga7.1, recently installed.
    There is a directory
    /usr/lib/.build-id, which has 256 subdirecties (all of the hex numbers
    from 00 to ff) and each of which has on average 40 links. The links are
    36 hex numbers long and point to a whole variety of files in the
    filesystem.
    eg
    lrwxrwxrwx 1 root root 54 Apr 16 14:29 d84926052d4256c3fffe1d75b31e5b8bd73051 -> ../../../../usr/lib64/libakregatorinterfaces.so.5.11.0

    just to pick a random one.
    This takes up 9MB of space which means about 1K for each link.

    Installed from the Mageia 7.1 installation DVD

    Can I erase them? And why are they there?

    For help in debugging a problem. Take a look at https://bugs.mageia.org/show_bug.cgi?id=24654

    Why? This problem is not a bug, or is it?
    Do you have 10000 links in /usr/lib/.build-id in your mageia 7 install?





    I have opened several bug reports about missing build-id files. Response
    on mageia dev discussion list suggested not a real problem so I modified
    my install scripts to ignore any problems with them.

    What are the build-id files, And why is the installation putting in
    10000 of them. Do they serve any purpose?



    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thu Aug 29 07:38:57 2019
    On Thu, 29 Aug 2019 01:24:07 -0400, William Unruh <unruh@invalid.ca> wrote:

    Mga7.1, recently installed.
    There is a directory
    /usr/lib/.build-id, which has 256 subdirecties (all of the hex numbers
    from 00 to ff) and each of which has on average 40 links. The links are
    36 hex numbers long and point to a whole variety of files in the
    filesystem.
    eg
    lrwxrwxrwx 1 root root 54 Apr 16 14:29
    d84926052d4256c3fffe1d75b31e5b8bd73051 -> ../../../../usr/lib64/libakregatorinterfaces.so.5.11.0
    just to pick a random one.
    This takes up 9MB of space which means about 1K for each link.
    Installed from the Mageia 7.1 installation DVD
    Can I erase them? And why are they there?

    It doesn't take that much space. It's just a symlink. The 9MB of space
    is the space used by the library module it links to.

    As to what it's for, from https://pagure.io/jss/issue/8 ...
    "These come about as a result of the compiled library, libjss4.so, and allow us to link the debuginfo package to the library, and make magic happen with gdb if we ever need to step through the program with gdb."

    On my m7 x86_64 install, with all of the desktop environments installed,
    that directory tree has 11933 symlinks. "du -s" shows that is taking
    a total of 11M of space.

    It's safe to remove them, but if you do you will not be able to run gdb,
    if asked to by a packager trying to figure out why some package segfaults
    on your system, but not on theirs.

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Aug 29 15:05:13 2019
    On 2019-08-29, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Thu, 29 Aug 2019 01:24:07 -0400, William Unruh <unruh@invalid.ca> wrote:

    Mga7.1, recently installed.
    There is a directory
    /usr/lib/.build-id, which has 256 subdirecties (all of the hex numbers
    from 00 to ff) and each of which has on average 40 links. The links are
    36 hex numbers long and point to a whole variety of files in the
    filesystem.
    eg
    lrwxrwxrwx 1 root root 54 Apr 16 14:29 d84926052d4256c3fffe1d75b31e5b8bd73051 -> ../../../../usr/lib64/libakregatorinterfaces.so.5.11.0
    just to pick a random one.
    This takes up 9MB of space which means about 1K for each link.
    Installed from the Mageia 7.1 installation DVD
    Can I erase them? And why are they there?

    It doesn't take that much space. It's just a symlink. The 9MB of space
    is the space used by the library module it links to.

    No. The directory (du -s /usr/lib/.build-id) is 9MB. Each link takes up
    1KB.


    As to what it's for, from https://pagure.io/jss/issue/8 ...
    "These come about as a result of the compiled library, libjss4.so, and allow
    us to link the debuginfo package to the library, and make magic happen with gdb if we ever need to step through the program with gdb."

    On my m7 x86_64 install, with all of the desktop environments installed,
    that directory tree has 11933 symlinks. "du -s" shows that is taking
    a total of 11M of space.

    As on yours 1KB/link.
    I suppose that is the size of a segment on the disk.


    It's safe to remove them, but if you do you will not be able to run gdb,
    if asked to by a packager trying to figure out why some package segfaults
    on your system, but not on theirs.

    Regards, Dave Hodgins


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Aug 29 15:14:41 2019

    Also, on my Mga6 and Mga5 machines, the directory does not exist or in one case
    has 3 links in it. This is something new that has been introduced into
    Mga7. From your descirption it seems that in compiling Mga7 some
    debugging flag was switched on for all programs. Why?
    While this might have been useful for cauldron, it seems pretty useless
    for the distro, and takes up 9MB of space (and I do not know how much
    extra space that debugging flag causes each program to occupy. Yes, I
    know disk space is "cheap" but that does not seem a good reason to waste
    it for no purpose.



    On 2019-08-29, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Thu, 29 Aug 2019 01:24:07 -0400, William Unruh <unruh@invalid.ca> wrote:

    Mga7.1, recently installed.
    There is a directory
    /usr/lib/.build-id, which has 256 subdirecties (all of the hex numbers
    from 00 to ff) and each of which has on average 40 links. The links are
    36 hex numbers long and point to a whole variety of files in the
    filesystem.
    eg
    lrwxrwxrwx 1 root root 54 Apr 16 14:29 d84926052d4256c3fffe1d75b31e5b8bd73051 -> ../../../../usr/lib64/libakregatorinterfaces.so.5.11.0
    just to pick a random one.
    This takes up 9MB of space which means about 1K for each link.
    Installed from the Mageia 7.1 installation DVD
    Can I erase them? And why are they there?

    It doesn't take that much space. It's just a symlink. The 9MB of space
    is the space used by the library module it links to.

    As to what it's for, from https://pagure.io/jss/issue/8 ...
    "These come about as a result of the compiled library, libjss4.so, and allow
    us to link the debuginfo package to the library, and make magic happen with gdb if we ever need to step through the program with gdb."

    On my m7 x86_64 install, with all of the desktop environments installed,
    that directory tree has 11933 symlinks. "du -s" shows that is taking
    a total of 11M of space.

    It's safe to remove them, but if you do you will not be able to run gdb,
    if asked to by a packager trying to figure out why some package segfaults
    on your system, but not on theirs.

    Regards, Dave Hodgins


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Aug 29 15:38:33 2019

    I have just been thinking about this a bit more, and am even more
    confused. This build-id is a constant for any distro release. Ie, "Mageia" (or the builder)
    has this information. It is not something that is actually useful to the
    user. It is a way to identify which program a given gdb dump comes from.
    A) almost no users every use gdb on their installed systems.
    B) It is completely redundant, since every users build-id links are the
    same from a given installation. So that is 9MB of completely wasted disk
    space.
    Now, if that table of association of build-id to program were in a file, that file
    would take up less than 1MB.

    https://fedoraproject.org/wiki/Releases/FeatureBuildId
    makes a valiant effort to justify this feature, with absolutely no
    discussion about the user.

    I always distrust people who justify something with "magic happens". It inevitably leads me to the conclusion that they have absolutely no idea
    what they are talking about.


    On 2019-08-29, William Unruh <unruh@invalid.ca> wrote:

    Also, on my Mga6 and Mga5 machines, the directory does not exist or in one
    case
    has 3 links in it. This is something new that has been introduced into
    Mga7. From your descirption it seems that in compiling Mga7 some
    debugging flag was switched on for all programs. Why?
    While this might have been useful for cauldron, it seems pretty useless
    for the distro, and takes up 9MB of space (and I do not know how much
    extra space that debugging flag causes each program to occupy. Yes, I
    know disk space is "cheap" but that does not seem a good reason to waste
    it for no purpose.



    On 2019-08-29, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Thu, 29 Aug 2019 01:24:07 -0400, William Unruh <unruh@invalid.ca> wrote: >>
    Mga7.1, recently installed.
    There is a directory
    /usr/lib/.build-id, which has 256 subdirecties (all of the hex numbers
    from 00 to ff) and each of which has on average 40 links. The links are
    36 hex numbers long and point to a whole variety of files in the
    filesystem.
    eg
    lrwxrwxrwx 1 root root 54 Apr 16 14:29 d84926052d4256c3fffe1d75b31e5b8bd73051 -> ../../../../usr/lib64/libakregatorinterfaces.so.5.11.0
    just to pick a random one.
    This takes up 9MB of space which means about 1K for each link.
    Installed from the Mageia 7.1 installation DVD
    Can I erase them? And why are they there?

    It doesn't take that much space. It's just a symlink. The 9MB of space
    is the space used by the library module it links to.

    As to what it's for, from https://pagure.io/jss/issue/8 ...
    "These come about as a result of the compiled library, libjss4.so, and allow us to link the debuginfo package to the library, and make magic happen with gdb if we ever need to step through the program with gdb."

    On my m7 x86_64 install, with all of the desktop environments installed,
    that directory tree has 11933 symlinks. "du -s" shows that is taking
    a total of 11M of space.

    It's safe to remove them, but if you do you will not be able to run gdb,
    if asked to by a packager trying to figure out why some package segfaults
    on your system, but not on theirs.

    Regards, Dave Hodgins


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Aug 29 16:21:55 2019
    On Thu, 29 Aug 2019 14:38:33 -0000 (UTC), William Unruh wrote:

    I have just been thinking about this a bit more, and am even more
    confused. This build-id is a constant for any distro release. Ie, "Mageia"
    (or the builder)
    has this information. It is not something that is actually useful to the user. It is a way to identify which program a given gdb dump comes from.
    A) almost no users every use gdb on their installed systems.
    B) It is completely redundant, since every users build-id links are the
    same from a given installation. So that is 9MB of completely wasted disk space.
    Now, if that table of association of build-id to program were in a file,
    that file
    would take up less than 1MB.

    Your "supposed" solution is unsupportable as stated.

    Build ids are not the same for a distro release.

    Fact, build id is unique to the file on the system. I would assume all
    packages would require modification to support your proposal, and gdb
    would require modification to use the build id file.

    Any further discussion of the topic is a waste of time because the
    Mageia support group does not have the resource/people power to make those changes.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Aug 29 21:15:08 2019
    On 2019-08-29, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 29 Aug 2019 14:38:33 -0000 (UTC), William Unruh wrote:

    I have just been thinking about this a bit more, and am even more
    confused. This build-id is a constant for any distro release. Ie, "Mageia" (or the builder)
    has this information. It is not something that is actually useful to the
    user. It is a way to identify which program a given gdb dump comes from.
    A) almost no users every use gdb on their installed systems.
    B) It is completely redundant, since every users build-id links are the
    same from a given installation. So that is 9MB of completely wasted disk
    space.
    Now, if that table of association of build-id to program were in a file, that file
    would take up less than 1MB.

    Your "supposed" solution is unsupportable as stated.

    Build ids are not the same for a distro release.

    Fact, build id is unique to the file on the system. I would assume all packages would require modification to support your proposal, and gdb
    would require modification to use the build id file.

    Any further discussion of the topic is a waste of time because the
    Mageia support group does not have the resource/people power to make those
    changes.

    Lets take an example

    ls -l /usr/lib/.build-id//00/dd4e0d2b494f317b3af80a773ffb1a8acff330 lrwxrwxrwx 1 root root 44 Apr 15 21:52 /usr/lib/.build-id//00/dd4e0d2b494f317b3af80a773ffb1a8acff330 -> ../../../../usr/lib64/libkerfuffle.so.19.4.0

    rpm -qilf /usr/lib64/libkerfuffle.so.19.4.0

    .....
    /usr/lib/.build-id
    /usr/lib/.build-id/00 /usr/lib/.build-id/00/dd4e0d2b494f317b3af80a773ffb1a8acff330
    ....

    Ie, the build-id is in the package . It is not something that is
    calculated on my machine. It is calculated by the packager. Thus, anyone
    who uses the same distro set that I use has the same build-id.

    The changes were "foisted" on us by the Redhat team in 2008. Mageia did
    not have the /usr/lib/.build-id directory until Mageia 7 (2019)
    Ie, in the past Mageia did not use the .build-id package, suddenly now
    they do. This was a Mageia decision it seems.





    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thu Aug 29 23:01:06 2019
    On Thu, 29 Aug 2019 16:15:08 -0400, William Unruh <unruh@invalid.ca> wrote:

    Ie, the build-id is in the package . It is not something that is
    calculated on my machine. It is calculated by the packager. Thus, anyone
    who uses the same distro set that I use has the same build-id.

    The build id is used to identify the debuginfo package that needs to
    be installed if gdb is being used to debug the specific library.

    It's generated by the build system when the library is compiled. It used
    to be that debug packages had to be manually selected, and if more than
    one version of a library is available, it was up to the gdb user to get
    the right debug packages installed.

    The gdb system has been modified, as have the compilers. Instead of
    generating debug packages, the debuginfo packages are generated, identified
    by the build id. It allows the gdb program to identify the needed debuginfo packages without the person running gdb having to figure out which packages
    are needed.

    The changes were "foisted" on us by the Redhat team in 2008. Mageia did
    not have the /usr/lib/.build-id directory until Mageia 7 (2019)
    Ie, in the past Mageia did not use the .build-id package, suddenly now
    they do. This was a Mageia decision it seems.

    The changes did not originate at Redhat or at Mageia. They are from
    gnu.org, the developers of the gdb debugging package and the developers
    of the compilers such as gcc. That's where Mageia gets those packages,
    not from Redhat or any other distribution.

    Staying up-to-date is required for security. It also means other changes
    are included, based on the decisions of the developers of the software.

    Feel free to join gnu.org and get them to change the compilers and gdb
    systems according to what you think is appropriate.

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)