Gwyddion Modules not loading: undefined math symbols

Bug #1882441 reported by bcolsen
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gwyddion (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When I open a fresh install of gwyddion I get a pop window with the error:

  Many Modules (15) failed to register

  Most likely Gwyddion was not upgraded correctly. Instead, one installation
  was just overwritten with another, and now it is a mess.

  Please remove completely the module directory

  /usr/lib/x86_64-linux-gnu/gwyddion/modules

  and reinstall Gwyddion

  See Info → Module Browser for specific errors.

In the module browser I see several modules that fail with errors from the math library such as "undefined symbol:__log_finite"

The modules don't seem to be building with linked math libraries.

I have reproduced this on 2 fresh installations of 20.04.

With out these modules I am unable to open image files making the program unusable

$ lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04

$ apt-cache policy gwyddion
gwyddion:
  Installed: 2.55-3
  Candidate: 2.55-3
  Version table:
 *** 2.55-3 500
        500 http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
bcolsen (bcolsen) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gwyddion (Ubuntu):
status: New → Confirmed
Revision history for this message
Yeti (yeti) wrote :

Funny thing, the modules fail to load with the same errors even with

  LD_PRELOAD=/lib/x86_64-linux-gnu/libm.so.6 gwyddion

despite the symbols being defined there. LD_PRELOAD does not influence dlopen()ed modules?

Anyway, when the program is simply compiled from source code (using ~/opt/gwyddion as installation prefix):

  sudo apt-get install libgtkglext1-dev libfftw3-dev
  wget http://gwyddion.net/download/2.56/gwyddion-2.56.tar.xz
  tar -tf gwyddion-2.56.tar.xz
  cd gwyddion-2.56
  ./configure --prefix=$HOME/opt/gwyddion
  make
  make install

it can be run

  ~/opt/gwyddion/bin/gwyddion

and works normally.

So this obviously some linking peculiarity when packaging. I suggest to start by adding

  --enable-library-bloat

configure option when packaging. It often makes things work when distros add evil linker flags. But it may be insufficient. We may have to add some explicit -lm when this option is enabled.

Revision history for this message
xitix5r (xitix5r) wrote :
Download full text (7.9 KiB)

on 20.04, the program is simply compiled from source code (using ~/opt/gwyddion as installation prefix:

./configure --prefix=$HOME/opt/gwyddion
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok...

Read more...

Revision history for this message
bcolsen (bcolsen) wrote :

For those not wanting to compile the program, the builds from the gwyddion-spm ppa are now working.

https://launchpad.net/~gwyddion-spm

Revision history for this message
Yeti (yeti) wrote :

xitix5r: You need to follow the compilation instructions properly.
If they start with

  sudo apt-get install libgtkglext1-dev libfftw3-dev

either run the command as written – or at least ensure by other means
you have the two packages (and their dependencis) installed. Obviously,
you do not because fftw3 is found missing.

Revision history for this message
Nicola Ferralis (feranick) wrote :

Following on comment #5, the binaries in the gwyddion ppa are based on the newer upstream release (2.56), where several of the patches added to debian seem to have been added.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.