Bug #297
closedmake error in matlab-genomix for matlab 2020b
Description
@Martin Jacquet asked me to open this issue.
When running $ make update-<pkgset-name>
in step 11 of the installation section in the ART documentation, using matlab 2020b, I get the following:
I have verified the path to the Matlab installation in the robotpkg.conf file is correct.
I have included the full configure.log file from therobotpkg/supervision/matlab-genomix/work.#/configure.log directory.
In the meantime I have got it to work on matlab 2020a, so this seems to be an issue related to the matlab version. Hopefully this information is useful and the bug can be squashed.
Files
Updated by Anthony Mallet almost 4 years ago
I have included the full configure.log file from
the robotpkg/supervision/matlab-genomix/work.#/configure.log
directory.
It shows that there is a linking issue, but in order to know which
issue precisely, could you attach the "config.log" file found in the
build directory?
It should be found in the following directory:
robotpkg/supervision/matlab-genomix/work.#/matlab-genomix-1.8.4/config.log
In the meantime I have got it to work on matlab 2020a, so this seems
to be an issue related to the matlab version. Hopefully this
information is useful and the bug can be squashed.
OK, this looks a bit similar to an issue with matlab-2020b and gcc-7
on ubuntu-18.04. However, since you are running gcc-9 on ubuntu-20.04,
I need to see the config.log file to check what is the error exactly.
Updated by Anonymous almost 4 years ago
- File config.log config.log added
The config file was deleted and I am having trouble reproducing the error. Since I have got it working using matlab 2020a, it also installs when switching back to 2020b in the robotpkg.conf file. I have found that including simulation/mrsim-gazebo does cause issues and therefore produces this config.log file. I hope this can still be used!
Updated by Anthony Mallet almost 4 years ago
Thanks.
However, this config.log file is useless here since it doesn't come
from the same package (and it has no error either, by the way).
If you have an issue with mrsim-gazebo, please open an issue there:
https://git.openrobots.org/projects/mrsim-gazebo/issues
Updated by Anonymous almost 4 years ago
- File configure.log configure.log added
- File config.log config.log added
- File robotpkg.conf robotpkg.conf added
Sorry for the confusion, I managed to reproduce the error by deinstalling matlab-genomix and attempting to reinstall using matlab 2020b in the robotpkg.conf file. I have included the relevant files, the error is listed below:
===> Configuring for matlab-genomix-1.8.4
=> Modifying GNU configure scripts to avoid --recheck
=> Disabling fatal errors with C++ preprocessor in GNU configure scripts
configure: error: please set MATLAB variable
An unexpected error occured. The last 10 log lines are shown below.
| checking for /usr/bin/gcc option to accept ISO C89... (cached) none needed
| checking whether /usr/bin/gcc understands -c and -o together... (cached) yes
| checking dependency style of /usr/bin/gcc... (cached) gcc3
| checking for ranlib... (cached) ranlib
| checking for library containing getaddrinfo... none required
| checking mex.h usability... yes
| checking mex.h presence... yes
| checking for mex.h... yes
| checking for mxGetString in -lmx... no
| configure: error: please set MATLAB variable
Hopefully this can be used to identify the problem, and matlab-genomix can be used with matlab 2020b
Updated by Anthony Mallet almost 4 years ago
- with gcc-7 and gcc-8 on ubuntu-18.04
- with gcc-9 on ubuntu-20.04
So far I have not found a precise explanation nor a workaround,
especially since I have access to matlab-2019b only. I initially
thought it was a version incompatibility but this would be weird that
matlab-2020b is incompatible with ubuntu-20.04.
I will still try to understand more precisely what is happening.
Updated by Anthony Mallet almost 4 years ago
In order to understand better, could you please run this and report what it
says?
objdump -TC /home/max/matlab/2020b/sys/os/glnxa64/libstdc++.so.6 | grep thread_atexit
Updated by Anonymous almost 4 years ago
Here is the output:
$ objdump -TC /home/max/matlab/2020b/sys/os/glnxa64/libstdc++.so.6 | grep thread_atexit
0000000000000000 DF *UND* 0000000000000000 <corrupt> __cxa_thread_atexit_impl
000000000008ff30 g DF .text 0000000000000005 CXXABI_1.3.7 __cxa_thread_atexit
Updated by Davide Bicego over 3 years ago
- File DB-config.log DB-config.log added
- Assignee set to Anthony Mallet
Dear Anthony,
I am experiencing the very same issue, running Matlab R2020b on Ubuntu 18.04.
Do you have any news regarding this?
I am attaching my "config.log" file ("DB-" as prefix) found in the build directory and copying the output of the objdump command in the following
dbicego@prometheus:/usr/local/MATLAB/R2020b/sys/os/glnxa64$ objdump -TC libstdc++.so.6 | grep thread_atexit 0000000000000000 DF *UND* 0000000000000000 __cxa_thread_atexit_impl 000000000008ff30 g DF .text 0000000000000005 CXXABI_1.3.7 __cxa_thread_atexit
Updated by Anthony Mallet over 3 years ago
The problem is that the libstdc++ that comes with matlab-2020b seems a
bit weird and/or incompatible, as indicated by the "<corrupt>" tag
that is seen in the objdump output.
I have no workaround so far, and I don't have any matlab-2020b
installation to test either.
Updated by Joudy Nader almost 3 years ago
Hello all,
I was installing Matlab R2020b on Ubuntu 18.04 when I faced the same problem discussed in this issue.
PREFIX.matlab is set correctly in robotkpg.conf.
Any updates concerning this issues?
I did some more debugging and tried 2 things to see what happens:
1) when the error occurred, I went to supervision/matlab-genomix/work.${USER}/matlab-genomix/ and commented the lines where we check for libmx.so in configure.ac since the library exists (logically speaking it's not correct to comment out, but just to give it a try), and ran autoreconf again and built matlab-genomix without any issue. And then make update-<pkgset-name> worked well.
2) in supervision/matlab-genomix/Makefile, I tried to see what's inside PREFIX.matlab variable (which should be the same as in robotpkg.conf), but nothing was inside. Is that normal?
I don't know if this can help, but it might be a way to find a solution for the problem.
Thanks in advance.
Updated by Anthony Mallet almost 3 years ago
The test for libmx and libmex done by autoconf links a test
exectuable to check that the symbols are present.
However, it seems that with matlab-2020b, linking does not work if the
compiler is not a C++ compiler (by default, autoconf uses a C compiler
for the tests).
Since matlab-genomix does on purpose not use a C++ compiler (it's only
C, so that there is no ABI issues between matlab C++ version and the
system C++ version), it's a bit frustrating to have to require a C++
compiler for the test.
So I thing the easiest is to disable the autoconf test, and hardcode
the required library. Something like:
@ -40,11 +40,7
@ LDFLAGS="$LDFLAGS -L$MATLAB/sys/os/$MATARCH -Wl,-rpath,$MATLAB/sys/os/$MATARCH"
AC_SUBST(MEXEXT)
AC_CHECK_HEADERS([mex.h], [], [AC_MSG_ERROR([please set MATLAB variable])])AC_CHECK_LIB([mx], [mxGetString], [], [AC_MSG_ERROR([please set MATLAB variable])])AC_CHECK_LIB([mex], [mexErrMsgIdAndTxt], [], [AC_MSG_ERROR([please set MATLAB variable])])
-
+LIBS="-lmx -lmex"
- output
AC_CONFIG_FILES([
If this works for you, then I'll commit this.
Updated by Joudy Nader almost 3 years ago
Okay. I tested this change and it works.
The same problem then occurs in tk3-matlab-1.6 in my case when I continue with make update-<pkgset-name>.
Updated by Anthony Mallet almost 3 years ago
Yes, tk3-matlab is basically the same. I will commit and release the
same fix.
Thanks for helping with this issue!
Updated by Anthony Mallet almost 3 years ago
- Status changed from New to Closed
Applied in changeset matlab-genomix|c24aef0c3151a186c9d25556b984d228d5b55008.