Created attachment 149256 [details] Build Log The port fails to build due to a conflict with "libEGL-9.1.7_4" and possibly others. The older version of "nvidia-driver" was installed and worked fine on this system. The build log is attached. # uname -a FreeBSD scorpio.seibercom.net 10.0-RELEASE-p9 FreeBSD 10.0-RELEASE-p9 #0: Mon Sep 15 14:35:52 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
Fix synopsis and assign to maintainer.
It looks like the port does some trickery to install libGL.so to .nvidia, and then hardlinks it to /usr/local/lib/libGL.so at install time. I think this needs to be done for libEGL.so and libGLESv2.so, and it also needs handling in the mesa versions (graphics/libEGL and graphics/libGLESv2 ports).
The change on line 302 of the Makefile in the last commit is the culprit. Reverting that change resolves the conflict as nvidia-driver will only install libGL, not libEGL or libglesv2. nvidia-driver conflicts with Mesa 10.3 exactly the same way. There is no build failure, the title is wrong. It is only a conflict caused by the blob throwing bits outside it's playpen.
To be more explicit, since there was another commit today, it was the change on line 302 in r372382 that causes the conflict.
I just tried to install the latest commit and it still failed: ===> Registering installation for nvidia-driver-340.46 pkg-static: nvidia-driver-340.46 conflicts with libEGL-9.1.7_4 (installs files into the same place). Problematic file: /usr/local/lib/libEGL.so To use these drivers, make sure that you have loaded the NVidia kernel module, by doing # kldload nvidia or adding nvidia_load="YES" to your /boot/loader.conf. If you build this port with FreeBSD AGP GART driver, make sure you have agp.ko kernel module installed and loaded, since nvidia.ko will depend on it, or have your kernel compiled with "device agp". Otherwise, the NVidia kernel module will not load. Also, please set correct value for ``Option "NvAGP"'' in ``Device'' section of your X11 configuration file. When building with Linux compatibility support, make sure that linux.ko module is available as well (or have it compiled in kernel). It can be loaded via /boot/loader.conf, or later in the boot process if you add linux_enable="YES" to your /etc/rc.conf. If X.org cannot start and reports (EE) NVIDIA(0): Failed to obtain a shared memory identifier. in /var/log/Xorg.0.log while actually you have ``options SYSVSHM'' enabled in kernel, the sysctl ``kern.ipc.shmall'' should be increased. See /usr/local/share/doc/NVIDIA_GLX-1.0/README for more information. *** Error code 70 Stop. make[1]: stopped in /usr/ports/x11/nvidia-driver *** Error code 1 Stop. make: stopped in /usr/ports/x11/nvidia-driver
*** Bug 194886 has been marked as a duplicate of this bug. ***
(In reply to Gerard Seibert from comment #5) > I just tried to install the latest commit and it still failed: Right; the latest commit (I presume you've meant ports 372606) was concerning legacy driver branch (304.xx) and did not address this very conflict. It will be handled in another commit after I work out the details with x11@.
Sounds like a man with a plan. Good luck, I really need this driver.
I ran into this as well while trying out Gnome 3 (didn't need libEGL before this). I'm attaching a patch that moves nvidia-driver libEGL aside.
Created attachment 149607 [details] [patch] move libEGL aside This fixes install of gnome3.
Caveat: I still need to test runtime. I'm not at the computer in question yet.
Well, this works quite well. I'm enjoying my shiny new Gnome 3 desktop accelerated by Nvidia right now.
Is there any ETA for a fix for this bug? I could test one if it is available.
Try my patch. I've been using it since the Gnome 3 import and it works for me.
(In reply to Nikolai Lifanov from comment #14) > Try my patch. I've been using it since the Gnome 3 import and it works for > me. I applied your patch and then tried to build the port. I am now getting a slightly different error message: ---> Installing the new version via the port ===> Installing for nvidia-driver-340.46_1 ===> nvidia-driver-340.46_1 depends on file: /compat/linux/etc/fedora-release - found ===> nvidia-driver-340.46_1 depends on file: /usr/local/libdata/pkgconfig/xorg-server.pc - found ===> nvidia-driver-340.46_1 depends on shared library: libGL.so - found (/usr/local/lib/libGL.so) ===> Registering installation for nvidia-driver-340.46_1 pkg-static: nvidia-driver-340.46_1 conflicts with libglesv2-10.3.2 (installs files into the same place). Problematic file: /usr/local/lib/libGLESv2.so To use these drivers, make sure that you have loaded the NVidia kernel module, by doing # kldload nvidia or adding nvidia_load="YES" to your /boot/loader.conf. If you build this port with FreeBSD AGP GART driver, make sure you have agp.ko kernel module installed and loaded, since nvidia.ko will depend on it, or have your kernel compiled with "device agp". Otherwise, the NVidia kernel module will not load. Also, please set correct value for ``Option "NvAGP"'' in ``Device'' section of your X11 configuration file. When building with Linux compatibility support, make sure that linux.ko module is available as well (or have it compiled in kernel). It can be loaded via /boot/loader.conf, or later in the boot process if you add linux_enable="YES" to your /etc/rc.conf. If X.org cannot start and reports (EE) NVIDIA(0): Failed to obtain a shared memory identifier. in /var/log/Xorg.0.log while actually you have ``options SYSVSHM'' enabled in kernel, the sysctl ``kern.ipc.shmall'' should be increased. See /usr/local/share/doc/NVIDIA_GLX-1.0/README for more information. *** Error code 70 Stop. make[1]: stopped in /usr/ports/x11/nvidia-driver *** Error code 1 Stop. make: stopped in /usr/ports/x11/nvidia-driver ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20141122-92600-192gkvy env make reinstall ** Fix the installation problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! x11/nvidia-driver (install error)
Created attachment 149714 [details] [patch] move libEGL and libGLESv2 aside Try this patch instead. It moves aside libGLESv2 in addition to libEGL.
Okay, it seems to be working. When patched, this was the output: /usr/ports/x11/nvidia-driver # patch < ./libGEL-patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: Makefile |=================================================================== |--- Makefile (revision 373062) |+++ Makefile (working copy) -------------------------- Patching file Makefile using Plan A... Hunk #1 succeeded at 13. Hunk #2 succeeded at 241. Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: pkg-plist |=================================================================== |--- pkg-plist (revision 373062) |+++ pkg-plist (working copy) -------------------------- Patching file pkg-plist using Plan A... Hunk #1 succeeded at 1. Hmm... Ignoring the trailing garbage. done The build went fine. I rebooted and then ran pciconf -l -v and got this: vgapci0@pci0:3:0:0: class=0x030000 card=0x00000000 chip=0x0a2010de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'GT216 [GeForce GT 220]' class = display subclass = VGA KDE is also now using the driver and the screen is much clearer. I have no idea though if there are any problems with other programs yet.
After several days, I have not experienced any problems with the port after the patch was applied. Will the nvidia-driver port be updated soon? I am sure others have had a problem with it also.
(In reply to Gerard Seibert from comment #18) > Will the nvidia-driver port be updated soon? I am sure others have had a problem with it also. Yes, the patch is in the works; proposed solutions (attached to this bug) are vastly incomplete; handling this conflict correctly would require patching all three libraries' (libGL, libEGL, libGLESv2) and NVidia driver port, both Makefiles and deinstall scripts. Some details can be found in 195080.
Created attachment 149887 [details] Make libEGL, libglesv2 and nvidia-driver do the same as they do for libGL already. This is my patch for the problem. I copied the method in the previous patch since that was a log nicer then what I came up with. For nvidia-driver did the following: Make sure libEGL.so and libGLESv2.so exist in the nvidia version before doing anything. This means in the Makefile and pkg-[de]install scripts, so we don't break the older ports :)
A commit references this bug: Author: kwm Date: Thu Nov 27 13:14:10 UTC 2014 New revision: 373483 URL: https://svnweb.freebsd.org/changeset/ports/373483 Log: Fix libEGL and libGLESv2 conflict between libEGL/libglesv2 and the nvidia-driver port in the same fashion it was done as the conflict with the libGL port. Mesa ports: Add pkg-[de]install scripts to handle the symlinks in the libEGL and libglesv2 port. Move pkg-[de]install scripts of libGL out of files/ Put the real mesa libraries into lib/.mesa so we don't have each port create a directory for it own use. Nvidia-driver: Only apply the libEGL.so and libGLESv2.so alternative install directory if nvidia-driver actually ships them. Copied from PR submitter, since it was much cleaner then my initial attempt. Make pkg-install script check if the nvidia-driver port installed the libEGL/libglesv2 libraries and only then make the symlinks. This should allow the script to work with the slave ports which don't install these libraries. Make the pkg-deinstall script check if the mesa version of the libEGL/libGLESv2 libraries are installed before trying to recreate the symlinks of those ports. PR: 194924 Submitted by: Gerard Seibert <gerard_seibert@outlook.com> Approved by: portmgr (angrybapt) Changes: head/graphics/libEGL/Makefile head/graphics/libEGL/pkg-deinstall head/graphics/libEGL/pkg-install head/graphics/libEGL/pkg-plist head/graphics/libGL/Makefile head/graphics/libGL/bsd.mesalib.mk head/graphics/libGL/files/pkg-deinstall.in head/graphics/libGL/files/pkg-install.in head/graphics/libGL/files-old/pkg-deinstall.in head/graphics/libGL/files-old/pkg-install.in head/graphics/libGL/pkg-deinstall head/graphics/libGL/pkg-install head/graphics/libGL/pkg-plist head/graphics/libglesv2/Makefile head/graphics/libglesv2/pkg-deinstall head/graphics/libglesv2/pkg-install head/graphics/libglesv2/pkg-plist head/x11/nvidia-driver/Makefile head/x11/nvidia-driver/files/pkg-deinstall.in head/x11/nvidia-driver/files/pkg-install.in head/x11/nvidia-driver/pkg-plist
The problem has been resolved. danfe@ if the solution isn't to your liking, I'm willing to work with you to get it into shape.