Bug 195676 - graphics/graphviz bitten by stricter linker semantics
Summary: graphics/graphviz bitten by stricter linker semantics
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-04 13:09 UTC by Chris Nehren
Modified: 2014-12-28 18:25 UTC (History)
0 users

See Also:
dinoex: maintainer-feedback-


Attachments
options file (/var/db/ports/graphics_graphviz/options) that reproduces faliure (1.07 KB, text/plain)
2014-12-04 16:24 UTC, Chris Nehren
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Nehren 2014-12-04 13:09:43 UTC
Trying to portmaster graphics/graphviz this morning and I get the following:

  CCLD     smyrna
/usr/bin/ld: //lib/libm.so.5: invalid DSO for symbol `cos@@FBSD_1.0' definition
//lib/libm.so.5: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)

I did some research and it appears that the link line for smyrna assumes that libm will be passed in. If I explicitly add -lm to the compile line, it works. Looks like the port needs to be patched for this, though I'm not sure what the most "right" way is.
Comment 1 Bugzilla Automation freebsd_committer 2014-12-04 13:09:43 UTC
Auto-assigned to maintainer dinoex@FreeBSD.org
Comment 2 Dirk Meyer freebsd_committer 2014-12-04 14:46:59 UTC
Sorry, I can not reproduce the problem.

What FreeBSD version and arch are you running.
Comment 3 Chris Nehren 2014-12-04 14:50:42 UTC
(In reply to Dirk Meyer from comment #2)
> Sorry, I can not reproduce the problem.
> 
> What FreeBSD version and arch are you running.

$ uname -a
FreeBSD behemoth 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274551: Sat Nov 15 15:39:21 UTC 2014     root@behemoth:/usr/obj/usr/src/sys/GENERIC  amd64
$ freebsd-version 
10.1-RELEASE
$ freebsd-version -k
10.1-RELEASE
Comment 4 Chris Nehren 2014-12-04 16:23:31 UTC
I should note that I have enabled a number of knobs in the port that aren't defaults. I'll attach the options file from /var/db/ports/graphics_graphviz/options.
Comment 5 Chris Nehren 2014-12-04 16:24:01 UTC
Created attachment 150187 [details]
options file (/var/db/ports/graphics_graphviz/options) that reproduces faliure
Comment 6 Dirk Meyer freebsd_committer 2014-12-28 09:55:06 UTC
still no error on FreeBSD 10.0 amd64:

[...]

/bin/sh ../../libtool  --tag=CC   --mode=link cc  -O2 -pipe -DLIBICONV_PLUG -fstack-protector -fno-s
trict-aliasing -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math  -L/usr/local/lib -fstack-prote
ctor -L/usr/local/lib -o smyrna arcball.o draw.o glexpose.o glmotion.o gltemplate.o appmouse.o callb
acks.o gvprpipe.o hier.o hotkeymap.o main.o md5.o polytess.o selectionfuncs.o smyrna_utils.o topfish
eyeview.o topviewfuncs.o trackball.o tvnodes.o viewport.o viewportcamera.o datalistcallbacks.o frmob
jectui.o glcompui.o gui.o menucallbacks.o toolboxcallbacks.o topviewsettings.o glutrender.o ../../li
b/cgraph/libcgraph_C.la ../../lib/cdt/libcdt_C.la ../../lib/xdot/libxdot_C.la ../../lib/glcomp/libgl
comp_C.la ../../lib/topfish/libtopfish_C.la ../../lib/common/libcommon_C.la ../../lib/gvpr/libgvpr_C
.la ../../lib/expr/libexpr_C.la ../../lib/ingraphs/libingraphs_C.la ../../lib/neatogen/libneatogen_C
.la -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -pthread -lgdk_pixbuf-2.0 -lgio-2
.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -lfontconfig -L/usr/local/lib -lfreety
pe   -lglut -lgtkglext-x11-1.0 -lgdkglext-x11-1.0 -lGLU -lGL -lXmu -lXt -lSM -lICE -lpangox-1.0  -lX
11 -Wl,--export-dynamic -lgmodule-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo
 -pthread -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -lfo
ntconfig -L/usr/local/lib -lfreetype   -lglade-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lat
k-1.0 -lcairo -pthread -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.
0 -lintl -lfontconfig -lfreetype -L/usr/local/lib -lxml2   -lexpat -lgts -lgthread-2.0 -Wl,--export-
dynamic -lgmodule-2.0 -pthread -L/usr/local/lib -lglib-2.0 -lintl    
libtool: link: cc -O2 -pipe -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -Wstrict-prototyp
es -Wpointer-arith -Wall -ffast-math -fstack-protector -o .libs/smyrna arcball.o draw.o glexpose.o g
lmotion.o gltemplate.o appmouse.o callbacks.o gvprpipe.o hier.o hotkeymap.o main.o md5.o polytess.o 
selectionfuncs.o smyrna_utils.o topfisheyeview.o topviewfuncs.o trackball.o tvnodes.o viewport.o vie
wportcamera.o datalistcallbacks.o frmobjectui.o glcompui.o gui.o menucallbacks.o toolboxcallbacks.o 
topviewsettings.o glutrender.o -pthread -Wl,--export-dynamic -pthread -pthread -Wl,--export-dynamic 
-pthread  -L/usr/local/lib ../../lib/cgraph/.libs/libcgraph_C.a ../../lib/cdt/.libs/libcdt_C.a ../..
/lib/xdot/.libs/libxdot_C.a ../../lib/glcomp/.libs/libglcomp_C.a ../../lib/topfish/.libs/libtopfish_
C.a ../../lib/common/.libs/libcommon_C.a ../../lib/gvpr/.libs/libgvpr_C.a ../../lib/expr/.libs/libex
pr_C.a /data/image/usr/ports/current/graphviz-smyrna/work/graphviz-2.38.0/lib/cdt/.libs/libcdt.so ..
/../lib/ingraphs/.libs/libingraphs_C.a ../../lib/neatogen/.libs/libneatogen_C.a /usr/local/lib/libgl
ut.so -lgtkglext-x11-1.0 -lgdkglext-x11-1.0 -lGLU -lGL /usr/local/lib/libXmu.so /usr/local/lib/libXt
.so /usr/local/lib/libSM.so /usr/local/lib/libICE.so -lpangox-1.0 /usr/local/lib/libX11.so /usr/loca
l/lib/libglade-2.0.so -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.
0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig -lfreetype -lxml2 -lexpat -lgts -l
gthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -pthread -Wl,-rpath -Wl,/usr/local/lib/graphviz -Wl,-rpa
th -Wl,/usr/local/lib
gmake[5]: Leaving directory '/data/image/usr/ports/current/graphviz-smyrna/work/graphviz-2.38.0/cmd/
smyrna'
Comment 7 Dirk Meyer freebsd_committer 2014-12-28 10:09:31 UTC
  -lm  is already added 3 times in the Makefile

Check:

/usr/ports/current/graphviz-smyrna$ grep .-lm `make -V WRKSRC`/cmd/smyrna/Makefile
GD_LIBS = -L/usr/local/lib -fstack-protector -L/usr/local/lib -lgd -lgd -ljpeg -lz -lm -L/usr/local/lib -lpng16 -L/usr/local/lib -lfreetype -lfontconfig -L/usr/local/lib -lfreetype -lfontconfig -L/usr/local/lib -ltiff
GTS_LIBS =  -lgts -lm -lgthread-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -L/usr/local/lib -lglib-2.0 -lintl
MATH_LIBS = -lm

Which entries are missing in your side?
Comment 8 commit-hook freebsd_committer 2014-12-28 18:02:19 UTC
A commit references this bug:

Author: dinoex
Date: Sun Dec 28 18:01:44 UTC 2014
New revision: 375732
URL: https://svnweb.freebsd.org/changeset/ports/375732

Log:
  - fix linker problems with smyrna
  PR:		195676
  PR:		196288

Changes:
  head/graphics/graphviz/Makefile