0

I have downloaded an unix executable 'gtselect' used for analysing scientific data. This comes as part of a larger package of tools with installation instructions such that 'gtselect' can be called from the current working directory.

When I just run 'gtselect' everything works as expected.

I then use a python script 'gt_apps.py' which uses GtApp to wrap the tools as python objects

    from GtApp import GtApp
    filter = GtApp('gtselect') 

and then use a different script 'run.py' to call gtselect as a python object and run it:

    import gt_apps
    gt_apps.filter.run()

When I run this, I receive the error

    dyld: Library not loaded: libdataSubselector.dylib
    Referenced from: path/bin/gtselect
    Reason: image not found

Now, the library it is trying to load is instead found at

    path/lib/libdataSubselector.dylib

I have tried setting

    export DYLD_LIBRARY_PATH = path/lib/

but the same error persists.

Any advice? Thanks

Tom
  • 101
  • 1
  • Does the error get resolved if you copy that "library" into the current working directory? – arkascha Oct 25 '15 at 13:10
  • No, thanks but I'm afraid I tried that. Technically I have two copies of the "library", one in the folder "bin", the same location as the gtselect executable and one in the folder "lib", but neither are picked up by the executable which seems insistent on trying to search in itself?! – Tom Oct 25 '15 at 13:41
  • I wrote "the current working directory", not the `/path/bin` folder. – arkascha Oct 25 '15 at 13:43
  • Ah sorry my mistake! Ok this does seems to work now, but a different error appears related to a different library. Is there a way to do this, short of copying every library into my current working directory? Thanks! – Tom Oct 25 '15 at 14:10
  • This was meant just as a test to find out what the issue is. It was not meant to be a permanent solution. Apparently the application does either not consider the environment variable, or, more likely, it is not set for the process. Note, that the environment path should not point to a library file, but one or more folders holding libraries. So have a try with something like that: `export DYLD_LIBRARY_PATH=path/lib/:$DYLD_LIBRARY_PATH; path/bin/gtselect` – arkascha Oct 25 '15 at 14:15
  • Hmmm ok I have set the path as you have advised, but unfortunately to no effect. Maybe I should mention: gtselect is installed and configured so that is can be accessed from any current working directory. I am using a python script that uses GtApp to wrap the gtselect tool as a python object.Let me update the question to clarify – Tom Oct 25 '15 at 14:28
  • Sorry, I cannot say much to this setup, since it is alien to me. However you should consider that `export` is a `bash` command AFAIK. Since you obviously do not work under a Linux environment, but some other unixoid flavor it might well be that you use another type of shell which requires something else to set the environment variable and hand it over to a child process. – arkascha Oct 25 '15 at 15:22

0 Answers0