Bugzilla – Bug 1175
the shared libraries is not versioned (With patch)
Last modified: 2011-06-27 09:55:58 UTC
Created attachment 1152 [details] make shared libraries be versioned The shared libraries in Linux system or some else are typical with a shared tail, just like: liba.so.1.2.3 liba.so.1 liba.so The liba.so.1 and liba.so are symbol links to liba.so.1.2.3. ns-3 didn't work like this. The attachment is my patch.
+1 on the idea in general, though there's probably a more efficient way (than reading a file) to retrieve VERSION. We should store it in conf.env and retrieve it later in bld.env.
changeset: 7319:175c382cfab0 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Sun Jun 26 13:40:27 2011 +0100 summary: Bug 1175 - the shared libraries is not versioned, based on patch by YunQiang Su
This works now, but the other way round, i.e. $ ls -l build/debug/ total 130112 drwxrwxr-x. 3 vedranm vedranm 4096 Jun 21 14:31 bindings -rw-rw-r--. 1 vedranm vedranm 408 Jun 26 21:14 build-status.py -rwxrwxr-x. 1 vedranm vedranm 2739180 Jun 26 21:13 libns3-aodv.so lrwxrwxrwx. 1 vedranm vedranm 14 Jun 26 21:14 libns3-aodv.so.3-dev -> libns3-aodv.so libns3-aodv.so should be a symlink to libns3-aodv.so.3-dev.
Yes, the waf do it like this, but when install, it will change it, ie when after build libsss.so.1.1.1 -> libsss.so but after install libsss.so -> libsss.so.1.1.1 So, it is not a problem.
Wow, interesting. Thanks for pointing it out.
Actually, I didn't test this very well, there is a problem: gjc@gjc-laptop:ns-3-dev$ ls /tmp/ns3/lib/ -l total 57864 [...] lrwxrwxrwx 1 gjc gjc 20 2011-06-27 14:26 libns3-aodv.so -> libns3-aodv.so.3-dev lrwxrwxrwx 1 gjc gjc 20 2011-06-27 14:26 libns3-aodv.so.3-dev -> libns3-aodv.so.3-dev Either WAF is just plain buggy or it doesn't like the '3-dev' version "number" which is not a usual version number... OK, after testing it is the latter problem. I changed vnum to 1.2.3 and: lrwxrwxrwx 1 gjc gjc 20 2011-06-27 14:44 libns3-aodv.so -> libns3-aodv.so.1.2.3 lrwxrwxrwx 1 gjc gjc 20 2011-06-27 14:44 libns3-aodv.so.1 -> libns3-aodv.so.1.2.3 -rw-r--r-- 1 gjc gjc 3107878 2011-06-27 14:43 libns3-aodv.so.1.2.3 I fixed it by only enabling vnum if VERSION is normal X.Y.Z or X.Y number: changeset: 7320:7334aa839e46 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Mon Jun 27 14:55:11 2011 +0100 summary: Bug 1175 postfix: only enable vnum if the VERSION matches x.y(.z) dotted number format