I try to install the most recent nvidia-GPU driver for FreeBSD, which is 319.23.
I face a strange bug, which reports while compiling: [...] cc -O2 -pipe -O3 -march=native -fno-strict-aliasing -O3 -march=native -DNV_VERSION_STRING=\"319.23\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -O3 -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I. -I@ -I@/contrib/altq -fno-common -fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c nvidia_sysctl.c nvidia_sysctl.c:174:1: error: control reaches end of non-void function [-Werror,-Wreturn-type] } ^ 1 error generated. *** Error code 1 Stop. make: stopped in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-319.23/src [...] Interestingly, the line 174 of file nvidia_sysctl.c is a function called int nvidia_sysctl_bus_type(SYSCTL_HANDLER_ARGS) { struct nvidia_softc *sc = arg1; char *bus_type; if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_EXP) != 0) bus_type = "PCIe"; else bus_type = "PCI"; } which is supposed to be patched by the Makefile of the port - but for some reasons, there is the "return 0;" gone as well as the patched line, which can be found in nvidia_sysctl.c.bak and states: int nvidia_sysctl_bus_type(SYSCTL_HANDLER_ARGS) { struct nvidia_softc *sc = arg1; char *bus_type; if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_EXP) != 0) bus_type = "PCIe"; else bus_type = "PCI"; return SYSCTL_OUT(req, bus_type, strlen(bus_type) + 1); } Somehow, the complete return SYSCTL_OUT() gets deleted. Oliver
signature.asc
Description: PGP signature