Bug 203372

Summary: x11/nvidia-settings 355.11 core dumps with "Unable to find pthread_mutexattr_setkind_np versioned symbol."
Product: Ports & Packages Reporter: Marco Beishuizen <mbeis>
Component: Individual Port(s)Assignee: Alexander Nedotsukov <bland>
Status: Closed FIXED    
Severity: Affects Some People CC: admin, drhowarddrfine, gro.dsbeerf.sgub, jeff, junchoon, kmoore, p.matuszny
Priority: --- Flags: bugzilla: maintainer-feedback? (bland)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Fix to include libthr none

Description Marco Beishuizen 2015-09-26 12:24:59 UTC
Just updated nvidia-settings to the latest 355.11. It immediately core dumps with:

Unable to find pthread_mutexattr_setkind_np versioned symbol. Aborting.
Abort (core dumped)

Ports tree is up-to-date.
Comment 1 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-26 12:30:30 UTC
Any chance to see backtrace?
Comment 2 Marco Beishuizen 2015-09-26 12:39:53 UTC
How do I do that? I'm not much of a programmer.
I do have a core dump though. Shall I attach that? (21 MB).
Comment 3 Marco Beishuizen 2015-09-26 12:49:28 UTC
My uname -a:

FreeBSD yokozuna.lan 10.2-STABLE FreeBSD 10.2-STABLE #0 r286813: Sun Aug 16 01:43:20 CEST 2015     root@yokozuna.lan:/usr/obj/usr/src/sys/AKIRA  amd64
Comment 4 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-26 12:53:42 UTC
No need to attach core file. Please attach output of:

$ gdb /usr/local/bin/nvidia-settings nvidia-settings.core
...
(gdb) where
(gdb) thread apply all bt

Also:

$ ldd /usr/local/bin/nvidia-settings

$ ldd /usr/local/lib/libnvidia-gtk2.so.355.11
Comment 5 Marco Beishuizen 2015-09-26 13:01:43 UTC
marco@yokozuna:~ % gdb /usr/local/bin/nvidia-settings /var/coredumps/nvidia-settings.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `nvidia-settings'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/libXxf86vm.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXxf86vm.so.1
Reading symbols from /usr/local/lib/libjansson.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libjansson.so.4
Reading symbols from /usr/local/lib/libX11.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libX11.so.6
Reading symbols from /usr/local/lib/libXext.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXext.so.6
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/libxcb.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxcb.so.1
Reading symbols from /usr/lib/librpcsvc.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/librpcsvc.so.5
Reading symbols from /usr/local/lib/libXau.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXau.so.6
Reading symbols from /usr/local/lib/libpthread-stubs.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpthread-stubs.so.0
Reading symbols from /usr/local/lib/libXdmcp.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXdmcp.so.6
Reading symbols from /usr/local/lib/libnvidia-gtk2.so.355.11...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnvidia-gtk2.so.355.11
Reading symbols from /usr/local/lib/libgtk-x11-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgtk-x11-2.0.so.0
Reading symbols from /usr/local/lib/libgdk-x11-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgdk-x11-2.0.so.0
Reading symbols from /usr/local/lib/libpangocairo-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpangocairo-1.0.so.0
Reading symbols from /usr/local/lib/libatk-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libatk-1.0.so.0
Reading symbols from /usr/local/lib/libcairo.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libcairo.so.2
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/local/lib/libgdk_pixbuf-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgdk_pixbuf-2.0.so.0
Reading symbols from /usr/local/lib/libgio-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgio-2.0.so.0
Reading symbols from /usr/local/lib/libpangoft2-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpangoft2-1.0.so.0
Reading symbols from /usr/local/lib/libpango-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpango-1.0.so.0
Reading symbols from /usr/local/lib/libgobject-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgobject-2.0.so.0
Reading symbols from /usr/local/lib/libglib-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libglib-2.0.so.0
Reading symbols from /usr/local/lib/libintl.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libintl.so.8
Reading symbols from /usr/local/lib/libfontconfig.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libfontconfig.so.1
Reading symbols from /usr/local/lib/libfreetype.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libfreetype.so.6
Reading symbols from /usr/local/lib/libXrender.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXrender.so.1
Reading symbols from /usr/local/lib/libXinerama.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXinerama.so.1
Reading symbols from /usr/local/lib/libXi.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXi.so.6
Reading symbols from /usr/local/lib/libXrandr.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXrandr.so.2
Reading symbols from /usr/local/lib/libXcursor.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXcursor.so.1
Reading symbols from /usr/local/lib/libgmodule-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgmodule-2.0.so.0
Reading symbols from /usr/local/lib/libXcomposite.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXcomposite.so.1
Reading symbols from /usr/local/lib/libXdamage.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXdamage.so.1
Reading symbols from /usr/local/lib/libXfixes.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXfixes.so.3
Reading symbols from /usr/local/lib/libgthread-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgthread-2.0.so.0
Reading symbols from /usr/local/lib/libharfbuzz.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libharfbuzz.so.0
Reading symbols from /usr/local/lib/libpixman-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpixman-1.so.0
Reading symbols from /usr/local/lib/libEGL.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libEGL.so.1
Reading symbols from /usr/local/lib/libpng16.so.16...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpng16.so.16
Reading symbols from /usr/local/lib/libxcb-shm.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxcb-shm.so.0
Reading symbols from /usr/local/lib/libxcb-render.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxcb-render.so.0
Reading symbols from /lib/libz.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/local/lib/libGL.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libGL.so.1
Reading symbols from /usr/local/lib/libffi.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libffi.so.6
Reading symbols from /usr/local/lib/libiconv.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.2
Reading symbols from /usr/local/lib/libpcre.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpcre.so.1
Reading symbols from /usr/local/lib/libexpat.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libexpat.so.1
Reading symbols from /usr/lib/libbz2.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbz2.so.4
Reading symbols from /usr/local/lib/libgraphite2.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgraphite2.so.3
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/local/lib/libnvidia-glsi.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnvidia-glsi.so.1
Reading symbols from /usr/local/lib/libnvidia-tls.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnvidia-tls.so.1
Reading symbols from /usr/local/lib/libnvidia-glcore.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnvidia-glcore.so.1
Reading symbols from /usr/lib/libc++.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc++.so.1
Reading symbols from /lib/libcxxrt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcxxrt.so.1
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000000080151e6ba in thr_kill () from /lib/libc.so.7
[New Thread 80280b400 (LWP 100126/<unknown>)]
Comment 6 Marco Beishuizen 2015-09-26 13:03:10 UTC
marco@yokozuna:~ % ldd /usr/local/bin/nvidia-settings
/usr/local/bin/nvidia-settings:
        libXxf86vm.so.1 => /usr/local/lib/libXxf86vm.so.1 (0x800853000)
        libjansson.so.4 => /usr/local/lib/libjansson.so.4 (0x800a57000)
        libX11.so.6 => /usr/local/lib/libX11.so.6 (0x800c64000)
        libXext.so.6 => /usr/local/lib/libXext.so.6 (0x800f9e000)
        libm.so.5 => /lib/libm.so.5 (0x8011af000)
        libc.so.7 => /lib/libc.so.7 (0x8013d8000)
        libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x801785000)
        librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x8019a4000)
        libXau.so.6 => /usr/local/lib/libXau.so.6 (0x801bad000)
        libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x801daf000)
        libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x801fb0000)
Comment 7 Marco Beishuizen 2015-09-26 13:04:34 UTC
marco@yokozuna:~ % ldd /usr/local/lib/libnvidia-gtk2.so.355.11
/usr/local/lib/libnvidia-gtk2.so.355.11:
        libgtk-x11-2.0.so.0 => /usr/local/lib/libgtk-x11-2.0.so.0 (0x801800000)
        libgdk-x11-2.0.so.0 => /usr/local/lib/libgdk-x11-2.0.so.0 (0x801e37000)
        libpangocairo-1.0.so.0 => /usr/local/lib/libpangocairo-1.0.so.0 (0x8020e8000)
        libatk-1.0.so.0 => /usr/local/lib/libatk-1.0.so.0 (0x8022f5000)
        libcairo.so.2 => /usr/local/lib/libcairo.so.2 (0x80251e000)
        libthr.so.3 => /lib/libthr.so.3 (0x802835000)
        libgdk_pixbuf-2.0.so.0 => /usr/local/lib/libgdk_pixbuf-2.0.so.0 (0x802a5a000)
        libgio-2.0.so.0 => /usr/local/lib/libgio-2.0.so.0 (0x802c7a000)
        libpangoft2-1.0.so.0 => /usr/local/lib/libpangoft2-1.0.so.0 (0x802fe3000)
        libpango-1.0.so.0 => /usr/local/lib/libpango-1.0.so.0 (0x8031f7000)
        libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0x803448000)
        libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x803690000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x803998000)
        libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x803ba3000)
        libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x803de3000)
        libc.so.7 => /lib/libc.so.7 (0x800821000)
        libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x804082000)
        libXinerama.so.1 => /usr/local/lib/libXinerama.so.1 (0x80428b000)
        libXi.so.6 => /usr/local/lib/libXi.so.6 (0x80448d000)
        libXrandr.so.2 => /usr/local/lib/libXrandr.so.2 (0x80469b000)
        libXcursor.so.1 => /usr/local/lib/libXcursor.so.1 (0x8048a3000)
        libXext.so.6 => /usr/local/lib/libXext.so.6 (0x804aad000)
        libgmodule-2.0.so.0 => /usr/local/lib/libgmodule-2.0.so.0 (0x804cbe000)
        libX11.so.6 => /usr/local/lib/libX11.so.6 (0x804ec1000)
        libXcomposite.so.1 => /usr/local/lib/libXcomposite.so.1 (0x8051fb000)
        libXdamage.so.1 => /usr/local/lib/libXdamage.so.1 (0x8053fd000)
        libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x8055ff000)
        libm.so.5 => /lib/libm.so.5 (0x805804000)
        libgthread-2.0.so.0 => /usr/local/lib/libgthread-2.0.so.0 (0x805a2d000)
        libharfbuzz.so.0 => /usr/local/lib/libharfbuzz.so.0 (0x805c2e000)
        libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0x805e85000)
        libEGL.so.1 => /usr/local/lib/libEGL.so.1 (0x80612c000)
        libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x806427000)
        libxcb-shm.so.0 => /usr/local/lib/libxcb-shm.so.0 (0x80665c000)
        libxcb-render.so.0 => /usr/local/lib/libxcb-render.so.0 (0x80685e000)
        libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x806a67000)
        libz.so.6 => /lib/libz.so.6 (0x806c86000)
        libGL.so.1 => /usr/local/lib/libGL.so.1 (0x806e9c000)
        libffi.so.6 => /usr/local/lib/libffi.so.6 (0x8071d2000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x8073d9000)
        libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x8076d3000)
        libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x807949000)
        libbz2.so.4 => /usr/lib/libbz2.so.4 (0x807b70000)
        librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x807d82000)
        libgraphite2.so.3 => /usr/local/lib/libgraphite2.so.3 (0x807f8b000)
        librt.so.1 => /usr/lib/librt.so.1 (0x8081be000)
        libnvidia-glsi.so.1 => /usr/local/lib/libnvidia-glsi.so.1 (0x8083c3000)
        libXau.so.6 => /usr/local/lib/libXau.so.6 (0x808648000)
        libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x80884a000)
        libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x808a4b000)
        libnvidia-tls.so.1 => /usr/local/lib/libnvidia-tls.so.1 (0x808c50000)
        libnvidia-glcore.so.1 => /usr/local/lib/libnvidia-glcore.so.1 (0x809000000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x80bb3a000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80bdfb000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80c017000)
Comment 8 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-26 13:09:54 UTC
Can you please remove this line from your Makefile and rebuild port:

LDFLAGS+=       -Wl,--as-needed
Comment 9 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-26 13:10:02 UTC
Can you please remove this line from your Makefile and rebuild port:

LDFLAGS+=       -Wl,--as-needed
Comment 10 Marco Beishuizen 2015-09-26 13:15:56 UTC
Still the same error and coredump.
Comment 11 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-26 13:18:00 UTC
If you start it this way it also dies?

$ LD_PRELOAD=/lib/libthr.so.3 nvidia-settings
Comment 12 Marco Beishuizen 2015-09-26 13:20:50 UTC
This stops with:

marco@yokozuna:~ % LD_PRELOAD=/lib/libthr.so.3 nvidia-settings
LD_PRELOAD=/lib/libthr.so.3: Command not found.
Comment 13 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-26 13:25:53 UTC
OK. For tcsh try this:

$ setenv LD_PRELOAD /lib/libthr.so.3
$ nvidia-settings
Comment 14 Marco Beishuizen 2015-09-26 13:32:03 UTC
Yes, this works!
Comment 15 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-26 13:33:16 UTC
Great. Let me think how to fix it tomorrow. It's too late here :(
Comment 16 Marco Beishuizen 2015-09-26 13:35:59 UTC
:) sure no problem.
Comment 17 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-09-27 06:51:18 UTC
Somehow in your case pthreads is not pulled in.

Do you have any custom options for glib build etc?
Comment 18 Marco Beishuizen 2015-09-27 10:10:03 UTC
Not that I know of but I'll look into it.
Comment 19 Marco Beishuizen 2015-09-27 20:48:47 UTC
Couldn't find any custom options for glib. All default on my system.

My make.conf:
CPUTYPE?=nocona
KERNCONF=AKIRA
FORCE_PKG_REGISTER=yes
OPTIONS_UNSET=CUPS HAL GCONF DCONF JAVA GVFS RUBY AVAHI
OPTIONS_SET=LPR
DEVELOPER=yes
SENDMAIL_CF_DIR=/usr/local/share/sendmail/cf
Comment 20 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-10-04 11:06:09 UTC
Just a note that so far this problem seems to be specific to your system only.

The root cause for that is unclear. Basically at least libgthread must be linked against pthreads (libthr). Somehow it is not the case.

Can you please try to do forced rebuild of glib (incl. libgthread) and collect build log for analysis?
Comment 21 Tomoaki AOKI 2015-10-05 09:34:33 UTC
(In reply to Alexander Nedotsukov from comment #20)

Not only Marco, but also (at least) me.
Previous version in ports worked fine without LDPRELOAD=/lib/libthr.so.3.


FYI: libgthread-2.0.so.0 is linked against /lib/libthr.so.3 as below.


#ldd /usr/local/lib/libgthread-2.0.so.0
/usr/local/lib/libgthread-2.0.so.0:
	libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x801601000)
	libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x801909000)
	libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x801c07000)
	libintl.so.8 => /usr/local/lib/libintl.so.8 (0x801e7d000)
	libthr.so.3 => /lib/libthr.so.3 (0x802088000)
	libc.so.7 => /lib/libc.so.7 (0x800821000)


stable/10 amd64, r288599.
Comment 22 prmz 2015-10-06 08:54:03 UTC
There is the same issue on my system :(
Comment 23 Jeffrey Baitis 2015-10-14 18:55:38 UTC
Multiple users have confirmed that this issue exists in PCBSD:
https://bugs.pcbsd.org/issues/11079

If I build this port, I encounter the same behaviour. The binary indeed executes with LD_PRELOAD=/lib/libthr.so.3
Comment 24 Kris Moore freebsd_committer freebsd_triage 2015-10-20 16:34:58 UTC
AFAIK this isn't a PC-BSD / glib issue. This is from our PC-BSD 10.2 build:

# ldd /usr/local/lib/libgthread-2.0.so
/usr/local/lib/libgthread-2.0.so:
        libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x801601000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x801908000)
        libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x801c02000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x801e77000)
        libthr.so.3 => /lib/libthr.so.3 (0x802082000)
        libc.so.7 => /lib/libc.so.7 (0x800821000)

If I build an older version of nvidia-settings, it works fine. Its only when I build newer nvidia-settings 355.11 that it fails.
Comment 25 Kris Moore freebsd_committer freebsd_triage 2015-10-20 16:36:20 UTC
Created attachment 162247 [details]
Fix to include libthr

The following patch corrects the startup problem here on PC-BSD 10.2
Comment 26 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-10-21 07:37:34 UTC
Kris, can you please try to rebuild without LDFLAGS in Makefile?
Comment 27 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-10-21 07:48:12 UTC
(In reply to Alexander Nedotsukov from comment #26)

Actually since GTK optionality seems to be a culprit LDFLAGS=-pthread would make more sense.
Comment 28 Tomoaki AOKI 2015-10-21 12:30:51 UTC
Kris's patch helped for me.

And also, Alexander's suggestion helped, too.
What I did for testing it is just adding -pthread with leading whitespace
to existing LDFLAGS+= line in Makefile. (Without Kris'es patch in this case.)

Thanks!
Comment 29 Gordon Hartley 2015-11-03 05:12:18 UTC
Also had this problem on 10.2-RELEASE-p6.

Can confirm Kris's patch solved the problem for me too. Thanks!
Comment 30 drhowarddrfine 2015-11-12 20:26:08 UTC
I just ran into this issue and see the patch is in to fix it. Is there a delaying in releasing this for ports?
Comment 31 Vladimir Omelchuk 2015-11-15 11:40:30 UTC
Kris's patch helped for me too.
Need add patch into port.
Comment 32 commit-hook freebsd_committer freebsd_triage 2015-11-15 13:25:43 UTC
A commit references this bug:

Author: bland
Date: Sun Nov 15 13:25:38 UTC 2015
New revision: 401703
URL: https://svnweb.freebsd.org/changeset/ports/401703

Log:
  Fixup issue with implicit pthread linkage.

  Still curious to understand why it is needed at the first place as libgthread
  supposed to pull the dependency.

  PR:	203372

Changes:
  head/x11/nvidia-settings/Makefile
Comment 33 Alexander Nedotsukov freebsd_committer freebsd_triage 2015-11-15 13:32:58 UTC
Sorry for delay. Obviously I can't get a time to take deep dive into problem so pushing this out.

The real question is why application which make no direct use of pthreads is forced to be explicitly linked to pthreads library. Gtk pulls libgthtread which in turn pulls pthreads. Something smells fishy around dlopen() call.