[nas] NAS 1.8 (stable) is available
Jon Trulson
jon at radscan.com
Sun Jun 4 15:38:29 MDT 2006
On Sun, 4 Jun 2006, James Lee wrote:
> On 04/06/06, 19:48:01, Jon Trulson <jon at radscan.com> wrote regarding Re:
> [nas] NAS 1.8 (stable) is available:
>
>>> I notice the SONAME has changed to libaudio.so.2.4. The version has
>>> gone from 2.3 to 2.4, I don't mean the file name but the SONAME in
>>> the elf headers. There are no changes to the header files, has the
>>> API changed? Why the change the SONAME? Why add the version to the
>>> SONAME? What should the SONAME be?
>>>
>
>> I've always updated the SONAME whenever the library is changed
[...]
>
> You can still change the library number, just as you have to 2.4 but
> leave the the minor rev increment off the SONAME in the elf headers.
>
Well, SONAME is used to contruct the library name as well -
only the major number is made a part of the ELF soname.
> The problem with an SONAME with the minor version in the elf headers
> is that programs linked to libaudio.so will look for a file with that
> specific version. When -laudio is used it finds the real file by
> link to libaudio.so.2.4 but your SONAME means it always gets linked to
> the versioned file. On update that file changes so we have to provide
> a .2.3 so as not to break linkage with existing programs and further
> those program won't use the new NAS until they are relinked.
>
> Example.
>
> The old libaudio.so.2.3:
> $ dump -Lv libaudio.so | grep SONAME
> [1] SONAME libaudio.so.2.3
>
>
> The new one:
> $ dump -Lv libaudio.so | grep SONAME
> [1] SONAME libaudio.so.2.4
>
Hmm. I don't have dump, but:
$ readelf -a /usr/X11R6/lib/libaudio.so.2.4 |grep SONAME
0x0000000e (SONAME) Library soname: [libaudio.so.2]
... yields the correct elf soname. What OS are you using?
Solaris? Maybe the lib build needs to be fixed for solaris
to only use the major number...
>
> Now inspect a client:
> $ dump -Lv libvclplug_gen680si.so | grep libaudio
> [24] NEEDED libaudio.so.2.3
>
From my xmms plugin (built long ago)
$ ldd /usr/lib/xmms/Output/libnas.so
...
libaudio.so.2 => /usr/X11R6/lib/libaudio.so.2 (0xb7f57000)
...
Note, libaudio.so.2, the proper soname. It sounds more like
what we need to do is omit the minor number when building
under Solaris...
> Note it looks for libaudio.so.2.3 and not libaudio.so, hence the new
> NAS breaks the linkage.
>
>
> I suggest that as the major version is 2 there could be a libaudio.so.2
> symbolic link and that could be the SONAME. The file can retain the
> minor version as it does now.
>
>
Well, this is essentially what happens on Linux (and the
BSD's) now - at least I have not had a complaint about this in
the past. The SONAME in Imake is setting up the lib name, but
the elf soname is only using the major number when the library
is built...
>
>
>
> How to do with imake.... oooerrr.... This is doing it, the definition of
> SharedLibraryTarget:
>
> Concat(lib,libname.so.rev): solist $(MAPFILE)
> @@\
> $(RM) $@~
> @@\
> $(CCENVSETUP) $(LD) -o $@~ $(SHLIBLDFLAGS) -h $@ solist
> $(REQUIREDLIBS)
> @@\
>
I do not think we would want to mess with a system's Concat
definition :)
NetAudio.tmpl could be modified to adjust the SONAME on
solaris.
>
> The "-h $@" sets the soname to that of the target, ie, the file with
> full rev. There doesn't seem to be a major/minor split option.
>
So we'd do it ourselves in the NetAudio.tmpl. Not a problem that
I can see. We would only need to do this on Solaris systems I
believe.
>
> I'd let imake run then [s]edit the Makefiles before build!
>
Ow... we want it all to 'just work' :)
I have attached a patch for config/NetAudio.tmpl that will do
this... Older solaris apps still linked with libs that have
the 2.3 soname will still need relinking I guess, but it
should avoid this problem on solaris going forward.
Let me know...
--
Jon Trulson mailto:jon at radscan.com
ID: 1A9A2B09, FP: C23F328A721264E7 B6188192EC733962
PGP keys at http://radscan.com/~jon/PGPKeys.txt
#include <std/disclaimer.h>
"No Kill I" -Horta
-------------- next part --------------
Index: config/NetAudio.tmpl
===================================================================
RCS file: /home/jon/src/repository/nas/config/NetAudio.tmpl,v
retrieving revision 1.14
diff -u -r1.14 NetAudio.tmpl
--- config/NetAudio.tmpl 3 Jun 2006 20:24:03 -0000 1.14
+++ config/NetAudio.tmpl 4 Jun 2006 21:25:08 -0000
@@ -114,7 +114,19 @@
#endif
#ifndef SharedAudioRev
-#define SharedAudioRev 2.4
+
+#undef SharedAudioRevMajor
+#undef SharedAudioRevMinor
+
+#define SharedAudioRevMajor 2
+#define SharedAudioRevMinor 4
+
+#if defined(SunArchitecture)
+#define SharedAudioRev SharedAudioRevMajor
+#else
+#define SharedAudioRev SharedAudioRevMajor.SharedAudioRevMinor
+#endif
+
#endif
AUSRC = $(TOP)/lib/audio
More information about the Nas
mailing list