Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002589graphvizBuild/Installpublic2016-01-29 06:382016-02-10 00:42
Reporterjuanito_tc 
Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
StatusnewResolutionopen 
PlatformLinuxOSTinycorelinuxOS Version7.0
Summary0002589: Unable to compile Graphviz
DescriptionTrying to compile graphviz-2.38.0 with gcc-5.20, fails with

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --with-gtk=no

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;

make
...
/bin/bash ../../libtool --tag=CC --mode=link gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math -L/usr/local/lib -o gvpr gvpr-gvprmain.o ../../lib/gvpr/libgvpr.la
libtool: link: gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math -o .libs/gvpr gvpr-gvprmain.o -L/usr/local/lib ../../lib/gvpr/.libs/libgvpr.so /usr/src/graphviz-2.38.0/lib/cgraph/.libs/libcgraph.so /usr/src/graphviz-2.38.0/lib/cdt/.libs/libcdt.so -lm
../../lib/gvpr/.libs/libgvpr.so: undefined reference to `qldexp'
../../lib/gvpr/.libs/libgvpr.so: undefined reference to `qfrexp'
collect2: error: ld returned 1 exit status
Makefile:676: recipe for target 'gvpr' failed

graphviz-2.38.0 will be compiled with the following:

options:
  cgraph:
  digcola: Yes
  expat: Yes
  fontconfig: Yes
  freetype: Yes
  glut: No (missing GL/glut.h)
  ann: No (ANN library not available)
  gts: No (gts library not available)
  ipsepcola: No (disabled by default - C++ portability issues)
  ltdl: Yes
  ortho: Yes
  sfdp: Yes
  shared: Yes
  static: No (disabled by default)
  qt: No (qmake not found)
  x: Yes

commands:
  dot: Yes (always enabled)
  neato: Yes (always enabled)
  fdp: Yes (always enabled)
  circo: Yes (always enabled)
  twopi: Yes (always enabled)
  gvpr: Yes (always enabled)
  gvmap: Yes (always enabled)
  lefty: Yes
  smyrna: No (disabled by default - experimental)
  gvedit: No (qmake not found)

plugin libraries:
  dot_layout: Yes (always enabled)
  neato_layout: Yes (always enabled)
  core: Yes (always enabled)
  devil: No (missing library)
  gd: No (gd headers not found)
  gdiplus: No (disabled by default - Windows only)
  gdk: Yes
  gdk_pixbuf: Yes
  ghostscript: No (missing headers)
  glitz: No (disabled by default - incomplete)
  gtk: No (disabled)
  lasi: No (lasi library not available)
  ming: No (disabled by default - incomplete)
  pangocairo: Yes
  poppler: Yes
  quartz: No (disabled by default - Mac only)
  rsvg: Yes
  visio: No (disabled by default - experimental)
  webp: No (disabled by default - experimental)
  xlib: Yes

language extensions:
  gv_sharp: No (swig not available)
  gv_go: No (disabled by default - experimental)
  gv_guile: No (swig not available)
  gv_io: No (disabled by default - no swig support yet)
  gv_java: No (swig not available)
  gv_lua: No (swig not available)
  gv_ocaml: No (swig not available)
  gv_perl: No (swig not available)
  gv_php: No (swig not available)
  gv_python: No (swig not available)
  gv_python23: No (disabled by default - for multiversion installs)
  gv_python24: No (disabled by default - for multiversion installs)
  gv_python25: No (disabled by default - for multiversion installs)
  gv_python26: No (disabled by default - for multiversion installs)
  gv_python27: No (disabled by default - for multiversion installs)
  gv_R: No (swig not available)
  gv_ruby: No (swig not available)
  gv_tcl: No (swig not available)

  tcldot: Yes
  tclpathplan: Yes
  gdtclft: No (gd not available)
  tkspline: Yes
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSIONgraphviz-2.38.0
Attached Files

- Relationships

-  Notes
User avatar (0001017)
ellson (administrator)
2016-01-29 09:20
edited on: 2016-01-29 09:31

I'm not sure exactly whats going on, but these defs are from lib/sfio/sfhdr.h

#if _lib_qfrexp && _lib_qldexp
#define _has_expfuncs 1
#define frexp qfrexp
#define ldexp qldexp
#else
#define _has_expfuncs 0
#endif

And then frexp and ldexp are used in lib/sfio/sfdlen.c

I couldn't find where _lib_qfrexp && _lib_qldexp are set. .. Emden?

User avatar (0001018)
ellson (administrator)
2016-01-29 09:30
edited on: 2016-01-29 09:32

I think these are from glibc. On Fedora I have:

$ nm -o /lib64/libc-2.22.so | grep ldexp
/lib64/libc-2.22.so:0000000000034100 t __ldexp
/lib64/libc-2.22.so:0000000000034430 t __ldexpf
/lib64/libc-2.22.so:0000000000034740 t __ldexpl
/lib64/libc-2.22.so:0000000000034100 W ldexp
/lib64/libc-2.22.so:0000000000034430 W ldexpf
/lib64/libc-2.22.so:0000000000034740 W ldexpl

