Bug 171949

Summary: graphics/graphviz: install: Unable to find pthread_create symbol. Aborting.
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Dirk Meyer <dinoex>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description O. Hartmann 2012-09-25 14:00:24 UTC
Installation of port graphics/graphviz fails du to the below shown error. Building, either with CLANG (3.1 and 3.2) or GCC46 works fine. But the final installation process, "make install", ends up with the following error: 

gmake[5]: Entering directory `/usr/ports/graphics/graphviz/work/graphviz-2.28.0/cmd/dot'
(cd /usr/local/bin; if test -x dot; then for i in neato twopi fdp circo osage patchwork sfdp; do rm -f $i; ln -s dot $i; done; fi;)
if test "x" = "x"; then if test -x /usr/local/bin/dot; then if test -x /sbin/ldconfig; then /sbin/ldconfig 2>/dev/null; fi; /usr/local/bin/dot -c; else /usr/local/bin/dot_static -c; fi; fi
Unable to find pthread_create symbol. Aborting.
gmake[5]: *** [install-exec-hook] Abort trap (core dumped)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-09-25 14:00:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 O. Hartmann 2012-09-25 14:06:28 UTC
This is a multi-part message in MIME format.
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2012-09-27 20:05:43 UTC
State Changed
From-To: open->feedback


I can not reproduce your problem. 
the port builds fine here. 

Which options did you use?
Comment 4 O. Hartmann 2012-09-27 23:18:04 UTC
Am 09/27/12 21:06, schrieb dinoex@FreeBSD.org:
> Synopsis: graphics/graphviz: install: Unable to find pthread_create symbol. Aborting.
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: dinoex
> State-Changed-When: Thu Sep 27 21:05:43 CEST 2012
> State-Changed-Why: 
> 
> I can not reproduce your problem.
> the port builds fine here.
> 
> Which options did you use?
> 
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=171949
> 


The configuration on the box in question is as follows:

OS today with the same failure: FreeBSD 10.0-CURRENT #2 r240999M: Thu
Sep 27 18:15:25 CEST 2012 amd64, CLANG 3.2 (buildworl, buildkernel) also
used to build the port.

===> The following configuration options are available for
graphviz-2.28.0_1:
     XPM=on: XPM pixmaps support
     DIGCOLA=on: neato layout engine wiwth DIGCOLA features
     IPSEPCOLA=on: neato layout engine wiwth IPSEPCOLA features
     ICONV=on: Encoding conversion support via iconv
     NLS=on: Native Language Support
     PANGOCAIRO=on: pangocairo support
     LIBRSVG2=off: SVG vector graphics support via librsvg2
     GTK2=on: gtk2 plugin (requires PANGOCAIRO)
     GDK_PIXBUF=off: gdk pixbuf support
     GNOMEUI=off: libgnomeui support
     SMYRNA=off: SMYRNA graph viewer (requires GTK2)
     GVEDIT=off: gvedit (requires qt)
     MING=off: ming plugin
     DEVIL=off: devil plugin
     GHOSTSCRIPT=on: ghostscript plugin
     PERL=off: Perl bindings (swig)
     PHP=off: PHP bindings (swig)
     PYTHON=on: Python bindings (swig)
     RUBY=off: Ruby bindings (swig)
     LUA=off: Lua bindings (swig)
     TCL=off: TCL bindings (swig)
     GUILE=off: Guile bindings (swig)
     TK=on: TK toolkit support
===> Use 'make config' to modify these settings

Comment 5 Joseph 2012-10-20 08:45:42 UTC
Hello,

I have also reproduced this problem while building from ports (-tree
updated moments ago). I'm tracking FreeBSD 8-Stable, and graphviz-2.28.0_1
also fails to build with the same error.
The tip on the inclusion of "-lpthread" to LDFLAGS in the Makefile has also
resolved the build error.
Comment 6 Dirk Meyer freebsd_committer freebsd_triage 2012-11-04 16:12:08 UTC
State Changed
From-To: feedback->analyzed


Sorry the patch is not a solution. 
Some of the depenencies you use include pthread without registering it in the ".so". 

Build on pointhat is fine without "pthread", so won't fix graphviz.
Comment 7 Shawn Webb 2012-11-09 13:48:57 UTC
Confirmed on my end, too. Ports updated as of this morning. Can't install
gimp due to the same error.

uname -a output: FreeBSD pwnie 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1
r241998+0adfd1a: Wed Oct 24 11:01:39 EDT 2012
shawn@shawn-vm-host:/usr/obj/usr/src/sys/SEC
 amd64
Comment 8 barbara.freebsd 2012-12-08 20:14:39 UTC
I faced the same problem today.
Trying to narrow it down, it seems that the problem is caused by
glXChooseVisual inside /usr/local/lib/libGL.so.1 from x11/nvidia-driver.

This is the output running ldd on the backup libGL.so.1 from libGL-7.11.2_2:
$ ldd /usr/local/lib/.libGL/libGL.so.1
/usr/local/lib/.libGL/libGL.so.1:
	libXext.so.6 => /usr/local/lib/libXext.so.6 (0x28202000)
	libXdamage.so.1 => /usr/local/lib/libXdamage.so.1 (0x28210000)
	libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x28213000)
	libXxf86vm.so.1 => /usr/local/lib/libXxf86vm.so.1 (0x28218000)
	libX11-xcb.so.1 => /usr/local/lib/libX11-xcb.so.1 (0x2821d000)
	libX11.so.6 => /usr/local/lib/libX11.so.6 (0x2821f000)
	libxcb-glx.so.0 => /usr/local/lib/libxcb-glx.so.0 (0x28334000)
	libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x28343000)
	libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x28359000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28800000)
	libm.so.5 => /lib/libm.so.5 (0x28362000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2837c000)
	libthr.so.3 => /lib/libthr.so.3 (0x28387000)
	libc.so.7 => /lib/libc.so.7 (0x2806c000)
	libXau.so.6 => /usr/local/lib/libXau.so.6 (0x283a7000)
	libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x283aa000)
	libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x283af000)
	librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x283b1000)

And this one from the version installed by nvidia-driver:
$ ldd /usr/local/lib/libGL.so.1
/usr/local/lib/libGL.so.1:
	libnvidia-tls.so.1 => /usr/local/lib/libnvidia-tls.so.1 (0x28267000)
	libnvidia-glcore.so.1 => /usr/local/lib/libnvidia-glcore.so.1 (0x28800000)
	libX11.so.6 => /usr/local/lib/libX11.so.6 (0x28269000)
	libXext.so.6 => /usr/local/lib/libXext.so.6 (0x2837e000)
	libc.so.7 => /lib/libc.so.7 (0x2806c000)
	libm.so.5 => /lib/libm.so.5 (0x2838c000)
	libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x283a6000)
	libXau.so.6 => /usr/local/lib/libXau.so.6 (0x283bc000)
	libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x283bf000)
	libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x283c4000)
	librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x283c6000)

Can the error be caused by dot trying to dlopen libGL.so.1 and assuming
that it's linked with libthr.so.3, while the one from nvidia-driver is not?
I think that there are also other PR related to the same problem.
Comment 9 vsjcfm 2012-12-09 08:55:36 UTC
Confirmed on 9.1-RELEASE amd64 with latest ports.

===> The following configuration options are available for graphviz-2.28.0_1:
     XPM=on: XPM pixmaps
     DIGCOLA=on: neato layout engine wiwth DIGCOLA features
     IPSEPCOLA=on: neato layout engine wiwth IPSEPCOLA features
     ICONV=on: Encoding conversion via iconv
     NLS=on: Native Language Support
     PANGOCAIRO=on: pangocairo support
     LIBRSVG2=on: SVG vector graphics via librsvg2
     GTK2=off: gtk2 plugin (requires PANGOCAIRO)
     GDK_PIXBUF=off: gdk pixbuf support
     GNOMEUI=off: libgnomeui support
     SMYRNA=off: SMYRNA graph viewer (requires GTK2)
     GVEDIT=off: gvedit (requires qt)
     MING=off: ming plugin
     DEVIL=off: devil plugin
     GHOSTSCRIPT=off: ghostscript plugin
     PERL=off: Perl bindings (swig)
     PHP=off: PHP bindings (swig)
     PYTHON=off: Python bindings (swig)
     RUBY=off: Ruby bindings (swig)
     LUA=off: Lua bindings (swig)
     TCL=off: TCL bindings (swig)
     GUILE=off: Guile bindings (swig)
     TK=off: TK toolkit support
===> Use 'make config' to modify these settings
Comment 10 Vladimir Timofeev 2012-12-15 17:42:30 UTC
Confirm that bug exists.
Also confirm that adding pthread to libs fixes this (yes I have
nvidia-driver installed).
But would recommend to use this patch instead:
Index: Makefile
===================================================================
--- Makefile    (revision 308920)
+++ Makefile    (working copy)
@@ -108,6 +108,7 @@
                --disable-io --disable-ocaml --disable-java \
                --disable-sharp

+CONFIGURE_ENV+=        LIBS="${PTHREAD_LIBS}"
 CONFIGURE_ENV+=        MISSING=${TRUE}

 .if ${PORT_OPTIONS:MTK}



-- 
Vladimir Timofeev <vovkasm@gmail.com>
Comment 11 Dirk Meyer freebsd_committer freebsd_triage 2013-02-08 11:30:31 UTC
State Changed
From-To: analyzed->closed

- an option NVTHREADS was commited
Comment 12 dfilter service freebsd_committer freebsd_triage 2013-02-08 11:30:32 UTC
Author: dinoex
Date: Fri Feb  8 11:30:13 2013
New Revision: 311936
URL: http://svnweb.freebsd.org/changeset/ports/311936

Log:
  - add option NVTHREADS for compatibility with nvidia libs
  PR:		171949

Modified:
  head/graphics/graphviz/Makefile

Modified: head/graphics/graphviz/Makefile
==============================================================================
--- head/graphics/graphviz/Makefile	Fri Feb  8 09:42:12 2013	(r311935)
+++ head/graphics/graphviz/Makefile	Fri Feb  8 11:30:13 2013	(r311936)
@@ -63,7 +63,7 @@ PDOCS_HTML=	doc/*.html doc/info/*.gif
 
 USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}
 
-OPTIONS_DEFINE=	XPM DIGCOLA IPSEPCOLA ICONV NLS PANGOCAIRO LIBRSVG2 GTK2 GDK_PIXBUF GNOMEUI SMYRNA GVEDIT MING DEVIL GHOSTSCRIPT PERL PHP PYTHON RUBY LUA TCL GUILE TK
+OPTIONS_DEFINE=	XPM DIGCOLA IPSEPCOLA ICONV NLS PANGOCAIRO LIBRSVG2 GTK2 GDK_PIXBUF GNOMEUI SMYRNA GVEDIT MING DEVIL GHOSTSCRIPT PERL PHP PYTHON RUBY LUA TCL GUILE TK NVTHREADS
 OPTIONS_DEFAULT?=	XPM DIGCOLA IPSEPCOLA ICONV NLS PANGOCAIRO
 NO_OPTIONS_SORT=yes
 DIGCOLA_DESC=	neato layout engine wiwth DIGCOLA features
@@ -85,6 +85,7 @@ LUA_DESC=	Lua bindings (swig)
 TCL_DESC=	TCL bindings (swig)
 GUILE_DESC=	Guile bindings (swig)
 TK_DESC=	TK toolkit support
+NVTHREADS_DESC=	Link with threads (needed for nvidia)
 
 .include <bsd.port.options.mk>
 
@@ -398,6 +399,11 @@ CONFIGURE_ARGS+=	--with-ghostscript=no
 PLIST_SUB+=		WITH_GHOSTSCRIPT="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MNVTHREADS}
+CFLAGS+=	${PTHREAD_CFLAGS}
+LDFLAGS+=	${PTHREAD_LIBS}
+.endif
+
 post-patch:
 	@${FIND} ${WRKSRC} -name Makefile.in | \
 		${XARGS} ${REINPLACE_CMD} \
@@ -427,7 +433,7 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|#include "gui.h"|#include "gui/gui.h"|' \
 		${WRKSRC}/cmd/smyrna/tvnodes.h
 	${CP} ${WRKSRC}/lib/cgraph/cgraph.h ${WRKSRC}/plugin/ming/
-.if defined(NOPORTDOCS)
+.if ! ${PORT_OPTIONS:MDOCS}
 	@${REINPLACE_CMD} -e 's| install-txtDATA$$||' \
 		${WRKSRC}/Makefile.in
 .endif
@@ -437,7 +443,7 @@ post-install: install-ldconfig-file
 		${MAKE} ${INSTALL_TARGET}
 	cd ${WRKSRC} && \
 		${INSTALL_DATA} ${FIX_INCLUDE} ${PREFIX}/include/graphviz/
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${DOCSDIR}
 	@${MKDIR} ${DOCSDIR}/html
 	@${MKDIR} ${DOCSDIR}/pdf
@@ -446,7 +452,7 @@ post-install: install-ldconfig-file
 		${INSTALL_DATA} ${PDOCS_PDF} ${DOCSDIR}/pdf/ && \
 		${INSTALL_DATA} ${PDOCS_HTML} ${DOCSDIR}/html/
 .endif
-.if !defined(NOPORTEXAMPLES)
+.if ${PORT_OPTIONS:MEXAMPLES}
 	@${ECHO_MSG} "Installing demo data..."
 	@${MKDIR} ${EXAMPLESDIR}
 	${INSTALL_SCRIPT} \
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"