Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening libzmq on mac #58

Open
tombadmanship opened this issue Jan 25, 2018 · 13 comments
Open

Opening libzmq on mac #58

tombadmanship opened this issue Jan 25, 2018 · 13 comments

Comments

@tombadmanship
Copy link

Hello,
I am trying to use transplant to open a python app that uses matlab runtime 2017a. i have editted the search paths for libzmq to include the locations where libzmq is installed on my computer. These are my edits:

575 search_dirs = ((os.getenv('LD_LIBRARY_PATH') or '').split(':') +
576 (os.getenv('DYLD_LIBRARY_PATH') or '').split(':') +
577 (os.getenv('DYLD_FALLBACK_PATH') or '').split(':') +
578 [os.getenv('HOME') + '/lib']+
579 '/usr/local/lib'+
580 '/usr/lib'+
581 '/opt/local/lib'+
582 'anaconda/lib')

I thought to edit the file after reading https://github.com/bastibe/transplant/issues/40 < this post. I do not have access to dlopen. I am also quite new to python.

When running my app, I get the error:

Error loading libzmq: Undefined function or variable 'notfound'.

Thanks for your attention.

@bastibe
Copy link
Owner

bastibe commented Jan 26, 2018

Hi,

Transplant should find your anaconda's libzmq, and adds the conda lib directory in transplant_master.py:591 (sys.prefix + '/' + libzmq).

Did you check in ~/anaconda/lib if it actually contains a libzmq? I have a feeling that you simply have no zmq installed on your computer. Maybe conda install zmq helps.

@tombadmanship
Copy link
Author

I did check ... it is definitely in there. It's confusing to me why transplant could not find it, I didn't see any issues brought up on the app page suggesting transplant, either. This leads me to think its something strange about the way my mac is set up (I also figured out why man dlopen was not working).

I was able to solve the problem last night by inserting the library directly into the folder with the app.

@bastibe
Copy link
Owner

bastibe commented Jan 27, 2018

If you want to debug this further, could you tell me the full path and file name of your libzmq and the value of your sys.prefix? I'd like to prevent problems like these from happening again in the future, if possible.

@tombadmanship
Copy link
Author

tombadmanship commented Jan 29, 2018 via email

@bastibe
Copy link
Owner

bastibe commented Jan 30, 2018

It seems that some recent version of anaconda changed the install location of the libzmq binary. I uploaded a new version of Transplant, which should fix your problem. Can you confirm this?

@tombadmanship
Copy link
Author

tombadmanship commented Jan 30, 2018 via email

@bastibe
Copy link
Owner

bastibe commented Jan 31, 2018

It is committed, and uploaded to PyPi.

@tombadmanship
Copy link
Author

tombadmanship commented Jan 31, 2018 via email

@bastibe
Copy link
Owner

bastibe commented Feb 1, 2018

Ok, I have to ask: when you said your libzmq is in /anaconda/lib, did you really mean that, or did you mean ~/anaconda/lib (aka /Users/new/anaconda/lib)? Because if you really meant that, then your sys.prefix does not point to your anaconda installation, which is probably the cause of your troubles.

@tombadmanship
Copy link
Author

tombadmanship commented Feb 1, 2018 via email

@bastibe
Copy link
Owner

bastibe commented Feb 2, 2018

I don't get it. Line 582 (search_dirs.append(sys.prefix + '/lib')) explicitly includes this directory.

Unless... Can you tell me the exact file name of the libzmq in /Users/new/anaconda/lib, and the output of ctypes.util.find_library('zmq')? Maybe there is a mismatch for some reason?

@tombadmanship
Copy link
Author

tombadmanship commented Feb 5, 2018 via email

@bastibe
Copy link
Owner

bastibe commented Feb 8, 2018

I can't figure this one out from afar. My best guess is that something is wrong with your Python installation, but I honestly don't know.

I'll leave this issue open for the time being, maybe someone else will chime in with the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants