Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed! #73

Closed
albertz opened this issue Jul 4, 2016 · 5 comments

Comments

@albertz
Copy link

albertz commented Jul 4, 2016

This was earlier reported here.

After I installed Glibc, I get all the time this error/warning whenever I start any command which was installed by Linuxbrew:

Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!

There really should be done some fixing regarding this. Nothing after that worked anymore because e.g. Ruby stopped working, so I couldn't even do brew unlink glibc anymore. So I checked ldd linuxbrew/bin/ruby and manually removed all linked files there, and I also removed linuxbrew/Cellar/glibc, many broken links in linuxbrew/lib, linuxbrew/Cellar/gcc, and some more. While doing that, I tried to automatically delete all broken symlinks in linuxbrew/lib and I messed up and deleted way too much. Now I'm bringing Linuxbrew back to life step by step.

All of that caused by this problem - so much wasted time. At the very least, there should be some check if there could be any problem and if so, it should prevent me from installing glibc.

@sjackman
Copy link
Member

sjackman commented Jul 5, 2016

Please report the output of brew config and brew doctor. I'd recommend getting a list of your install formula with brew list, and creating a new installation of Linuxbrew from scratch, if possible in the directory /home/linuxbrew/.linuxbrew so that you can use precompiled binary bottles. In that new installation, the first you should do is brew install gcc. After that, you can brew install the list of software that you had installed previously. Sorry for the inconvenience. I hope that you get your installation of Linuxbrew up and running again.

@DoomHammer
Copy link
Contributor

@sjackman the problem is that you can brew install glibc safely only when no other formula is installed. Otherwise those already installed will cease to work. It is due to interpreter mismatch as prior to that system interpreter (possibly older) is used and after that glibc interpreter is linked instead which is too recent for everything to work.

@sjackman
Copy link
Member

sjackman commented Jul 5, 2016

My experience is that a newer loader is able to load programs compiled for an older libc. When glibc is installed, it updates the $HOMEBREW_PREFIX/lib/ld.so symlink, so that the newly installed loader is used with all previously installed programs. That being said, I definitely recommend installing glibc and gcc first before anything else. Do you have steps to replicate this issue?

I've just realized that this may not work on systems where the host's glibc is newer than Linuxbrew, which will affect Ubuntu 16 xenial. For now, users' of xenial should not install glibc.

@DoomHammer
Copy link
Contributor

Yes, actually it was the other way round. I had a system with most recent glibc and when I brew installed one it was actually older. Would it work if we updated glibc as soon as new one is released?

@sjackman
Copy link
Member

sjackman commented Jul 6, 2016

New versions of glibc don't support the Linux kernel version that ships with CentOS 5, which I want to support, as it's still pretty common on high-performance computing systems (oddly). So, we'd need a glibc-2.19 formula for older distros and a glibc formula for more recent distros, and install one or the other depending on the kernel version. For now, I'd suggest not installing glibc on systems with a newer glibc. It should probably give a warning if you do. As a workaround for now, after installing glibc, replace Linuxbrew's ld.so symlink with the system's (untested):

ln -sf /lib64/ld-linux-x86-64.so.2 `brew --prefix`/lib/ld.so

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants