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

Help #1

Open
MaisyZhang opened this issue Mar 24, 2019 · 2 comments
Open

Help #1

MaisyZhang opened this issue Mar 24, 2019 · 2 comments

Comments

@MaisyZhang
Copy link

My system is MAC or Ubuntu, I want to recompile a mexw64 file, where can I find this cpp file?

@mtmccrea
Copy link

There are various issues with library linking in the .mexmaci64 file, it would be great to have the source available to recompile.

Thanks!

@under-funk
Copy link

Today I discovered that Matlab versions above 2016b have problems resolving @loader_path and requires a slight modification on how to resolve dynamic library paths.

I am on macOS so the commands for linux is different (ldd instad of otool for example) but it seems that if you change the @loader_paths in the following command using the install_name_tool like indicated below (just for @loader_path ones) so that you get the second result with otool it seems to work in newer versions of Matlab.

I am just writing this down so that it might help some others since I was keeping two copies of Matlab until now to keep MCRoomSim running.

In the terminal in MCRoomSim folder:

otool MCRoomSim.mexmaci64 -L

MCRoomSim.mexmaci64:
@loader_path/libut.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/libmx.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/libmex.dylib (compatibility version 0.0.0, current version 0.0.0)
@loader_path/libmat.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 832.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

install_name_tool -change @loader_path/libut.dylib @rpath/libut.dylib MCRoomSim.mexmaci64
install_name_tool -change @loader_path/libmx.dylib @rpath/libmx.dylib MCRoomSim.mexmaci64
install_name_tool -change @loader_path/libmat.dylib @rpath/libmat.dylib MCRoomSim.mexmaci64
install_name_tool -change @loader_path/libmex.dylib @rpath/libmex.dylib MCRoomSim.mexmaci64

otool MCRoomSim.mexmaci64 -L

MCRoomSim.mexmaci64:
@rpath/libut.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libmx.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libmex.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libmat.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 832.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

Hope this helps,

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

3 participants