[3dprinter-general] Bug#985473: slic3r: symbol lookup error after gcode export

Bernhard Übelacker bernhardu at mailbox.org
Wed Apr 7 10:28:54 BST 2021


Hello Joe,
thanks for the backtrace. It enabled me to reproduce it.
You have configured a post processing step in your printer settings?

Then this setenv function is tried to be located in the loaded
shared objects. Unfortunately Slic3r/XS/XS.so does not show to be
linked to libboost_nowide.so, where the missing symbols seems to be.

With the 2 lines changed at the bottom of this mail,
ldd XS.so shows also a line for libboost_nowide.so,
therefore it gets loaded automatically by the dynamic loader
and symbol resolution should find it.
A package build with it shows then a correct error message
about my missing post processing file.

The given upstream commit contain similar changes.

Kind regards,
Bernhard



Thread 144 "perl" hit Breakpoint 6, _dl_lookup_symbol_x (undef_name=0x7ffff729ee71 "_ZN5boost6nowide6setenvEPKcS2_i", undef_map=0x555555d7a970, ref=ref at entry=0x7fff527fb578, symbol_scope=0x555555d7acd8, version=0x0, type_class=type_class at entry=1, flags=5, skip_map=0x0) at dl-lookup.c:878
878               _dl_exception_create_format
1: x/i $pc
=> 0x7ffff7fdce9b <_dl_lookup_symbol_x+731>:    test   %dl,%dl
(gdb) bt
#0  _dl_lookup_symbol_x (undef_name=0x7ffff729ee71 "_ZN5boost6nowide6setenvEPKcS2_i", undef_map=0x555555d7a970, ref=ref at entry=0x7fff527fb578, symbol_scope=0x555555d7acd8, version=0x0, type_class=type_class at entry=1, flags=5, skip_map=0x0) at dl-lookup.c:878
#1  0x00007ffff7fe1623 in _dl_fixup (l=<optimized out>, reloc_arg=<optimized out>) at ../elf/dl-runtime.c:112
#2  0x00007ffff7fe8503 in _dl_runtime_resolve_fxsave () at ../sysdeps/x86_64/dl-trampoline.h:126
#3  0x00007ffff75c42f9 in Slic3r::ConfigBase::setenv_ (this=0x555558a8da88) at /usr/include/c++/10/bits/basic_string.h:186
#4  0x00007ffff74966b6 in XS_Slic3r__Config__Static_setenv (my_perl=<optimized out>, cv=<optimized out>) at /usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t "../xsp/typemap.xspt"  "../xsp/Config.xsp":479
#5  0x0000555555665047 in Perl_pp_entersub ()
#6  0x000055555565b736 in Perl_runops_standard ()
#7  0x00005555555c0c44 in Perl_call_sv ()
#8  0x00007ffff792c52a in ?? () from /usr/lib/x86_64-linux-gnu/perl/5.32/auto/threads/threads.so
#9  0x00007ffff792df6d in ?? () from /usr/lib/x86_64-linux-gnu/perl/5.32/auto/threads/threads.so
#10 0x00007ffff7e58ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007ffff7d88def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) list
873               const char *versionstr = version ? ", version " : "";
874               const char *versionname = (version && version->name
875                                          ? version->name : "");
876               struct dl_exception exception;
877               /* XXX We cannot translate the message.  */
878               _dl_exception_create_format
879                 (&exception, DSO_FILENAME (reference_name),
880                  "undefined symbol: %s%s%s",
881                  undef_name, versionstr, versionname);
882               _dl_signal_cexception (0, &exception, N_("symbol lookup error"));


./lib/Slic3r/Print.pm
    146      # run post-processing scripts
    147      if (@{$self->config->post_process}) {
    148          $self->status_cb->(95, "Running post-processing scripts");
    149          $self->config->setenv;
    150          for my $script (@{$self->config->post_process}) {


$ ldd /usr/lib/slic3r/auto/Slic3r/XS/XS.so
...
         libboost_thread.so.1.74.0 => /lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 (0x00007fd9184fd000)
         libboost_filesystem.so.1.74.0 => /lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 (0x00007fd9184db000)
...
(libboost_nowide.so is not listed)



+++ slic3r-1.3.0+dfsg1/src/CMakeLists.txt
-find_package(Boost COMPONENTS system thread filesystem)
+find_package(Boost COMPONENTS system thread filesystem nowide)

+++ slic3r-1.3.0+dfsg1/xs/Build.PL
-my @boost_libraries = qw(system thread filesystem);  # we need these
+my @boost_libraries = qw(system thread filesystem nowide);  # we need these



https://github.com/slic3r/Slic3r/commit/89018b6e02e9d3fda30602cb4cf48f7750ace7b5



More information about the 3dprinter-general mailing list