Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Inf fix #218

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Inf fix #218

wants to merge 8 commits into from

Conversation

brunobeltran
Copy link
Contributor

Fixes #210, based on branch with changes for separating Matlab from session.

@arokem
Copy link
Owner

arokem commented Sep 18, 2015

Could you please try rebasing this on top of master, to see whether tests work with the addition of #219 ?

@@ -23,7 +23,7 @@
from .compat import text_type


class MatlabInterperterError(RuntimeError):
class MatlabInterpreterError(RuntimeError):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@arokem
Copy link
Owner

arokem commented Sep 21, 2015

Sorry for the delay in looking at all this. It looks generally good to me. A few concerns:

  • First of all - could you please rebase it on master, to see that tests are passing with all these changes?
  • If we want this to properly install on different platforms, we're going to have to rebuild the messenger, huh?
  • Could you please provide a couple of tests for the new functionality?

@arokem arokem mentioned this pull request Sep 21, 2015
@brunobeltran
Copy link
Contributor Author

No worries on the delay.

I'll get to work on writing some tests, but the updates on master seem to have broken my build; I'm getting

 Invalid MEX-file
'/home/bbeltr1/Developer/python-matlab-bridge/venv-pymatbridge/lib/python3.4/site-packages/pymatbridge/matlab/messenger.mexa64':
/opt/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/libzmq.so.3)

I'll have to look into this.

@arokem
Copy link
Owner

arokem commented Sep 21, 2015

Did you rebuild the messenger after updating?

On Mon, Sep 21, 2015 at 2:42 PM, Bruno Beltran [email protected]
wrote:

No worries on the delay.

I'll get to work on writing some tests, but the updates on master seem to
have broken my build; I'm getting

Invalid MEX-file
'/home/bbeltr1/Developer/python-matlab-bridge/venv-pymatbridge/lib/python3.4/site-packages/pymatbridge/matlab/messenger.mexa64':
/opt/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/libzmq.so.3)

I'll have to look into this.


Reply to this email directly or view it on GitHub
#218 (comment)
.

@brunobeltran
Copy link
Contributor Author

oh wait, so I realize what happened. I replaced $matlabpath/sys/os/glnxa64/libstdc++.so that MATLAB ships with with a modern, working version of libc as a workaround for unrelated issues ages ago. So the fact that it is currently failing to build on my computer probably has to do with the fact that I reinstaled matlab, not with me rebasing on master. On the other hand, how did you get this working on Linux previously? In its current state, a new libzmq should always complain when it tries to start in an environment with LD_LIBRARY_PATH set to point to matlab's old, broken glibc++. On the other hand, starting matlab without all the libraries it normally ships with in its modified LD_LIBRARY_PATH breaks matlab on my system for every version from 2013a to 2015b.

Thoughts?

@brunobeltran
Copy link
Contributor Author

should I have rebuilt? I thought the whole point of the update was for the mex file to work on Ubuntu?

@arokem
Copy link
Owner

arokem commented Sep 21, 2015

Not sure. I am still trying to digest your previous message.

On Mon, Sep 21, 2015 at 2:51 PM, Bruno Beltran [email protected]
wrote:

should I have rebuilt? I thought the whole point of the update was for the
mex file to work on Ubuntu?


Reply to this email directly or view it on GitHub
#218 (comment)
.

@brunobeltran
Copy link
Contributor Author

I probably wasn't very clear.

Specifically, the problem I have with the current setup is that, even before any of my changes, if I build the messenger myself and put everything in the "right" place, then I get the following error:

In [1]: from pymatbridge import Matlab
lab = Matlab(executable='/home/bbeltr1/bin/mat')
lab.start()
   ...:
Invalid MEX-file
'/home/bbeltr1/Developer/python-matlab-bridge/venv-pymatbridge/lib/python3.4/site-packages/pymatbridge/matlab/messenger.mexa64':
/opt/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/libzmq.so.3)

Error in matlabserver (line 13)
messenger('init', socket_address);

2015-09-21 15:44:51,624 - python-matlab-bridge - WARNING - MATLAB session timed out after 15 seconds
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-8fe4fca3a574> in <module>()
      1 from pymatbridge import Matlab
      2 lab = Matlab(executable='/home/bbeltr1/bin/mat')
----> 3 lab.start()
      4

/home/bbeltr1/Developer/python-matlab-bridge/venv-pymatbridge/lib/python3.4/site-packages/pymatbridge/pymatbridge.py in start(self)
    226         # Test if connection is established
    227         if not self.is_connected():
--> 228             raise ValueError("%s failed to start" % self._program_name())
    229
    230         self.logger.info("%s started and connected!", self._program_name())

ValueError: MATLAB failed to start

This error is due to MATLAB shipping with an ancient version of libc, and is simply resolved by symlinking the file $matlab_root/sys/os/glnxa64/libstdc++.so to the system's libstdc++.so.6 file.

However, this is strangely not necessary if I use one of your old messenger.mex files.

I am guessing this was worked around before by building the messenger statically?

@brunobeltran
Copy link
Contributor Author

Sorry for the quadruple-comment, been running around a lot today. So I guess after getting back to my laptop it seems like the update works after rebasing, then again, that's mostly because my version of the messenger has overwritten yours after rebasing, so Travis is still failing. Any pointers on how to build the messenger so that Travis doesn't get so upset?

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

Successfully merging this pull request may close these issues.

2 participants