Re: [DynInst_API:] Build error dyninst-8.2 -> /usr/bin/ld: cannot find -lLINK_PRIVATE


Date: Wed, 18 Jun 2014 17:18:59 -0700
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: Re: [DynInst_API:] Build error dyninst-8.2 -> /usr/bin/ld: cannot find -lLINK_PRIVATE
On 06/18/2014 01:22 PM, Jim Galarowicz wrote:
> Hi all,
> 
> I'm getting a build error on rzmerl at LLNL when trying to build the 
> release version of 8.2.
> 
> The message I'm getting:
> 
> Linking CXX shared library libcommon.so
> /usr/bin/ld: cannot find -lLINK_PRIVATE
> collect2: ld returned 1 exit status
> make[2]: *** [common/libcommon.so.8.2.0] Error 1
> make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
> 
> What I get when I grep for  LINK_PRIVATE in the build area, which seems 
> to point to libiberty.    Do you see anything obviously wrong?  Seems 
> like it is finding libiberty.a and it exists.

LINK_PRIVATE is in cmake/shared.cmake in target_link_private_libraries,
which I added to tighten up library requirements.  It's just a flag, not
a library itself.  This flag should be supported by CMake 2.8.7 and up,
which the function I wrote tries to account for.  I've successfully
build with RHEL6 (cmake 2.8.4) and RHEL7 (cmake 2.8.11), so I hope that
compatibility logic is ok.

What version of CMake are you using?  I never tried 2.8.7 exactly -- I
just set the version there because that's the first release I found in
which documentation said LINK_PRIVATE should work.

> /usr/global/tools/openspeedshop/oss-dev/OpenSpeedShop_ROOT/SOURCES/dyninst-8.2.patch
> + /usr/bin/patch -p1 --fuzz=0
> (Stripping trailing CRs from patch.)
> patching file CMakeLists.txt

Is there anything significant in this patch?


> -DLIBDWARF_LIBRARIES=/collab/usr/global/tools/openspeedshop/oss-dev/oss_kestral_kroot/lib64 
> -DLIBDWARF_INCLUDE_DIR=/collab/usr/global/tools/openspeedshop/oss-dev/oss_kestral_kroot/include 
> -DLIBELF_LIBRARIES=/usr/lib64 -DLIBELF_INCLUDE_DIR=/usr/include 

The libraries should be paths to libdwarf.so and libelf.so, not just the
directories containing them.  Which probably explains this:

> WARNING: Target "dynElf" requests linking to directory "/usr/lib64".  
> Targets may link only to libraries.  CMake is dropping the item.
> WARNING: Target "dynDwarf" requests linking to directory 
> "/collab/usr/global/tools/openspeedshop/oss-dev/oss_kestral_kroot/lib64". Targets 
> may link only to libraries.  CMake is dropping the item.
etc. etc.

[← Prev in Thread] Current Thread [Next in Thread→]