string substitution removes part of path when linking versioned shared libraries

Bug #950555 reported by Jason Abernathy on 2012-03-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Janet B. Anderson

Bug Description


I am building an EPICS extension which has the shared library version inside of it's directory name.

The full path is:


and the shared library version is 2:


Once the versioned library was built the build system tried to create a symbolic link:

ln -s /home/jabrnthy/E-Linac/Packages/advsplugins-20120308/debian/tmp/usr/lib/linux-x86/
ln: creating symbolic link `/home/jabrnthy/E-Linac/Packages/advsplugins-20120308/debian/tmp/usr/lib/linux-x86/': No such file or directory

The error occurred because the linking command in RULES_BUILD removes all substrings of the form ".$(SHRLIB_VERSION)" which, in this case, also removes the ".2" from the directory name.

To fix this problem I changed the two linking commands in RULES_BUILD from

line 389: ln -s $< $(subst .$(SHRLIB_VERSION),,$@)
line 412: ln -s $< $(subst .$(LOADABLE_SHRLIB_VERSION),,$@)


line 389: ln -s $< $(@:.$(SHRLIB_VERSION)=)
line 412: ln -s $< $(@:.$(LOADABLE_SHRLIB_VERSION)=)

This is a greedier substitution which will only remove the last occurrence of the substring.

Andrew Johnson (anj) wrote :

Janet committed the fix, thanks Jason!

Changed in epics-base:
assignee: nobody → Janet B. Anderson (jba-aps)
status: New → Fix Committed
Andrew Johnson (anj) wrote :

Fix committed in release.

Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers