Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Feb 2014 07:14:54 -0800
From:      David Wolfskill <david@catwhisker.org>
To:        freebsd-ports@freebsd.org
Cc:        freebsd-x11@freebsd.org
Subject:   x11/nvidia-driver builds; fails install (staging issue?)
Message-ID:  <20140201151454.GN1620@albert.catwhisker.org>

next in thread | raw e-mail | index | archive | help

--z3ovhOgMYmj8MRdq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

My laptop (which I've had for about 4 years now) uses an Nvidia
Quadro FX 770M (G96GL); after an initial (brief) test of using the nv
driver, I switched to x11/nvidia-driver and have been using it since.

Now, I have multiple branches of FreeBSD on the laptop (stable/9,
stable/10, and head); each on its own slice.  And unless something
interferes with my ability to do so, I update each of these slices, as
well as the installed ports (which are -- with few exceptions -- only
built under stable/9, as /usr/local is common to each of the slices) on
a daily basis.

The general sequence of operations is:
* Boot from the stable/9 slice.
* While "portmaster -aF --index" is running, update stable/9.
* Reboot stable/9; smoke test.
* Update installed ports ("portmaster -ad --index").
* Update stable/10 sources.
* Reboot to stable/10.
* Update stable/10.
* Reboot stable/10; smoke test.
* Update head sources.
* Reboot to head.
* Update head.
* Reboot head; smoke test.
* Reboot -- usually to stable/9 -- for usual day-to-day work.

(With slight changes to the above numbers (and port update tools),
that approach has generally served me well for over a decade.)

Now, x11/nvidia-driver involves a (3rd-party) kernel module.  Therefore,
I include the line:

PORTS_MODULES=3Dx11/nvidia-driver

in /etc/src.conf -- for each of the slices/branches.  Thus, the laptop
gets a fair amount of practice building & installing that port.  And this
has tended to Just Work -- the notable exceptions are when there's a new
version of x11/nvidia-driver, just built under stable/9 (which populated
/usr/local/lib), then I switch to a different branch, and there's a
mis-match, causing nvidia-driver to whine.  In the past, running
"portmaster x11/nvdia-driver" (then unloading the old kernel module &
reloading the new one) has taken care of this.

Today, however, things Got Weird.  In a fairly bad way.

First, immediately after building the kernel proper, I see:

=2E..
objcopy --only-keep-debug kernel.debug kernel.symbols
objcopy --strip-debug --add-gnu-debuglink=3Dkernel.symbols kernel.debug ker=
nel
=3D=3D=3D> Ports module x11/nvidia-driver (all)
cd ${PORTSDIR:-/usr/ports}/x11/nvidia-driver; PATH=3D/usr/obj/usr/src/tmp/l=
egacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/leg=
acy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin=
:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/us=
r/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin  SRC_BASE=3D/usr/src  OSVERS=
ION=3D902506  WRKDIRPREFIX=3D/usr/obj/usr/src/sys/CANARY /usr/obj/usr/src/m=
ake.i386/make -B clean all

And then I get a dialog menu:
+[ ] ACPI_PM  ACPI Power Management support
+[x] DOCS     Build and/or install documentation
+[ ] LINUX    Linux compatibility support
+[ ] WBINVD   Flush CPU caches directly with WBINVD

Docs seem OK, so I leave that.  Depending on how much of the daily
routine I get through before I need to hop on the bike to catch a
train to get to work, it's not at all uncommon for me to perceive
a need to suspend the machine until after I've boarded the train,
then resume building head or read for a bit.

So I checked ACPI_PM.  I'm unclear on what "Linux compatibility support"
means for me, so I leave it alone.  I've no real clue what "WBINVD" is,
so I leave it alone.  The next thing from the typescript file:

=3D=3D=3D>  Found saved configuration for nvidia-driver-331.20
=3D=3D=3D> Fetching all distfiles required by nvidia-driver-331.20 for buil=
ding
=3D=3D=3D>  Extracting for nvidia-driver-331.20
=3D> SHA256 Checksum OK for NVIDIA-FreeBSD-x86-331.20.tar.gz.
=3D=3D=3D>  Patching for nvidia-driver-331.20
=3D=3D=3D>  Applying extra patch /common/ports/x11/nvidia-driver/files/extr=
a-patch-mk__nvidia.lib.mk
=3D=3D=3D>  Applying extra patch /common/ports/x11/nvidia-driver/files/extr=
a-patch-x11__driver__Makefile
=3D=3D=3D>   nvidia-driver-331.20 depends on file: /usr/local/libdata/pkgco=
nfig/glproto.pc - found
=3D=3D=3D>   nvidia-driver-331.20 depends on file: /usr/local/libdata/pkgco=
nfig/dri2proto.pc - found
=3D=3D=3D>   nvidia-driver-331.20 depends on file: /usr/local/libdata/pkgco=
nfig/xorg-server.pc - found
=3D=3D=3D>   nvidia-driver-331.20 depends on shared library: libGL.so - fou=
nd
=3D=3D=3D>  Configuring for nvidia-driver-331.20
=3D=3D=3D>  Building for nvidia-driver-331.20
=3D=3D=3D> src (all)
=2E..[boring build stuff elided -- dhw]...
ld -Bshareable  -d -warn-common -o nvidia.ko nvidia.kld
objcopy --strip-debug nvidia.ko
=3D=3D=3D> lib (all)
=3D=3D=3D> lib/libGL (all)
=3D=3D=3D> lib/libnvidia-tls (all)
=3D=3D=3D> lib/libnvidia-cfg (all)
=3D=3D=3D> lib/libnvidia-glcore (all)
=3D=3D=3D> lib/libvdpau_nvidia (all)
=3D=3D=3D> x11 (all)
=3D=3D=3D> x11/driver (all)
=3D=3D=3D> x11/extension (all)
=3D=3D=3D> doc (all)
--------------------------------------------------------------
>>> Kernel build for CANARY completed on Sat Feb  1 06:15:06 PST 2014
--------------------------------------------------------------
Sat Feb  1 06:15:06 PST 2014
/usr/ports /usr/src=20
/usr/ports/x11/nvidia-driver /usr/ports /usr/src=20
=3D=3D=3D>  Cleaning for nvidia-driver-331.20
/usr/ports /usr/src=20
/usr/ports/print/acroreadwrapper /usr/ports /usr/src=20
=3D=3D=3D>  Cleaning for acroreadwrapper-0.0.20130208
/usr/ports /usr/src=20
/usr/src=20
Sat Feb  1 06:15:06 PST 2014
--------------------------------------------------------------
>>> Installing kernel CANARY
--------------------------------------------------------------
cd /usr/obj/usr/src/sys/CANARY;  MAKEOBJDIRPREFIX=3D/usr/obj  MACHINE_ARCH=
=3Di386  MACHINE=3Di386  CPUTYPE=3D GROFF_BIN_PATH=3D/usr/obj/usr/src/tmp/l=
egacy/usr/bin  GROFF_FONT_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/share/grof=
f_font  GROFF_TMAC_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/share/tmac PATH=
=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin=
:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr=
/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp=
/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  /usr/obj/usr/src/make.i386/make  =
KERNEL=3Dkernel install
=2E..
kldxref /boot/kernel
=3D=3D=3D> Ports module x11/nvidia-driver (install)
cd ${PORTSDIR:-/usr/ports}/x11/nvidia-driver; PATH=3D/usr/obj/usr/src/tmp/l=
egacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/leg=
acy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin=
:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/us=
r/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin  SRC_BASE=3D/usr/src  OSVERS=
ION=3D902506  WRKDIRPREFIX=3D/usr/obj/usr/src/sys/CANARY /usr/obj/usr/src/m=
ake.i386/make -B deinstall deinstall reinstall
=3D=3D=3D>  Deinstalling for x11/nvidia-driver
=3D=3D=3D>   Deinstalling nvidia-driver-331.20
pkg_delete: '/boot/modules/nvidia.ko' fails original MD5 checksum - deleted=
 anyway.
pkg_delete: unable to completely remove directory '/compat/linux/usr/lib/vd=
pau'
pkg_delete: couldn't entirely delete package `nvidia-driver-331.20'
(perhaps the packing list is incorrectly specified?)

and now I see another dialog box:

+[ ] ACPI_PM  ACPI Power Management support
+[x] DOCS     Build and/or install documentation
+[ ] LINUX    Linux compatibility support
+[ ] WBINVD   Flush CPU caches directly with WBINVD

Err.... didn't we go through this already??!?

OK; fine.  I re-select ACPI_PM & hit Enter; then:

=3D=3D=3D>  Staging for nvidia-driver-331.20
=3D=3D=3D>   nvidia-driver-331.20 depends on file: /usr/local/libdata/pkgco=
nfig/xorg-server.pc - found
=3D=3D=3D>   nvidia-driver-331.20 depends on shared library: libGL.so - fou=
nd
=3D=3D=3D>   Generating temporary packing list
=3D=3D=3D> src (install)
install -o root -g wheel -m 555   nvidia.ko /usr/obj/usr/src/sys/CANARY/com=
mon/ports/x11/nvidia-driver/work/stage/boot/modules
=2E..
=3D=3D=3D=3D> Compressing man pages (compress-man)
=3D=3D=3D>  Building package for nvidia-driver-331.20
Creating package /usr/obj/usr/src/sys/CANARY/common/ports/x11/nvidia-driver=
/work/nvidia-driver-331.20.tbz
Registering depends: xorg-server-1.7.7_11,1 dri-7.6.1_3,2 libXxf86misc-1.0.=
3 libGL-7.6.1_4 libXxf86vm-1.1.3 libXinerama-1.1.3,1 libXaw-1.0.12,2 libXp-=
1.0.2,1 libXmu-1.1.2,1 libXpm-3.5.11 libXext-1.3.2,1 libXdamage-1.1.4 libXf=
ixes-5.0.1 libxkbui-1.0.2_1 libXt-1.1.4,1 hal-0.5.14_22 consolekit-0.4.3 po=
lkit-0.105_1 gobject-introspection-1.36.0_2 policykit-0.9_6 dbus-glib-0.100=
=2E2 glib-2.36.3_1 python-2.7_1,2 xkbcomp-1.2.4 libxkbfile-1.0.8 dbus-1.6.1=
8 libX11-1.6.2,1 python2-2_2 python27-2.7.6_1 gettext-0.18.3.1 libxcb-1.9.3=
 xkeyboard-config-2.10.1 libxml2-2.8.0_3 libiconv-1.14_1 icu-50.1.2 libffi-=
3.0.13_1 libdrm-2.4.17_1 libpciaccess-0.13.2 libpthread-stubs-0.3_4 libvolu=
me_id-0.81.1 pcre-8.33 pkgconf-0.9.4 perl5-5.16.3_6 gnomehier-3.0 pciids-20=
131225 libXfont-1.4.7,1 freetype2-2.5.2 dmidecode-2.12 gnome_subr-1.0 expat=
-2.1.0 fontsproto-2.1.2 libfontenc-1.1.2 damageproto-1.2.1 dri2proto-2.8 fi=
xesproto-5.0 kbproto-1.0.6 libSM-1.2.2,1 libICE-1.0.8,1 libXau-1.0.8 libXdm=
cp-1.1.1 pixman-0.32.4 printproto-1.0.5 xextproto-7.2.1 xf86miscproto-0.9.3=
 xf86vidmodeproto-2.3.1 xineramaproto-1.2.1 xproto-7.0.25.
Creating bzip'd tar ball in '/usr/obj/usr/src/sys/CANARY/common/ports/x11/n=
vidia-driver/work/nvidia-driver-331.20.tbz'
tar: lib/libEGL.so: Cannot stat: No such file or directory
tar: lib/libEGL.so.1: Cannot stat: No such file or directory
tar: lib/libGLESv1_CM.so: Cannot stat: No such file or directory
tar: lib/libGLESv1_CM.so.1: Cannot stat: No such file or directory
tar: lib/libGLESv2.so: Cannot stat: No such file or directory
tar: lib/libGLESv2.so.2: Cannot stat: No such file or directory
tar: lib/libnvidia-eglcore.so: Cannot stat: No such file or directory
tar: lib/libnvidia-eglcore.so.1: Cannot stat: No such file or directory
tar: lib/libnvidia-glsi.so: Cannot stat: No such file or directory
tar: lib/libnvidia-glsi.so.1: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
pkg_create: make_dist: tar command failed with code 256
*** [do-package] Error code 1

Stop in /common/ports/x11/nvidia-driver.
*** [install] Error code 1

Stop in /common/ports/x11/nvidia-driver.
*** [reinstall] Error code 1

Stop in /common/ports/x11/nvidia-driver.
*** [ports-install] Error code 1

Stop in /common/S1/obj/usr/src/sys/CANARY.
*** [installkernel] Error code 1

Stop in /usr/src.
*** [installkernel] Error code 1

Stop in /usr/src.


Well.  That's a disruption. :-(

Hmmm... so I figured that maybe it would benefit from a "normal"
port upgrade process.  I issue "portmaster x11/nvidia-driver".

=3D=3D=3D>>> Port directory: /usr/ports/x11/nvidia-driver

=3D=3D=3D>>> Gathering distinfo list for installed ports

=3D=3D=3D>>> Launching 'make checksum' for x11/nvidia-driver in background


And I get the dialog box again.  And I re-select ACPI_PM.  Then:

=3D=3D=3D>>> Gathering dependency list for x11/nvidia-driver from ports
=3D=3D=3D>>> Initial dependency check complete for x11/nvidia-driver

0;portmaster: x11/nvidia-driver^G
=3D=3D=3D>>> Starting build for x11/nvidia-driver <<<=3D=3D=3D

=3D=3D=3D>>> All dependencies are up to date

=3D=3D=3D>  Cleaning for nvidia-driver-331.20


And I get the dialog box again.  And I re-select ACPI_PM.  Then:

=3D=3D=3D>  License NVIDIA accepted by the user
=3D=3D=3D>  Found saved configuration for nvidia-driver-331.20
=3D=3D=3D> Fetching all distfiles required by nvidia-driver-331.20 for buil=
ding
=3D=3D=3D>  Extracting for nvidia-driver-331.20
=3D> SHA256 Checksum OK for NVIDIA-FreeBSD-x86-331.20.tar.gz.
=3D=3D=3D>  Patching for nvidia-driver-331.20
=3D=3D=3D>  Applying extra patch /common/ports/x11/nvidia-driver/files/extr=
a-patch-mk__nvidia.lib.mk
=3D=3D=3D>  Applying extra patch /common/ports/x11/nvidia-driver/files/extr=
a-patch-x11__driver__Makefile
=3D=3D=3D>   nvidia-driver-331.20 depends on file: /usr/local/libdata/pkgco=
nfig/glproto.pc - found
=3D=3D=3D>   nvidia-driver-331.20 depends on file: /usr/local/libdata/pkgco=
nfig/dri2proto.pc - found
=3D=3D=3D>   nvidia-driver-331.20 depends on file: /usr/local/libdata/pkgco=
nfig/xorg-server.pc - found
=3D=3D=3D>   nvidia-driver-331.20 depends on shared library: libGL.so - fou=
nd
=3D=3D=3D>  Configuring for nvidia-driver-331.20
=3D=3D=3D>  Building for nvidia-driver-331.20
=3D=3D=3D> src (all)
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
:> opt_acpi.h
x86 -> /usr/src/sys/x86/include
=2E..
ld -Bshareable  -d -warn-common -o nvidia.ko nvidia.kld
objcopy --strip-debug nvidia.ko
=3D=3D=3D> lib (all)
=3D=3D=3D> lib/libGL (all)
=3D=3D=3D> lib/libnvidia-tls (all)
=3D=3D=3D> lib/libnvidia-cfg (all)
=3D=3D=3D> lib/libnvidia-glcore (all)
=3D=3D=3D> lib/libvdpau_nvidia (all)
=3D=3D=3D> x11 (all)
=3D=3D=3D> x11/driver (all)
=3D=3D=3D> x11/extension (all)
=3D=3D=3D> doc (all)

And I get the dialog box again.  And I re-select ACPI_PM.  Then:

=3D=3D=3D>  Staging for nvidia-driver-331.20
=3D=3D=3D>   Generating temporary packing list
=3D=3D=3D> src (install)
install -o root -g wheel -m 555   nvidia.ko /common/ports/x11/nvidia-driver=
/work/stage/boot/modules
=3D=3D=3D> lib (install)
=3D=3D=3D> lib/libGL (install)
=2E..
=3D=3D=3D>  Building package for nvidia-driver-331.20
Creating package /common/ports/x11/nvidia-driver/work/nvidia-driver-331.20.=
tbz
Registering depends: xorg-server-1.7.7_11,1 dri-7.6.1_3,2 libXxf86misc-1.0.=
3 libGL-7.6.1_4 libXxf86vm-1.1.3 libXinerama-1.1.3,1 libXaw-1.0.12,2 libXp-=
1.0.2,1 libXmu-1.1.2,1 libXpm-3.5.11 libXext-1.3.2,1 li
bXdamage-1.1.4 libXfixes-5.0.1 libxkbui-1.0.2_1 libXt-1.1.4,1 hal-0.5.14_22=
 consolekit-0.4.3 polkit-0.105_1 gobject-introspection-1.36.0_2 policykit-0=
=2E9_6 dbus-glib-0.100.2 glib-2.36.3_1 python-2.7_1,2 xkb
comp-1.2.4 libxkbfile-1.0.8 dbus-1.6.18 libX11-1.6.2,1 python2-2_2 python27=
-2.7.6_1 gettext-0.18.3.1 libxcb-1.9.3 xkeyboard-config-2.10.1 libxml2-2.8.=
0_3 libiconv-1.14_1 icu-50.1.2 libffi-3.0.13_1 libdrm-2
=2E4.17_1 libpciaccess-0.13.2 libpthread-stubs-0.3_4 libvolume_id-0.81.1 pc=
re-8.33 pkgconf-0.9.4 perl5-5.16.3_6 gnomehier-3.0 pciids-20131225 libXfont=
-1.4.7,1 freetype2-2.5.2 dmidecode-2.12 gnome_subr-1.0 ex
pat-2.1.0 fontsproto-2.1.2 libfontenc-1.1.2 damageproto-1.2.1 dri2proto-2.8=
 fixesproto-5.0 kbproto-1.0.6 libSM-1.2.2,1 libICE-1.0.8,1 libXau-1.0.8 lib=
Xdmcp-1.1.1 pixman-0.32.4 printproto-1.0.5 xextproto-7.
2.1 xf86miscproto-0.9.3 xf86vidmodeproto-2.3.1 xineramaproto-1.2.1 xproto-7=
=2E0.25.
Creating bzip'd tar ball in '/common/ports/x11/nvidia-driver/work/nvidia-dr=
iver-331.20.tbz'
tar: lib/libEGL.so: Cannot stat: No such file or directory
tar: lib/libEGL.so.1: Cannot stat: No such file or directory
tar: lib/libGLESv1_CM.so: Cannot stat: No such file or directory
tar: lib/libGLESv1_CM.so.1: Cannot stat: No such file or directory
tar: lib/libGLESv2.so: Cannot stat: No such file or directory
tar: lib/libGLESv2.so.2: Cannot stat: No such file or directory
tar: lib/libnvidia-eglcore.so: Cannot stat: No such file or directory
tar: lib/libnvidia-eglcore.so.1: Cannot stat: No such file or directory
tar: lib/libnvidia-glsi.so: Cannot stat: No such file or directory
tar: lib/libnvidia-glsi.so.1: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
pkg_create: make_dist: tar command failed with code 256
*** [do-package] Error code 1

Stop in /common/ports/x11/nvidia-driver.
*** [install] Error code 1

Stop in /common/ports/x11/nvidia-driver.

=3D=3D=3D>>> Installation of nvidia-driver-331.20 (x11/nvidia-driver) failed
=3D=3D=3D>>> Aborting update

=3D=3D=3D>>> Killing background jobs
Terminated

=3D=3D=3D>>> You can restart from the point of failure with this command li=
ne:
       portmaster <flags> x11/nvidia-driver=20

=3D=3D=3D>>> Exiting




So what do I need to do to make this work?

The system is running:

FreeBSD g1-251.catwhisker.org 9.2-STABLE FreeBSD 9.2-STABLE #656  r261314M/=
261318:902506: Fri Jan 31 04:46:38 PST 2014     root@g1-251.catwhisker.org:=
/usr/obj/usr/src/sys/CANARY  i386

and I had just updated sources to r261347 and ports to r342118.

Peace,
david
--=20
David H. Wolfskill				david@catwhisker.org
Taliban: Evil cowards with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

--z3ovhOgMYmj8MRdq
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQJ8BAEBCgBmBQJS7Q9tXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4
QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk7UaQP/2pU0uXuhWmT9NqnHMDuvwsX
2lmV/VXXaL58ZQGFYzZtNDgW6ANkUP/ZcWjAtLl7mleNVHbwbOArb23cOKOXD6Js
SSeiwHSeOn8pQ5QzjmPcouXQZR66tlZj4Crrbash+G4ZZMZEPBfFNwF7R96hgJeY
C4AG1RfETgIYZDSR1b5DxBcguxFRU1pA3ER6ruKNE6AolThVNm6103H+jgNStHpb
XkhkqAO8HZBoCIvEBwv1fspchnxwARsfnyMkShcXqNSig5dXM2UlTct9v28SESu4
ZNyW0PZJL1PtQ/gRVLsYUCz+VZpFIuTpi34c7px41/xv50VQYnZO6o4mm2g3Ivce
1bgt55Ry1zy/liosZ5+uahkEZjtD5AH4OhCzewZbL5OLTc9ukI73+aia5gSGxrDm
xs0ZE/eE1Tzo4LHHHM2wo+gBREHuuCniku54QihkAfuBpjntp8wTTvsIHnJZY19s
gEcwReTXWJJeXYc/ODbDtHwobY9HTumDdkfV1nebSZmuwUxuHKSyKz//kWWN28CS
f+/0DWfX1ax83o6QNVcQBb8719WI/rhT9UxjL9es1TX90brPk/mBTYccMr48T7Wi
3adcz91iZnCX1exAx5EsoEtLSVLlsP8CXa5MqwM7OG/gtS35bcwDE5WNUn6Mmvvd
P3J6+HvGiJ9kIK7Ow6Az
=xgPu
-----END PGP SIGNATURE-----

--z3ovhOgMYmj8MRdq--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140201151454.GN1620>