Project

General

Profile

Actions

Bug #297

closed

make error in matlab-genomix for matlab 2020b

Added by Anonymous about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal

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

error15FEB.png (481 KB) error15FEB.png Anonymous, 2021-02-15 11:13
configure.log (7.18 KB) configure.log Anonymous, 2021-02-15 11:16
config.log (31.9 KB) config.log Anonymous, 2021-02-16 10:45
configure.log (7.12 KB) configure.log Anonymous, 2021-02-17 14:08
config.log (27.2 KB) config.log Anonymous, 2021-02-17 14:08
robotpkg.conf (9.95 KB) robotpkg.conf Anonymous, 2021-02-17 14:09
DB-config.log (27 KB) DB-config.log Davide Bicego, 2021-04-21 12:22
Actions #1

Updated by Anthony Mallet about 3 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.

Actions #2

Updated by Anonymous about 3 years ago

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!

Actions #3

Updated by Anthony Mallet about 3 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 about 3 years ago

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

Actions #5

Updated by Anthony Mallet about 3 years ago

OK, so the same issue arises with matlab-2020b:
  • 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.

Actions #6

Updated by Anthony Mallet about 3 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

Actions #7

Updated by Anonymous about 3 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
Actions #8

Updated by Davide Bicego almost 3 years ago

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

Actions #9

Updated by Anthony Mallet almost 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.

Actions #10

Updated by Joudy Nader over 2 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.

Actions #11

Updated by Anthony Mallet over 2 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"

  1. output
    AC_CONFIG_FILES([

If this works for you, then I'll commit this.

Actions #12

Updated by Joudy Nader over 2 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>.

Actions #13

Updated by Anthony Mallet over 2 years ago

Yes, tk3-matlab is basically the same. I will commit and release the
same fix.

Thanks for helping with this issue!

Actions #14

Updated by Anthony Mallet over 2 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF