Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Problem: hax depends on LD_LIBRARY_PATH #111

Closed
2 tasks
typeundefined opened this issue Aug 28, 2019 · 0 comments
Closed
2 tasks

Problem: hax depends on LD_LIBRARY_PATH #111

typeundefined opened this issue Aug 28, 2019 · 0 comments

Comments

@typeundefined
Copy link

Currently our scripts start hax with LD_LIBRARY_PATH environment variable set — we use it to tell the linker where to look for libmero.so. This approach is considered harmful.

Solution:

  • modify Makefile: set -Wl,-rpath=$M0_SRC_DIR/mero/.libs as described in Program Library HOWTO (and here)
  • remove LD_LIBRARY_PATH from the code
@vvv
Copy link
Contributor

vvv commented Aug 28, 2019

changed the description

@vvv
Copy link
Contributor

vvv commented Aug 28, 2019

changed title from {-Makefile issue: hax requires LD_LIBRARY_PATH set to link with libmero-} to {+Problem: hax requires LD_LIBRARY_PATH to be set+}

@vvv
Copy link
Contributor

vvv commented Aug 28, 2019

changed title from Problem: hax {-requires LD_LIBRARY_PATH to be set-} to Problem: hax {+depends on LD_LIBRARY_PATH+}

@vvv
Copy link
Contributor

vvv commented Aug 28, 2019

assigned to @konstantin.nekrasov

@vvv
Copy link
Contributor

vvv commented Aug 28, 2019

I'd suggest that we merge #112 before making any other changes to the Makefile.

@vvv
Copy link
Contributor

vvv commented Aug 28, 2019

changed the description

@typeundefined
Copy link
Author

The is issue is already resolved by the latest setup.py. Hax doesn't depend on LD_LIBRARY_PATH anymore.
@vvv is there anything else I can do to resolve this ticket? Maybe you'd also like have Makefile removed?

@chumakd
Copy link
Contributor

chumakd commented Sep 11, 2019

Example of Python's setuptools usage for packaging and running commands from source tree: https://github.com/seagate-ssg/pyghmi

def main():
    # blah-blah-...

if __name__ == '__main__':
    sys.exit(main())

@vvv
Copy link
Contributor

vvv commented Sep 12, 2019

Hax doesn't depend on LD_LIBRARY_PATH anymore. @vvv is there anything else I can do to resolve this ticket?

@konstantin.nekrasov git-grep shows the last hideout of LD_LIBRARY_PATH:

$ git grep -nH -A1 LD_LIBRARY_PATH
start:42:sudo LD_LIBRARY_PATH=$M0_SRC_DIR/mero/.libs/ $SRC_DIR/env/bin/python \
start-43-     $SRC_DIR/hax/hax.py

We can close this issue after cleansing the repo of LD_LIBRARY_PATH. 🚿

@andriy.tkachuk Is start script used at all?

If start script is obsolete, it should removed.

@andriytk
Copy link
Collaborator

No, it's not used. install and bootstrap scripts seem to be enough atm.

@vvv
Copy link
Contributor

vvv commented Sep 12, 2019

mentioned in merge request #186

@vvv
Copy link
Contributor

vvv commented Sep 13, 2019

closed via commit 33e1ffe

@typeundefined
Copy link
Author

closed via merge request #186

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants