#2529 SFCB should link against sfcCommon in alternate location

sfcb (1090)
Dave Heller

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.


  • Dave Heller

    Dave Heller - 2012-09-05
    • summary: SFCB should link against sfcCommon in alternate locatio --> SFCB should link against sfcCommon in alternate location
  • Klaus Kämpf

    Klaus Kämpf - 2012-09-07

    With the existence of /lib64 (and /usr/lib64, /usr/local/lib64) in 64bit Linux distributions, this patch will get overly complex.

    If sfcCommon is common to multiple binaries, install it in $libdir. Using $libdir/sfcCommon just creates additional work and little added value.

  • Dave Heller

    Dave Heller - 2012-09-12

    Based on community feedback we have decided not to make the proposed changes in 3565035 and 3565036 at this time. Please see 3565035 for more details.

  • Dave Heller

    Dave Heller - 2012-09-12
    • status: open --> closed-rejected

Log in to post a comment.