:: MArX'' Frustrated communist, card-carrying geek.

21Jun/100

The ldconfig trap

It happened to me, and googling around I discovered that I was not the first and probably not the last person in throuble with ldconfig on OpenBSD. If you found this post searching for "openbsd ldconfig" at Google, you are probably a victim too. Linux users compiling new software on OpenBSD invariably fall into this trap: ldconfig without arguments.

In linux the directories that should be included by ldconfig to create the links/cache dynamic libraries are listed in /etc/ld.so.conf. Build a new library and install it into a directory already listed in this file is part of cotidian, and a simple "ldconfig" it's enough to rebuild the links/cache. But on OpenBSD the path to be searched is the ldconfig's argument, and if you don't inform this path... well, you probably already got it.

Don't panic!

/usr/lib will remain linked so everything you really need, still working, which doesn't include X, bash, among other things.

Moreover ldconfig is properly ran when the O.S. boots, so a simple reboot would solve the problem. But if you think, (like me) this isn't the wise way to solve the problem you can do it by yourself:

# . /etc/rc.conf
# ldconfig /usr/local/lib /usr/X11R6/lib $shlib_dirs
# exit

and be happy !

Filed under: BSD No Comments