$ nm -o /lib64/libc-2.22.so | grep frexp
/lib64/libc-2.22.so:0000000000034070 t __frexp
/lib64/libc-2.22.so:00000000000343d0 t __frexpf
/lib64/libc-2.22.so:00000000000346b0 t __frexpl
/lib64/libc-2.22.so:0000000000034070 W frexp
/lib64/libc-2.22.so:00000000000343d0 W frexpf
/lib64/libc-2.22.so:00000000000346b0 W frexpl

$ rpm -qf /lib64/libc-2.22.so
glibc-2.22-7.fc23.x86_64

User avatar (0001019)
juanito_tc (reporter)
2016-01-30 02:03

libc has been stripped (--strip-unneeded) for size on my system, but on checking the original, it looks OK:

$ nm -o /lib/libc-2.22.so | grep ldexp
nm: /lib/libc-2.22.so: no symbols
$ /lib/libc-2.22.so
GNU C Library (GNU libc) stable release version 2.22, by Roland McGrath et al.
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 5.2.0.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>. [^]

$ nm -o /tmp/pkg/lib/libc-2.22.so | grep ldexp
/tmp/pkg/lib/libc-2.22.so:000000000002ff2c t __ldexp
/tmp/pkg/lib/libc-2.22.so:00000000000301dd t __ldexpf
/tmp/pkg/lib/libc-2.22.so:00000000000304aa t __ldexpl
/tmp/pkg/lib/libc-2.22.so:000000000002ff2c W ldexp
/tmp/pkg/lib/libc-2.22.so:00000000000301dd W ldexpf
/tmp/pkg/lib/libc-2.22.so:00000000000304aa W ldexpl
$ nm -o /tmp/pkg/lib/libc-2.22.so | grep frexp
/tmp/pkg/lib/libc-2.22.so:000000000002feae t __frexp
/tmp/pkg/lib/libc-2.22.so:0000000000030186 t __frexpf
/tmp/pkg/lib/libc-2.22.so:0000000000030421 t __frexpl
/tmp/pkg/lib/libc-2.22.so:000000000002feae W frexp
/tmp/pkg/lib/libc-2.22.so:0000000000030186 W frexpf
/tmp/pkg/lib/libc-2.22.so:0000000000030421 W frexpl
User avatar (0001020)
erg (administrator)
2016-01-31 16:59

sfio and other libraries from libast rely on the iffe program to check for system dependencies, like a lightweight configure. iffe is a shell script in the root graphviz directory $ROOT; for input, it uses the specification given in $ROOT/lib/sfio/features/sfio. The output is a collection of #defines and goes in the file $ROOT/FEATURES/sfio.

In this case, the specification tells iffe to look for the libraries qfrexp and qldexp, which are part of an extended precision math library. The test for libraries usually involves compiling and linking a trivial program with the desired library, say, using -lqldexp. If this succeeds, the corresponding #define is added to the FEATURES/sfio file.

So the simplest fix is to edit the FEATURES/sfio file and remove the lines
#define _lib_qfrexp
#define _lib_qldexp
and rebuild. As to how they got there, it's possible that the iffe test needs to be improved, or the linking is succeeding even without the libraries. Less like
ly is you picked up a stale FEATURES/sfio file.
User avatar (0001021)
juanito_tc (reporter)
2016-02-02 01:55

Thanks - that fixed things.

BTW - even though /usr/local/lib64 does not exist on my system, graphviz installed a number of files to /usr/local/lib64/tcl8.5/graphviz (tcl is installed in /usr/local/lib/tcl8.5)
User avatar (0001022)
juanito_tc (reporter)
2016-02-02 03:46

..and a bunch of the *.pc files contain -L/usr/lib64

--prefix=/usr/local and /usr/lib64 does not exist.
User avatar (0001027)
ellson (administrator)
2016-02-09 13:30

Re Comment 0001022

Are the .pc files from the graphviz package, or from other people's packages?

If you are only 64 bit, couldn't you softlink /usr/lib64 -> /usr/lib ?
If might make porting easier from redhat or debian environments.

Re: Comment 0001021

Please check /usr/local/lib/tcl8.5/tclConfig.sh for reasonable paths. If there are problems, then look to the tcl provider.
User avatar (0001032)
juanito_tc (reporter)
2016-02-10 00:42

Yes, the *.pc files are from graphviz.

My system is 64-bit, but there's no point to symlink /usr/lib64 -> /usr/lib as the libs referred to in the *.pc files are in /usr/local/lib anyway...

The paths in /usr/local/lib/tcl8.5/tclConfig.sh are correct.

- Issue History
Date Modified Username Field Change
2016-01-29 06:38 juanito_tc New Issue
2016-01-29 09:20 ellson Note Added: 0001017
2016-01-29 09:30 ellson Note Added: 0001018
2016-01-29 09:31 ellson Note Edited: 0001017 View Revisions
2016-01-29 09:32 ellson Note Edited: 0001018 View Revisions
2016-01-30 02:03 juanito_tc Note Added: 0001019
2016-01-31 16:59 erg Note Added: 0001020
2016-02-02 01:55 juanito_tc Note Added: 0001021
2016-02-02 03:46 juanito_tc Note Added: 0001022
2016-02-09 13:30 ellson Note Added: 0001027
2016-02-10 00:42 juanito_tc Note Added: 0001032


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker