Bug Report: "make install" on Ubuntu should run "ldconfig" as final step
This build problem first occurred a couple years ago for me, and I just noticed the latest code I pulled from github still has the same issue.
Steps to reproduce the problem:
- git-clone latest Io code from github
- make all
- sudo make install
- Try to execute "io" (either the newly installed version or the one from _build/binaries, doesn't matter)
- Gives error saying it can't load the IoVM library.
- Try running "io_static" instead (io_static works)
Temporary workaround:
- after installing, run "sudo ldconfig"
- Now run "io", and see that it now works
I spent considerable time tracking this problem down last year. I'm still not 100% clear what ldconfig actually *does* but it has something to do with linking version-dependent installed library file names with version-independent symbolic aliases for the libraries. My clue was that when you install a normal .deb package, at the end the package says "ldconfig deferred processing now taking place". It turns out you can just run ldconfig yourself at any time (you have to be root (sudo)). AFAIK it's fairly innocuous and running when it isn't needed doesn't cause problems; it just doesn't do anything if it isn't needed. Since you have to sudo to make install anyway, I would assume just adding "ldconfig" in the end of the makefile for make install will work perfectly.
Note that after the first time you run ldconfig after building Io from source, you can no longer reproduce the bug because the Linux system is already properly set up when you build from source a 2nd time.