Cannot link gvplugin_core without on-demand loading

Bug #1932333 reported by WP
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
graphviz (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Attempting to compile code that calls `gvContextPlugins(args)` results in undefined references in libgvplugin_core.so. This occurs only on Ubuntu 20.04 as far as I can tell, and is causing some problems with Regina (see https://github.com/regina-normal/regina/issues/70).

A sample main.c and Makefile can be viewed at https://gist.github.com/WPettersson/014bb43f5063e06742ca06666c1b81d1

Compiling on Ubuntu 20.04 with latest graphviz installed results in

gcc main.c -o main -lcgraph -lgvc -lgvplugin_core -lgvplugin_dot_layout -lgvplugin_neato_layout -I/usr/include/graphviz -L/usr/lib/x86_64-linux-gnu/graphviz -DLIBGVC_DYNAMIC_PLUGINS
gcc main.c -o main -lcgraph -lgvc -lgvplugin_core -lgvplugin_dot_layout -lgvplugin_neato_layout -I/usr/include/graphviz -L/usr/lib/x86_64-linux-gnu/graphviz
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/graphviz/libgvplugin_core.so: undefined reference to `__exp_finite'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/graphviz/libgvplugin_core.so: undefined reference to `__log10_finite'
collect2: error: ld returned 1 exit status
make: *** [Makefile:4: static] Error 1

After adjusting the compile flags, this code compiles (and runs) fine on Debian buster, as well as on Gentoo and ArchLinux.

Ubuntu version:
Ubuntu 20.04.2 LTS

Installed relevant packages:
libgraphviz-dev: 2.24.2-3build2
libgvc6 2.42.2-3build3
libgvc6-plugins-gtk 2.42.2-3build2

What I expected to happen:
Clean compilation

What happened instead:
undefined references

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

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

Changed in graphviz (Ubuntu):
status: New → Confirmed
Revision history for this message
WP (wp-strudel) wrote :

I should clarify, where I say "adjusting compile flags" I mean setting the correct -L path to the graphviz libraries, no other compile-time flags are adjusted.

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.