As explained in 3565035, relocating the sfcCommon libraries into a separate directory causes a build break for SFCB. This is because it is not sufficient to have the libs in the system search path; in addition, the linker must be explicitly be told (i.e. via '-L') where to find the sfcCommon libraries.
The proposed patch allows SFCB configure to find the sfcCommon libraries, by implementing a simple search algorithm and then updating LDFLAGS with the correct '-L' switch, e.g. LDFLAGS="-L/usr/local/lib/sfcCommon". The algorithm attempts to find a dedicated sfcCommon libdir and then falls back to plain $libdir if no such directory exists.
(This makes the patched SFCB backward-compatible with unpatched sfcCommon, which should ease migration to the new strategy. However, a patched sfcCommon will likely cause a build break for unpatched SFCB, so this patch is required for SFCB if sfcCommon is patched with 3565035).
In principle, the proposed patch should allow SFCB to successfully link against sfcCommon libs wherever they are installed. The most common case is where sfcCommon and SFCB are installed to common prefix (e.g. /usr/local). If this is not the case, some other "likely" locations are checked. In the event sfcCommon libs are installed to some unusual location, a simple modification of the CHECK_SFCCOMMON_LIBDIR function in acinclude.m4 should be enough to correct it. The patch also enables the environment variable SFCCOMMON_LIBDIR, so another solution would be to simply set that before building SFCB.
In sum, the proposed patch accomplishes two things:
1. SFCB needs to link against sfcCommon libs wherever they are installed.
2. SFCB 'make uninstall' should clean up $sfcbibdir
Item 2 is not related to the bug but is just a bit of housekeeping.
This patch applies only to the SFCB 1.4 environment; it is not applicable to SFCB 1.3.
This patch has not yet been checked into git as we would like to allow some time for feedback.
Log in to post a comment.