Without more information, I can only guess that the warning message is produced because your ports tree is ahead of your -current snapshot.

If you are building ports, then you should understand the meaning of the warning message. There is a significant differences between major and minor library revisions, and there is a reason why the lower minor number is acceptable for that particular port.

It is not clear from discussion thus far that the ports tree used matches the version of the operating system installed. daemonfowl, you need to state precisely how the ports tree was obtained. If OpenBSD 5.1-stable is installed/built as the operating system, you will have had to synchronize source code to the OPENBSD_5_1 CVS tag name for the src, xenocara, andports branches. Any other action taken will have resulted in a version mismatch.

Last edited by ocicat; 12th July 2012 at 06:32 PM.
Reason: Add clarity. Is the question on -stable or -current?

Sometimes while building ports , I get mismatch errors like this one :

Code:

warning: libfreetype.so.18.1: minor version >= 3 expected, using it anyway

How could I possibly sync versions here ?

You could get a newer snapshot, if available, or build current from source. Then of course you could potentially be ahead of your ports tree if you didn't sync that at the same time -- perhaps that's not as serious a problem since the dependencies go inward to base.

But maybe you just didn't manage to get the xenocara part of this snapshot installed when you upgrade the rest of base. If you look at http://www.openbsd.org/cgi-bin/cvswe.../shlib_version they bumped up to 18.3 only in the past few days. 18.1 was what is in 5.1 by the looks of it. So I guess you pulled a recent snapshot but somehow didn't drag in the xenocara files along with the rest. Hmmm, maybe you didn't install all the sets when you did your upgrade? I don't play around much with current. Not sure what to do in this instance. Maybe repeat the upgrade and make sure you pick all the sets this time. Or I guess you could manually untar the sets. Try first manually looking at the xenocara sets to see if it has the 18.3 free type library in there, at least.

Btw, that message comes out of ld.so (see _dl_find_loaded_shlib in http://www.openbsd.org/cgi-bin/cvswe...ubr.c?rev=1.36). It tries to find an exact match first, then looks up ignoring the minor number. This confused me at first too. It's not an error you're seeing while building a port, i.e. something from ld (or gcc -o?, libtool, whatever), but an error coming from a program on your system that's running as you build a port as ld.so tries to load libfreetype.18.3 (which is in base, part of xenocara). Do you not also see this warning running programs in general, not just when building ports?

This kind of mismatch can be harmless, just don't go running to report a bug if you do see something weird. I've been using some snapshot of 5.1 along with a somewhat out of sync ports tree (or binary packages or a mix, I forget) since I moved and lost the ability to connect to the internet with OpenBSD machine and seeing warnings like this all the time for all kinds of programs I run. If you read the link that was posted from the ports guide, you see minor version number bumps happen as new functions (and public globals, weak symbols, other things?) are added to a library. It makes it sound like a port should only demand a higher minor if it actually requires one of these additions, but I'm thinking that practice isn't strictly followed and porters just blindly bump to whatever the latest version is when they're working on it. Otherwise, how am I seeing these warnings for the past year without experiencing any real problems? Well, I guess I could just not be executing an offending code path and getting lucky -- I dunno I'm really fuzzy on linking.

Thank you so much jgimmi , ocicat . third !! I really benefit from your valuable posts.
The box was 5.1 stable which I upgraded to -current and ... trying to figure out what foolishness I might have done again .. :-)

" A BSD fool upgraded 5.1 stable to -current .. then rm -R /usr/ports .. then pkg_delete /var/db/pkg/* .. fetched the newest snapshots ports tree .. started building a few ports when he got errors .. he hasn't touched any old libs."

Quote:

Do you not also see this warning running programs in general, not just when building ports?

Thanks thirdm !!
So far :
- the Abort trap message (3 lines) when I run Opera ..... which occured on 5.1 stable but not on 5.1 current (other box) .. so I have to pkg_delete it then go rebuild it (to-do after each reboot!) ..
- mutella :