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

fix warnings related to libraries pulled through dependent package

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Qserv
    • Labels:
      None
    • Story Points:
      0.5
    • Epic Link:
    • Sprint:
      DB_S14_08
    • Team:
      Data Access and Database

      Description

      This came up during migrating qserv to the new logging system, and it can be reproduced by taking log4cxx, see DM-983, essentially:

      eups distrib install -c log4cxx 0.10.0.lsst1 -r http://lsst-web.ncsa.illinois.edu/~becla/distrib -r http://sw.lsstcorp.org/eupspkg

      cloning log package (contrib/log.git), building it and installing in your stack, and finally taking the branch u/jbecla/DM-207 of qserv and building it.

      The warnings looks like:

      /usr/bin/ld: warning: libutils.so, needed by /usr/local/home/becla/qservDev/Linux64/log/1.0.0/lib/liblog.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: libpex_exceptions.so, needed by /usr/local/home/becla/qservDev/Linux64/log/1.0.0/lib/liblog.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: libbase.so, needed by /usr/local/home/becla/qservDev/Linux64/log/1.0.0/lib/liblog.so, not found (try using -rpath or -rpath-link)

      and they show up when I build qserv package, and are triggered by the liblog. I suspect sconsUtils deal with that sort of issues, but since we have our own scons system for qserv it is not handled. Fabrice, can you try to find a reasonable solution for that? Thanks!

        Attachments

          Issue Links

            Activity

            Hide
            ktl Kian-Tat Lim added a comment -

            Yes, -rpath-link is OK; -rpath is not (as it can prevent EUPS mix-and-match).

            Show
            ktl Kian-Tat Lim added a comment - Yes, -rpath-link is OK; -rpath is not (as it can prevent EUPS mix-and-match).
            Hide
            salnikov Andy Salnikov added a comment -

            OK, Fabrice, I think we need to fix your fix I had a quick look on what sconsUtils does, there are basically two thngs as K-T says:

            1. copy LD_LIBRARY_PATH into the environment (basically what my original proposal does). sconsUtils actually copies few more envvars, you can check state.py for the full list.

            2. explicitly sets -rpath-link for the linker (again in state.py):

                #
                # If we're linking to libraries that themselves linked to
                # shareable libraries we need to do something special.
                #
                if (re.search(r"^(Linux|Linux64)$", env["eupsFlavor"]) and os.environ.has_key("LD_LIBRARY_PATH")):
                    env.Append(LINKFLAGS = ["-Wl,-rpath-link"])
                    env.Append(LINKFLAGS = ["-Wl,%s" % os.environ["LD_LIBRARY_PATH"]])

            I'm not sure if this is actually required, it should work without that if you pass LD_LIBRARY_PATH envvar.

            I think we can use one of these two things, but using them both should not do any harm.

            Show
            salnikov Andy Salnikov added a comment - OK, Fabrice, I think we need to fix your fix I had a quick look on what sconsUtils does, there are basically two thngs as K-T says: 1. copy LD_LIBRARY_PATH into the environment (basically what my original proposal does). sconsUtils actually copies few more envvars, you can check state.py for the full list. 2. explicitly sets -rpath-link for the linker (again in state.py): # # If we're linking to libraries that themselves linked to # shareable libraries we need to do something special. # if (re.search(r"^(Linux|Linux64)$", env["eupsFlavor"]) and os.environ.has_key("LD_LIBRARY_PATH")): env.Append(LINKFLAGS = ["-Wl,-rpath-link"]) env.Append(LINKFLAGS = ["-Wl,%s" % os.environ["LD_LIBRARY_PATH"]]) I'm not sure if this is actually required, it should work without that if you pass LD_LIBRARY_PATH envvar. I think we can use one of these two things, but using them both should not do any harm.
            Hide
            salnikov Andy Salnikov added a comment -

            Hi Fabrice,

            the patch that you made to DM-207 branch will be removed (I hope) before merge with master. Could you please make new branch for a fix that does not use "RPATH"? Or feel free to reassign this to me if you are busy with anything else.

            I'm also going to switch this issue back to In Progress.

            Cheers,
            Andy

            Show
            salnikov Andy Salnikov added a comment - Hi Fabrice, the patch that you made to DM-207 branch will be removed (I hope) before merge with master. Could you please make new branch for a fix that does not use "RPATH"? Or feel free to reassign this to me if you are busy with anything else. I'm also going to switch this issue back to In Progress. Cheers, Andy
            Hide
            salnikov Andy Salnikov added a comment -

            I have updated site_scons/state.py with code based on the idea from sconsUtils. Please review.

            Show
            salnikov Andy Salnikov added a comment - I have updated site_scons/state.py with code based on the idea from sconsUtils. Please review.
            Hide
            jbecla Jacek Becla added a comment -

            looks fine, and it works, thanks!

            Show
            jbecla Jacek Becla added a comment - looks fine, and it works, thanks!

              People

              • Assignee:
                salnikov Andy Salnikov
                Reporter:
                fritzm Fritz Mueller
                Reviewers:
                Jacek Becla
                Watchers:
                Andy Salnikov, Fabrice Jammes, Jacek Becla, Kian-Tat Lim
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel