I'm currently trying to build, under Fedora 25, a large (proprietary) software that uses OpenGL. That software used to build so far. However, the build fails at the link step, with the following error : /usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64/libGL.so: undefined reference to `_glapi_tls_Current' However the symbol is define in libGLdispatch.so, as the following bash loop executed in /usr/lib64 shows : $ for f in *.so; do nm -D $f 2>/dev/null | grep -i glapi_tls_Current | awk '{print "'$f':" $0}'; done libGLdispatch.so:0000000000000000 D _glapi_tls_Current libGLESv1_CM.so: U _glapi_tls_Current libGLESv2.so: U _glapi_tls_Current libGL.so: U _glapi_tls_Current libOpenGL.so: U _glapi_tls_Current The version of are as follows : libGLdispatch.so -> libGLdispatch.so.0.0.0 libGLESv1_CM.so -> libGLESv1_CM.so.1.0.0 libGLESv2.so -> libGLESv2.so.2.0.0 libGL.so -> libGL.so.1.0.0 libOpenGL.so -> libOpenGL.so.0.0.0 I'm building with the flags -lGL and -lGLU and I'm using the nvidia proprietary drivers, linked to the kernel with akmod. Thank you for helping solving this issue.
Can you post rpm -qa *\nvidia\*
Yes. Here is the output : xorg-x11-drv-nvidia-libs-375.51-3.fc23.x86_64 kmod-nvidia-4.10.8-200.fc25.x86_64-375.51-2.fc25.x86_64 xorg-x11-drv-nvidia-375.51-3.fc23.x86_64 kmod-nvidia-4.10.6-200.fc25.x86_64-375.39-2.fc25.x86_64 kmod-nvidia-4.9.14-200.fc25.x86_64-375.39-2.fc25.x86_64 xorg-x11-drv-nvidia-kmodsrc-375.51-3.fc23.x86_64 akmod-nvidia-375.51-2.fc23.x86_64
You are using the nvidia cuda repository, so your driver was updated to 375.51 That been said, you shouldn't need the nvidia driver at all to link to -lGL You should use the mesa gl headers (or even the one from khronos directly). That been said, it should work. (note that you are missing the xorg-x11-drv-nvidia-devel that has the nvidia headers in /usr/include/nvidia and symlinks in /usr/lib64/nvidia, if really needed).
That been said, you should have any issue to link with -lGL with libglvnd...
I have libglvnd-devel installed and I have no issues with the headers, the build error is purely when trying to link some .o files into an executable...
This is really crippling me for my job. How can I downgrade the driver or whatever to make everything work again ?
(In reply to N.Brack from comment #6) > This is really crippling me for my job. How can I downgrade the driver or > whatever to make everything work again ? You need to add libglapi to the lists of libraries to which your lib / app links to fix this. Add -lglapi to the linker commandline should do the trick.
It didn't work. I now have the -lglapi flag added to the link command line, but I still have error /usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64/libGL.so: undefined reference to `_glapi_tls_Current'
Ah right, looks like you need -lGLdispatch but something is weird on your system, here on my system: [hans@shalem ~]$ ldd -r /usr/lib64/libGL.so linux-vdso.so.1 (0x00007fffc977f000) libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f93f1692000) libX11.so.6 => /lib64/libX11.so.6 (0x00007f93f1353000) libXext.so.6 => /lib64/libXext.so.6 (0x00007f93f1141000) libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f93f0e8b000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f93f0c87000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f93f0a67000) libc.so.6 => /lib64/libc.so.6 (0x00007f93f06a1000) libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f93f0479000) /lib64/ld-linux-x86-64.so.2 (0x0000558bb0aaf000) libXau.so.6 => /lib64/libXau.so.6 (0x00007f93f0275000) Note no unresolved symbols, so your libGL.so is different from mine ? What is the output of: [hans@shalem ~]$ rpm -qf /usr/lib64/libGL.so /usr/lib64/libGL.so.1 libglvnd-devel-0.2.999-10.gitdc16f8c.fc25.x86_64 libglvnd-glx-0.2.999-10.gitdc16f8c.fc25.x86_64 [hans@shalem ~]$ rpm --verify libglvnd-glx libglvnd-devel [hans@shalem ~]$ On your system ? Do you really need those ancient f23 nvidia pkgs ? Those are the likely cause of your problems.
Actually my libGLdispatch.so is different ! I didn't notice I had two installed ! $ ldd -r libGL.so linux-vdso.so.1 (0x00007fff121c6000) libGLX.so.0 => /lib64/libGLX.so.0 (0x00007fb2065b5000) libX11.so.6 => /lib64/libX11.so.6 (0x00007fb206276000) libXext.so.6 => /lib64/libXext.so.6 (0x00007fb206064000) libGLdispatch.so.0 => /usr/lib64/nvidia/libGLdispatch.so.0 (0x00007fb205d7b000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fb205b77000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb205957000) libc.so.6 => /lib64/libc.so.6 (0x00007fb205591000) libxcb.so.1 => /lib64/libxcb.so.1 (0x00007fb205369000) /lib64/ld-linux-x86-64.so.2 (0x000055dfc5048000) libXau.so.6 => /lib64/libXau.so.6 (0x00007fb205165000) Using nm, that libGLdispatch in /usr/lib64/nvidia doesn't seem to have any _glapi_tls_Current symbol defined or referenced, so I guess it's the error. I manually add -lGLdispatch, and it seems to build against /usr/lib64/libGLdispatch.so, so it works. For sake of completeness here is the output of the last commands you issued : $ rpm -qf /usr/lib64/libGL.so /usr/lib64/libGL.so.1 libglvnd-devel-0.2.999-14.20170308git8e6e102.fc25.x86_64 libglvnd-glx-0.2.999-14.20170308git8e6e102.fc25.x86_64 $ rpm --verify libglvnd-glx $ rpm --verify libglvnd-devel
(In reply to N.Brack from comment #10) > Actually my libGLdispatch.so is different ! I didn't notice I had two > installed ! > > $ ldd -r libGL.so > linux-vdso.so.1 (0x00007fff121c6000) > libGLX.so.0 => /lib64/libGLX.so.0 (0x00007fb2065b5000) > libX11.so.6 => /lib64/libX11.so.6 (0x00007fb206276000) > libXext.so.6 => /lib64/libXext.so.6 (0x00007fb206064000) > libGLdispatch.so.0 => /usr/lib64/nvidia/libGLdispatch.so.0 > (0x00007fb205d7b000) Yeah, so that is from an older libglvnd (the binary driver includes libglvnd) and you really should start using a newer pkg which does not include an old libglvnd copy, or alternatively remove the ld.so.conf.d file the pkg is dropping, as that should not longer be necessary under F25.
After several days waiting for an update, I can confirm : I do have all the latest packages. The file /usr/lib64/nvidia/libGLdispatch.so.0 is owned by package xorg-x11-drv-nvidia-libs, which is at its latest version. Uninstalling the package causes the file to disappear, reinstalling causes it to reappear. What am I supposed to do with the ld.so.conf.d ? It points to ld.so.conf.d, but the package do own files over there...
> What am I supposed to do with the ld.so.conf.d ? It points to ld.so.conf.d, > but the package do own files over there... I meant it contains a file nvidia-lib64.conf that points to /usr/lib64/nvidia. Do I simply ignore nvidia's libraries and make it point to /usr/lib64 ?
(In reply to N.Brack from comment #12) > After several days waiting for an update, I can confirm : I do have all the > latest packages. The file /usr/lib64/nvidia/libGLdispatch.so.0 is owned by > package xorg-x11-drv-nvidia-libs, which is at its latest version. > Uninstalling the package causes the file to disappear, reinstalling causes > it to reappear. Which is the version of the package and where did you get it from ? For f25, the current xorg-x11-drv-nvidia packages provided by RPM Fusion is not providing /usr/lib64/nvidia/libGLdispatch.so.0 anymore (it relies on libglvnd instead).S o you might have an outdated repository.
(In reply to N.Brack from comment #2) > Yes. Here is the output : > > xorg-x11-drv-nvidia-libs-375.51-3.fc23.x86_64 This packages comes from the nvidia-cuda repository and have replaced the one from RPM Fusion. You need to exclude the nvidia-cuda packages from the cuda.repo and downgrade to the RPM Fusion version
Created attachment 1272545 [details] Output of dnf list available 'xorg-x11-drv-nvidia*' There's no xorg-x11-drv-nvidia-libs for 64bits in rpmfusion. I attached what I get using `dnf list available`. I can see only a 32-bit version of xorg-x11-drv-nvidia-libs and no packages xorg-x11-drv-nvidia at all...
(In reply to N.Brack from comment #16) > Created attachment 1272545 [details] > Output of dnf list available 'xorg-x11-drv-nvidia*' > > There's no xorg-x11-drv-nvidia-libs for 64bits in rpmfusion. I attached > what I get using `dnf list available`. > > I can see only a 32-bit version of xorg-x11-drv-nvidia-libs and no packages > xorg-x11-drv-nvidia at all... Your command was limited, try dnf --showduplicates list available 'xorg-x11-drv-nvidia*' instead
Oh, yes I have the install xorg-x11-drv-nvidia in bright green and underlined and the one from rpmfusion in dark teal. I uninstalled the xorg-x11-drv-nvidia from cuda and reinstalled it. Dnf pulled it from rpmfusion and now it works : ldd libGL.so linux-vdso.so.1 (0x00007ffcbb7a5000) libGLX.so.0 => /lib64/libGLX.so.0 (0x00007fcf48415000) libX11.so.6 => /lib64/libX11.so.6 (0x00007fcf480d6000) libXext.so.6 => /lib64/libXext.so.6 (0x00007fcf47ec4000) libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007fcf47c0e000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fcf47a0a000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcf477ea000) libc.so.6 => /lib64/libc.so.6 (0x00007fcf47424000) libxcb.so.1 => /lib64/libxcb.so.1 (0x00007fcf471fc000) /lib64/ld-linux-x86-64.so.2 (0x0000563c0e313000) libXau.so.6 => /lib64/libXau.so.6 (0x00007fcf46ff8000) I did not get everything of what's going on, but thank you so much for your support ! I do really appreciate it !