Gnumeric generates error "...undefined symbol: forkpty"

gnumeric (1.12.50) displays the following error after attempting to launch python console from within gnumeric:

E Unable to open module file "/usr/local/lib/gnumeric/1.12.50/plugins/python-loader/python_loader".
  E /usr/local/lib/gnumeric/1.12.50/plugins/python-loader/ undefined symbol: forkpty

This issue was posted as a bug here.

This is suspected to be a compilation issue:

Specifically, “undefined symbol: forkpty”. The use of forkpty is not in Gnumeric.
Someone from the distribution is going to have to look at that.

Don’t have the problem with version 1.12.46

This issue is a continuation of Gnumeric-python plugin

Looking at the output for ./configure, make, and make install, there is no symbol for “forkpty”.

Here is a similar issue and preliminary solution.

ldd provides the following linker information on ```

$ ldd /usr/local/lib/gnumeric/1.12.50/plugins/python-loader/ (0x00007ffe25985000) => /usr/lib/ (0x00007fa85469c000) => /usr/lib/ (0x00007fa854567000) => /usr/lib/ (0x00007fa854423000) => /usr/lib/ (0x00007fa854257000) => /usr/lib/ (0x00007fa85424b000) => /usr/lib/ (0x00007fa8541d9000) => /usr/lib/ (0x00007fa8541b6000)
	/usr/lib64/ (0x00007fa854ae3000)

The undefined symbol: forkpty is a result of not being linked to /lib64/

Can verify starting gnumeric like this …

$ LD_PRELOAD=/lib64/ gnumeric

Can now launch python console from gnumeric.

The gnumeric extra repo package does not install any files there. How did you install it?

Compiled it locally after downloading source.

Can you reproduce the issue with the repo package?


After installing gnumeric from repo, then launching gnumeric and try to launch python console, get:

$ gnumeric
E Unable to open module file "/usr/lib/gnumeric/1.12.49/plugins/python-loader/python_loader".
  E /usr/lib/gnumeric/1.12.49/plugins/python-loader/ undefined symbol: forkpty

If launch gnumeric with

$ LD_PRELOAD=/lib64/ gnumeric

then able to launch python console.

Using the version from repo:

$ LD_PRELOAD=/lib64/ gnumeric --version
gnumeric version '1.12.49'
datadir := '/usr/share/gnumeric/1.12.49'
libdir := '/usr/lib/gnumeric/1.12.49'

For comparision with gnumeric 1.12.46 (last working version without problems)…

$ gnumeric --version
gnumeric version '1.12.46'
datadir := '/usr/share/gnumeric/1.12.46'
libdir := '/usr/lib/gnumeric/1.12.46
$ ldd /usr/lib/gnumeric/1.12.46/plugins/python-loader/ (0x00007ffea6bdc000) => /usr/lib/ (0x00007f9ad77b0000) => /usr/lib/ (0x00007f9ad7750000) => /usr/lib/ (0x00007f9ad7618000) => /usr/lib/ (0x00007f9ad7448000) => /usr/lib/ (0x00007f9ad7420000) => /usr/lib/ (0x00007f9ad7418000) => /usr/lib/ (0x00007f9ad7410000) => /usr/lib/ (0x00007f9ad72c8000) => /usr/lib/ (0x00007f9ad72b8000) => /usr/lib/ (0x00007f9ad7240000)
	/usr/lib64/ (0x00007f9ad7a00000)

Yes, gnumeric-1.12.47 onwards started python 3.x support

The developers of gnumeric have identified this issue as a linking problem with python-loader plugin.

This remains an issue with gnumeric 1.12.51:

$ gnumeric
E Unable to open module file "/usr/lib/gnumeric/1.12.51/plugins/python-loader/python_loader".
  E /usr/lib/gnumeric/1.12.51/plugins/python-loader/ undefined symbol: forkpty

Have reported it with gnome bug.

Add LD_PRELOAD=/usr/lib/ in /etc/environment as root. For some reason this doesn’t work if added in .profile instead. This seems the only way to run python console right now.

1 Like

Also have to reboot and then it works.