[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#755232: graphviz FTBFS on Alpha: missing -lm in link of cmd/dot



Source: graphviz
Version: 2.38.0-3
Severity: important
User: debian-alpha@lists.debian.org
Usertags: alpha
Justification: fails to build from source but used to build

graphviz FTBFS on Alpha with a failed link of cmd/dot.  From the build
log [1]

/bin/bash ../../libtool  --tag=CC   --mode=link alpha-linux-gnu-gcc  -g -O2 -Wformat -Werror=format-security -mieee -Wall  -Wl,-z,relro -Wl,--as-needed -o dot dot-dot.o dot-no_builtins.o ../../lib/gvc/libgvc.la ../../lib/cgraph/libcgraph.la 
libtool: link: alpha-linux-gnu-gcc -g -O2 -Wformat -Werror=format-security -mieee -Wall -Wl,-z -Wl,relro -Wl,--as-needed -o .libs/dot dot-dot.o dot-no_builtins.o  ../../lib/gvc/.libs/libgvc.so ../../lib/cgraph/.libs/libcgraph.so
/usr/bin/ld: dot-dot.o: undefined reference to symbol 'feenableexcept@@GLIBC_2.2'
//lib/alpha-linux-gnu/libm.so.6.1: error adding symbols: DSO missing from command line

This is a failure to link to feenableexcept() from the standard C maths
library.

Note that there is no "-lm" in the link command, but quoting from the
manpage for feenableexcept:

      Link with -lm.

I attach a patch that adds the math library into the link of cmd/dot.
With the patch graphviz successfully builds on Alpha.

Interestingly graphviz only failed on Alpha for this reason; I do not
know how it succeeded to build on all other architectures!

Cheers
Michael

[1] http://buildd.debian-ports.org/status/fetch.php?pkg=graphviz&arch=alpha&ver=2.38.0-3&stamp=1405642711
Index: graphviz-2.38.0/cmd/dot/Makefile.am
===================================================================
--- graphviz-2.38.0.orig/cmd/dot/Makefile.am
+++ graphviz-2.38.0/cmd/dot/Makefile.am
@@ -48,7 +48,8 @@ dot_SOURCES = dot.c no_builtins.c
 dot_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=1
 dot_LDADD = \
 	$(top_builddir)/lib/gvc/libgvc.la \
-	$(top_builddir)/lib/cgraph/libcgraph.la
+	$(top_builddir)/lib/cgraph/libcgraph.la \
+	$(MATH_LIBS)
 
 install-data-hook:
 	(cd $(DESTDIR)$(man1dir); for i in $(linkedman); do rm -f $$i; $(LN_S) dot.1 $$i; done;)

Reply to: