Bug #342

SCons does not update shared library links when switching versions

Added by Ole Hansen over 2 years ago. Updated about 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-Estimated time:2.00 hours
Target version:1.7Spent time:0.25 hour
Responsible:

Description

The version number shown in the startup banner and with the "-v" command line switch does not update when we switch between different release branches and rebuild with SCons. (It works fine with make.) Oddly, src/ha_compiledata.h does define the correct version.

It turns out that the symbolic links to the versioned shared libraries aren't properly updated by SCons. Here's how it looks after switching from Release-160_patches (at version 1.6.2) to master (at version 1.7.0):

-rwxr-xr-x  1 ole  staff  1070252 Apr 13 19:37 libdc.dylib.1.7.0
lrwxr-xr-x  1 ole  staff       17 Apr 13 19:39 libdc.dylib.1.7 -> libdc.dylib.1.7.0
lrwxr-xr-x  1 ole  staff       20 Apr 13 21:12 libHallA.dylib.1.7 -> libHallA.dylib.1.7.0
lrwxr-xr-x  1 ole  staff       17 Apr 17 00:18 libdc.dylib.1.6 -> libdc.dylib.1.6.2
lrwxr-xr-x  1 ole  staff       15 Apr 17 00:18 libdc.dylib -> libdc.dylib.1.6
lrwxr-xr-x  1 ole  staff       20 Apr 17 00:18 libHallA.dylib.1.6 -> libHallA.dylib.1.6.2
lrwxr-xr-x  1 ole  staff       18 Apr 17 00:18 libHallA.dylib -> libHallA.dylib.1.6
-rwxr-xr-x  1 ole  staff  1045860 Apr 17 00:20 libdc.dylib.1.6.2
-rwxr-xr-x  1 ole  staff  4097276 Apr 17 00:27 libHallA.dylib.1.6.2
-rwxr-xr-x  1 ole  staff  4097276 Apr 17 00:30 libHallA.dylib.1.7.0

The top-level library links, e.g. libHallA.dylib, still point to the old version, libHallA.dylib.1.6 in this case.

History

#1 Updated by Ole Hansen about 2 years ago

  • Description updated (diff)
  • Target version set to 1.7

SCons also does not relink the analyzer executable, which on macOS causes the old library soversion to be loaded:

mackenzie:analyzer ole$ otool -L ./analyzer 
./analyzer:
    libHallA.dylib.1.6.2 (compatibility version 0.0.0, current version 0.0.0)
    libdc.dylib.1.6.2 (compatibility version 0.0.0, current version 0.0.0)

Either we get the macOS linker to record *.dylib.1.6 instead of *.dylib.1.6.2 or we need to tell SCons to relink the analyzer whenever the version changes.

Also available in: Atom PDF