Skip to content

/etc/ld.so.cache regeneration #5217

Closed
Closed

Description

@Cynede

With source based package manager I do run regenerating /etc/ld.so.cache everytime I compile new package to system.

After make & make install rust I'm getting below messages there:

/sbin/ldconfig: File /usr/local/lib/librusti.so is empty, not checked.

same about librustc.so , librust.so and other

To be honest I don't like it but what does it mean? How can I resolve this?

by the way I'm not sure if local is correct place for installed by package manager package so maybe I need to move package manually after make install?

Activity

  1. brson commented on Mar 5, 2013

    @brson
    Contributor

    The problem is that librusti.so is just a 0-byte placeholder file used by the build system to manage dependencies. Rust libraries have names like librusti-[hex]-[vers].so, and the hex string in the middle is not a stable identifier, so we use the names without all the gunk just so make can identify the dependencies.

    We should not be installing these files. One thing we could do to solve this easily might be to name these something like librusti.so.dummy (this is what servo does).

    These files have caused confusion before.

  2. Cynede commented on Mar 5, 2013

    @Cynede
    ContributorAuthor

    User confusion is better then my build system confusion though. Maybe it's really better to not install those files?

    And what about installing to local ?

  3. brson commented on Mar 6, 2013

    @brson
    Contributor

    Yes, I agree they should not be installed (see #4486 for a little more on this subject).

    Your package probably shouldn't install to /usr/local and instead install to /usr (I imagine, depends on your package manager). To do this you'll want to use the --prefix=/usr flag to configure, and not just copy the files. There are some behaviors related to library loading that base their paths on the configured prefix, so things could break in subtle ways if you simply copy the installed files to a different location.

  4. Cynede commented on Mar 6, 2013

    @Cynede
    ContributorAuthor

    Thank you. May I rename them myself to *.dummy ?

  5. brson commented on Mar 6, 2013

    @brson
    Contributor

    Yes, absolutely you may, though I'm not sure exactly what you intend. I think the proper way to do this is to modify this bit of the makefiles that controls library naming. That CFG_LIB_NAME macro produces the name of a library as appropriate for the target architecture, e.g. librust.so. Adding .dummy to those definitions (except for CFG_RUNTIME and CFG_RUSTLLVM, which are native libraries, not Rust crates) will probably do what we want. Additionally the rules for make clean in mk/clean.mk will need to be changed to account for the new extension.

  6. Cynede commented on Mar 11, 2013

    @Cynede
    ContributorAuthor

    rename is wrong solution...

    >>> Regenerating /etc/ld.so.cache...
    /sbin/ldconfig: File /usr/lib/librustdoc.so.dummy is empty, not checked.
    /sbin/ldconfig: File /usr/lib/librusti.so.dummy is empty, not checked.
    /sbin/ldconfig: File /usr/lib/librust.so.dummy is empty, not checked.
    /sbin/ldconfig: File /usr/lib/librustc.so.dummy is empty, not checked.
    /sbin/ldconfig: File /usr/lib/librustpkg.so.dummy is empty, not checked.
  7. Cynede commented on Mar 11, 2013

    @Cynede
    ContributorAuthor

    What about removing them after installation?

  8. brson commented on Mar 11, 2013

    @brson
    Contributor

    The intent of renaming them during the build is that the install script will then not install them (since it doesn't, or shouldn't, install *.dummy files). If you want to avoid hacking the makefiles then yes, deleting them should be fine.

  9. Cynede commented on Mar 12, 2013

    @Cynede
    ContributorAuthor

    Fine. Here is the ebuild (gentoo build script) then https://github.com/Cynede/gentoo-rust/blob/master/dev-lang/rust/rust-9999.ebuild

    So I close this question because it's solved for myself even in hacky way.
    Reopen if you prefer to keep it open to solve it in makefile.

  10. added a commit that references this issue on Jul 26, 2026
  11. added a commit that references this issue on Aug 21, 2026
    9995e79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions