Undefined references to nv_vasprintf_* symbols in libnvidia-glcore.so.367.27

Hello,

Following an update from 358.16 to 367.27, I can’t complete a compilation of my Qt-based console project (64bit).
Linking fails with the following errors:
/usr/lib64/nvidia/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_alloc' /usr/lib64/nvidia/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_vsnprintf’
/usr/lib64/nvidia/libnvidia-glcore.so.367.27: undefined reference to `nv_vasprintf_free’

This is on my Fedora 24 box, with GTX 970M, but I doubt that it’s relevant.

I found several other people with the same problem on different projects and different systems:
CodeLite on FreeBSD
Firefox on FreeBSD
Tellico w/ KDE
KDE’s kiconfinder on Gentoo
MakeMKV, LEAP on OpenSUSE
PLD-Linux packaging log
(There are more)

Is this a known issue? Can someone on NVIDIA’s part confirm or deny that there was a mistake in the release of 367.27?
Of course, a fix for this problem will be much appreciated (and the sooner the better).

Best regards,
Itzik

To make sure that this is not a packaging issue, I downloaded the driver straight from NVIDIA, extracted the contents and searched for such undefined symbols. They appear as undefined in both ‘libnvidia_glcore.so.367.27’ and ‘libnvidia_eglcore.so.367.27’ and in both 32 and 64 bit versions.
No other ‘so’ included with the driver seem to define these symbols.

I also checked several previous driver versions: 358.16, 364.19 and 367.18.
None of them have these symbols declared in any of the shared object files, only typical ‘sprintf’ variations from glibc.

So I guess the ball is in your court now, NVIDIA.
I’ll be glad to provide any other information and/or help with testing.

Thank you for your consideration.

I am experiencing the same issue right now using driver 367.27 from the NVIDIA installer on Linux Mint 18.

However, it only appears if I passed “–no-glvnd-glx-client” to the driver installer, which in my case is necessary for the NVIDIA Linux Graphics Debugger to work as described here: https://devtalk.nvidia.com/default/topic/929075/linux-graphics-debugger/linux-graphics-debugger-tool-doesn-t-work-with-nvidia-36x-drivers/

Same issue here. The 367.27 driver breaks many of the FreeBSD ports I’ve tried to install so far on my new GTX-1080 system: firefox, chromium, xfce, kodi…

Same issue goes for me with the above mentioned driver upgrade. My system is opensuse 42.1 with a GeForce GTX TITAN.

I’m having a similar issue. Trying to build VTK http://www.vtk.org/Wiki/VTK/Configure_and_Build#Download_VTK_Source_code
and I get these errors:
/usr/lib64/nvidia/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_vsnprintf' /usr/lib64/nvidia/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_alloc’
/usr/lib64/nvidia/libnvidia-glcore.so.367.27: undefined reference to `nv_vasprintf_free’

Maybe it’s a bug with how the distros install the nvidia driver package? Applications shouldn’t ever need to link against libnvidia-glcore.so, just libGL.so.
I’ve built all the packages mentioned in this thread by hand, and each one compiles and runs just fine (Gentoo).

So could you reemerge for example harfbuzz package without any error when you’ve got set eselect opengl set nvidia?

If yes, could you tell me exactly how did you make it? I’m new user of Gentoo.

dargo ~ # eselect opengl set nvidia
Switching to nvidia OpenGL interface… done
dargo ~ # source /etc/profile
dargo ~ # glxinfo | grep NVIDIA
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL core profile version string: 4.5.0 NVIDIA 367.27
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL version string: 4.5.0 NVIDIA 367.27
OpenGL shading language version string: 4.50 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 367.27
dargo ~ # emerge --nodeps -pv harfbuzz

These are the packages that would be merged, in order:

[ebuild R ] media-libs/harfbuzz-1.2.7:0/0.9.18::gentoo USE=“cairo fontconfig glib graphite icu introspection truetype -static-libs {-test}” ABI_X86=“32 (64) (-x32)” 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
dargo ~ # emerge --nodeps --quiet-build=y harfbuzz

Verifying ebuild manifests
Emerging (1 of 1) media-libs/harfbuzz-1.2.7::gentoo
Installing (1 of 1) media-libs/harfbuzz-1.2.7::gentoo
Jobs: 1 of 1 complete Load avg: 2.20, 0.91, 0.45
Auto-cleaning packages…

EDIT: I don’t see that any of the libraries and executables generated by the harfbuzz package
pull in OpenGL, at least not statically. Neither do for example firefox, kiconfinder.

What use flags do you use for the x11-libs/cairo package ?

supra@supra-laptop ~ $ sudo emerge -pv cairo

These are the packages that would be merged, in order:

Calculating dependencies… done!
[ebuild R ] x11-libs/cairo-1.14.6::gentoo USE=“X glib opengl svg xcb (-aqua) -debug (-directfb) (-gles2) -static-libs -valgrind -xlib-xcb” ABI_X86=“32 (64) (-x32)” 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

mlau, it looks like the nvidia version of libGL.so references libnvidia-glcore.so, so it’s an indirect link.

Applicatiosn linked against the non-nvidia version of libGL.so don’t have any links to libnvidia-glcore.so (per the ff ticket oranga linked, echo ‘int main() { }’ | cc -xc - -L/usr/local/lib -lGL, runs fine against Mesa’s libGL.so).

But with nvidia libGL.so…
cd NVIDIA-FreeBSD-x86_64-367.27 && make clean && make DESTDIR=/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest install

[build@htpc:/b/inst/NVIDIA-FreeBSD-x86_64-367.27]$ echo 'int main() { }' | cc -xc - -L/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib -lGL
/usr/bin/ld: warning: libnvidia-tls.so.1, needed by /b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvidia-glcore.so.1, needed by /b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so, not found (try using -rpath or -rpath-link)
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv001glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv006tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv021tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv008tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv023glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv016glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv020glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv018glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv017tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv011tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv000glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv013tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv015glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv009tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv007tls'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv017glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv024glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv014glcore'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libGL.so: undefined reference to `_nv027glcore'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
[build@htpc:/b/inst/NVIDIA-FreeBSD-x86_64-367.27]$ echo 'int main() { }' | cc -xc - -L/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib -lGL -lnvidia-tls -lnvidia-glcore
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libnvidia-glcore.so: undefined reference to `nv_vasprintf_alloc'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libnvidia-glcore.so: undefined reference to `nv_vasprintf_free'
/b/inst/NVIDIA-FreeBSD-x86_64-367.27/dest/usr/local/lib/libnvidia-glcore.so: undefined reference to `nv_vasprintf_vsnprintf'
cc: error: linker command failed with exit code 1 (use -v to see invocation)

So nvidia libGL.so --> libnvidia-glcore.so, and version 367.27 of libnvidia-glcore.so contains undefined refs to ‘nv_vasprintf_alloc’, ‘nv_vasprintf_free’, and ‘nv_vasprintf_vsnprintf’.

I’ve added the opengl use to my local cairo, and still all packagaes mentioned in the first post build just fine. only difference is that some now require libGL (through their cairo dependency), but no package tries to link directly to libnvidia-glcore.

EDIT: Oh, I see, that happens when the non-glvnd libGL from the nvidia driver package is installed.

Okay then, so what’s resolving problem?

Seems to be solved in 367.35

Approved. I haven’t got any problem with compiling cairo or harfbuzz.