Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-5753

XCode 7.3 can not link indirect dependencies that use @rpath

    Details

    • Templates:
    • Story Points:
      4
    • Team:
      Architecture

      Description

      With XCode 7.3 on OS X we have difficulties resolving indirect dependencies when those dependencies are referenced using @rpath. This can be seen with Qserv:

      Linking shared object build/libqserv_common.dylib
      ld: file not found: @rpath/libboost_system.dylib for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      

      where libboost_system is being loaded via libboost_thread:

      $ otool -L $BOOST_DIR/lib/libboost_thread.dylib
      /Users/timj/work/lsstsw/stack/DarwinX86/boost/1.59.lsst5+fbf04ba888/lib/libboost_thread.dylib:
      	@rpath/libboost_thread.dylib (compatibility version 0.0.0, current version 0.0.0)
      	@rpath/libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
      	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
      	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
      

      This problem is also found when doing a conda build of the stack because in conda all shared libraries are modified on creation to reference other libraries via the @rpath mechanism.

      This bug has been reported to Apple as rdr://25313838 and a Chromium bug report indicates that the fix is to simply ensure that -L directives include a trailing slash.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  tjenness Tim Jenness
                  Reporter:
                  tjenness Tim Jenness
                  Reviewers:
                  John Swinbank
                  Watchers:
                  John Swinbank, Mario Juric, Robert Lupton, Tim Jenness
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel