-
Notifications
You must be signed in to change notification settings - Fork 48
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
Matlab version not found when compiling yarp-matlab-bindings #363
Comments
Hi @EWouters , |
In the meantime, it seems that diegoferigo/dockerfiles#8 mentioned in the Docker image that you posted is a related issue, and it points to https://github.com/diegoferigo/devenv for Matlab support, but I never tried it. fyi @diegoferigo |
If for any reason the logic in FindMatlab fails, you can explicitly set the directory where Matlab is installed via the |
@EWouters Honestly I never tried to install Matlab into a Docker image since distributing such image (under the assumption that you also included the licence) would not be permitted. I recommend the usage of volumes in this case. This approach requires that you install and activate Matlab in the host OS, and then mount the Matlab directory inside your container. As @traversaro mentioned, you need also to add the With the images stored in the repo |
It seems Matlab is available in my path:
I link the binary to my path with these lines in my Dockerfile:
Also mex-wholebodymodel seems to be able to detect matlab just fine. Edit: removed user creation |
Few fixes on your dockerfile. Since If you don't want to use devenv, can you set in the Dockerfile the environment variable |
Slightly OT: mex-wholebodymodel is not part anymore of the superbuild, and in general has been deprecated since a long time. Do you need it for any particular reason? |
Actually I was not precise in my previous comment. |
No, I was just trying to debug the problem, searched the repos for FindMatlab.CMake and found that other repos had slightly other versions of the file. |
It seems that this is indeed the command that fails! If I run that command as root I get an Activation error, however if I run it as the matlab user I get:
So I should either activate matlab as root or build robotology as the matlab user. |
Looks like when compiling using the matlab user and sudo the yarp-matlab-bindings do compile.
I have to do some more testing to confirm it works, and that takes some time on my laptop. |
I think that to avoid this workaround (that is not easy) we should have some way to pass a given set of CMake arguments to all the CMake-based projects in the superbuild, something similar to colcon's |
This has been added to YCM as the
Note that For more info on this feature, check YCM's docs: http://robotology.github.io/ycm/gh-pages/git-master/manual/ycm-superbuild.7.html#specifying-additional-cmake-arguments-for-all-subprojects . |
The definitive solution to this is blocked by robotology/ycm-cmake-modules#352 , and probably updating the docs. |
YCM 0.12 has been released and is now used by default in robotology-superbuild Stable and Unstable builds, and will also be included in the 2020.11 release. For this reason I think that the solution proposed in #363 (comment) should now work, if it does not, @EWouters feel free to reopen the issue, thanks! |
Hi,
I'm trying to compile this awesome project using this Dockerfile.
I created a Dockerfile to install Matlab into the Tools image and use that image as a base for the Development image. Matlab runs fine in that image and I have a single-machine-licence.
When I try to compile the robotology-superbuild, it fails on compiling the yarp-matlab-bindings with the following error:
It looks like there were a few related issues to this 3 weeks ago, but I couldn't solve this when reading them.
The text was updated successfully, but these errors were encountered: