Clear Filters
Clear Filters

Linking simulink model with physmod fails on ubuntu 18.04

24 views (last 30 days)
I'm having some trouble compilng a simulink model that incoprorates simscape multibody. Other models work fine, the compile phase works but the linker doesn't like the archive files that came with physmod. Not sure what the next debug step would be.
g++ -shared -Wl,--no-undefined -o {YOINK} -Wl,--start-group /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/ssc_sli/lib/ssc_sli_std.a /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/sm_ssci/lib/sm_ssci_std.a /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/ssc_core/lib/ssc_core_std.a /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/ssc_st/lib/ssc_st_std.a /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/mc/lib/mc_std.a /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/sm/lib/sm_std.a /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/pm_math/lib/pm_math_std.a /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/pm/lib/pm_std.a -Wl,--end-group /usr/bin/ld: /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/ssc_sli/lib/ssc_sli_std.a(ssc_sli_0bd269e6.o): unable to initialize decompress status for section .debug_info /usr/bin/ld: /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/ssc_sli/lib/ssc_sli_std.a(ssc_sli_0bd269e6.o): unable to initialize decompress status for section .debug_info /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/ssc_sli/lib/ssc_sli_std.a: error adding symbols: File format not recognized
$> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

Answers (1)

Raghav
Raghav on 10 Mar 2023
Hi,
Based on the question, I understand that you want help regarding the linker phase of the Simulink model.
The error message you provided suggests that the linker is having trouble with the format of one of the archive files, specifically /usr/local/MATLAB/R2022b/extern/physmod/glnxa64/ssc_sli/lib/ssc_sli_std.a. The error message "unable to initialize decompress status for section .debug_info" is typically associated with an issue with the debugging information in an object file.
One possible cause of this issue is that the object file was compiled with a version of the compiler that is not compatible with the linker. In this case, you are using GCC version 7.5.0, which is the version that comes with Ubuntu 18.04. It is possible that this version of GCC is not compatible with the linker that comes with MATLAB R2022b.
One possible solution is to try updating your GCC version to 9.3. Another option is to try using a different version of MATLAB that is compatible with your current GCC version.
Hope it helps!
Regards,
Raghav Bansal

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!