Hi Ian, ian kremlin wrote on Thu, Dec 11, 2014 at 10:04:26PM -0500:
> whenever i grab a snapshot and get library version mismatches after a > `pkg_add -u`, i've found the easiest way to get those objects Definitely not the easiest way. Waiting for the next snapshot is definitely much easier and safer for the average user. > is grab a fresh source tree and compile them manually. > for example, libc: There are dragons. Sometimes, you need to do "make includes" in the right directory first. Then again, that tends to reinstall *many* headers, not just those you care about right now, so be sure you don't install some that hurt you. Also, "make depend" can sometimes be necessary, and you certainly should never forget about "make obj". When there is a flag day, very special steps may be required before doing anything else or somewhere in the middle. If you screw up, chances are you can't even do a clean shutdown any longer and are in for fsck(8) and manually reinstalling working libraries in single user mode before you can fully boot again. If this scares anybody, i'm not surprised; updating libraries is not a playground for newbies. > cd /usr/src/lib/libc > > edit 'shlib_version' to have the appropriate major/minor versions > (pkg_add(1) will tell you which ones it wants. That, actually, is *terrible* advice and almost guarantees a fiasco. If you edit shlib_version manually, you build a library containing code *incompatible* with what it's supposed to contain, so the end result will be that programs using that library will, at run time, * crash, * produce obviously wrong results, * and/or silently produce results that are wrong in non-obvious ways. Some programs, by mere luck, may also work, if you are lucky, but it's hard to predict in advance which ones will and which ones wont. To update a library, update all related source code - ideally, the whole source tree unless you know precisely what you are doing - to one consistent state, than compile from that state *without* manually screwing with shlib_version. That's the whole point of library versioning! > make && make install The command "make install" in lib/libc is among the more dangerous commands you might type, and if something is wrong, recovery is often more difficult than recovery from less scary errors. > the bsd.port.mk(5) build system is well thought out No objection here... > and allows for straightforward, helpful maneuvers like this ... but i really wouldn't give it that twist. Nothing about what you said is straightforward or helpful. It sounds more like somewhere between foolhardy and suicidal. > pkg_check(8) is also an invaluable tool in helping deal with package > issues. also, use the right $PKG_PATH! That's good advice again, for sure. Yours, Ingo