From owner-freebsd-ports@FreeBSD.ORG Sun Jun 9 17:32:21 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 094BD99A for ; Sun, 9 Jun 2013 17:32:21 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id C041D15F8 for ; Sun, 9 Jun 2013 17:32:20 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.80.1) for freebsd-ports@freebsd.org with esmtp (envelope-from ) id <1UljTR-002Mo7-Mv>; Sun, 09 Jun 2013 19:32:13 +0200 Received: from f052016248.adsl.alicedsl.de ([78.52.16.248] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.80.1) for freebsd-ports@freebsd.org with esmtpsa (envelope-from ) id <1UljTR-003qDb-IF>; Sun, 09 Jun 2013 19:32:13 +0200 Date: Sun, 9 Jun 2013 19:32:08 +0200 From: "O. Hartmann" To: FreeBSD Ports Subject: x11/nvidia-driver: NVIDIA-FreeBSD-x86_64-319.23: nvidia_sysctl.c:174:1: error: control reaches end of non-void function [-Werror,-Wreturn-type] Message-ID: <20130609193208.75c8810d@thor.walstatt.dyndns.org> Organization: FU Berlin X-Mailer: Claws Mail 3.9.1 (GTK+ 2.24.18; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/1U7.iq8SpxlmWGqwAuohvnv"; protocol="application/pgp-signature" X-Originating-IP: 78.52.16.248 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 17:32:21 -0000 --Sig_/1U7.iq8SpxlmWGqwAuohvnv Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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=3Dnative -fno-strict-aliasing -O3 -march=3Dnative -DNV_VERSION_STRING=3D\"319.23\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=3Dkernel -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=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=3Diso9899: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=20 int nvidia_sysctl_bus_type(SYSCTL_HANDLER_ARGS) { struct nvidia_softc *sc =3D arg1; char *bus_type; if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_EXP) !=3D 0) bus_type =3D "PCIe"; else bus_type =3D "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 =3D arg1; char *bus_type; if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_EXP) !=3D 0) bus_type =3D "PCIe"; else bus_type =3D "PCI"; return SYSCTL_OUT(req, bus_type, strlen(bus_type) + 1); } Somehow, the complete return SYSCTL_OUT() gets deleted. Oliver --Sig_/1U7.iq8SpxlmWGqwAuohvnv Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBAgAGBQJRtLwcAAoJEOgBcD7A/5N8QeIIAIw6BIxItXgndetoEFoFTpFF 57S6H8stJrndHRxAZGwa1TkoVYZPDa6+6hrNMZZndIR0Gh0D2hkG/HBItV8h4Xm3 VuGLLSBxNDg5EE1jZ1gppxzIBy6NsmvawoLr7dSpjZFvvPNrcy+7YrId42gVPDQr e+CVJseiBBz0KdRAAULB3UUieYHocz0w+TxLmMTAu3t9xs9ptTpkELL2dJNfWfnQ FBBBPOZs6yoLOcyiFZTdzYPpmCWq1gDjThpUSYeaBHAUgFCxWROUSpbuRa3w2JJO /nTtowIKTTwBZ3VSjyiMP9Afv/QsiSTlWp6WqTep0qTAECZZF/BIz2ND0rpc/Ok= =AqQq -----END PGP SIGNATURE----- --Sig_/1U7.iq8SpxlmWGqwAuohvnv--