From owner-freebsd-current@freebsd.org Wed Aug 22 05:46:52 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8D26108D6D4 for ; Wed, 22 Aug 2018 05:46:52 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mx0b-0010f301.pphosted.com (mx0b-0010f301.pphosted.com [148.163.153.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "thawte SHA256 SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41D8682FE0; Wed, 22 Aug 2018 05:46:52 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (m0102860.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7M57jdQ027338; Wed, 22 Aug 2018 00:10:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=ricemail; bh=YxfCArEp0sBX76dHoa7iFLNCYaUf2SeSlyUBCq8ZPcY=; b=YDu3o5rrwOONkRXuSEzjlQwMQs7muBCBGJw3ZF5WJnB3YfZGIi9uavE24NAraCrEp8NC q4uC3Fsxa3GHAbEJAmBKwHaJuRfAsVmKz/YUv4q8sqLH4vqGu5RsnQCtv/iDhQ0C49yp iotB19muP1AhaJUZwDtVgCAedv+VX9q2xcJ1UHLGEu9jW3FAM+w2oPkhso8+NyGmFE7u wIT7ALHoRHioWG3FBSQNwjtmOVuUrhrbORFuZE+7T6cQIi0SZcEwyeTi8tR1QKbaMVhy Mj+kGx5hswFOkHLbVH5dQ+oNPNXoST7X4fWDGJM8SSM3e8Z1Xw6+nxuUjxJOPPGgukbR 9w== Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx0b-0010f301.pphosted.com with ESMTP id 2kxgu24vmw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Aug 2018 00:10:13 -0500 Received-X: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id E8E0E4C0724; Wed, 22 Aug 2018 00:10:12 -0500 (CDT) Received-X: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id BFF454C059F; Wed, 22 Aug 2018 00:10:12 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received-X: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id tLAQplOhRd34; Wed, 22 Aug 2018 00:10:12 -0500 (CDT) Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 392D94C0724; Wed, 22 Aug 2018 00:10:12 -0500 (CDT) Subject: Re: nvidia-driver build error (last ports, FreeBSD-HEAD) To: Manfred Antar , Alexey Dokuchaev Cc: "Alex V. Petrov" , freebsd-current , alc@freebsd.org References: <20180822022343.GA60855@FreeBSD.org> <4925AAFC-0D43-4DC3-9E41-61F44359255A@gmail.com> From: Alan Cox Openpgp: preference=signencrypt Autocrypt: addr=alc@rice.edu; prefer-encrypt=mutual; keydata= xsBNBFG8q4IBCADBE55F7sX+cKhEadxhNkXrbtVSJhw3TQDPvc3nBWxsfdMAhPWozhpLczV/ hr8mDJV5tirit0qhw4ANPwtsn7i/xlcSdC9p8Jvkcpp/AfiA5B78Y08AsC6K6tbNHZ06qPq3 eCXDNbP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MEPDPiiTuH kAgAo3MUNRzGplyvgPezfnLgnwtlDYMF1HWp+67IIvY3WwcC51FQNHWmGis+H7Bor+aeSAfo KREw9l4U0Tu2YC9uiWKZzA4zer2WMhsB4VGMQ8GPuE2R2sFob5n293FsLWDSWM4Midory9zN EAYQ+Ijpv8WaATS217YYygA+iFlfMmQSKDS1G6HBnUjzQe23sX/06JAAxAvwmOI7OjwLlOCU Q5FaHPz6s8UjdHpZ/OUTElc7URPTr/KramlLhwuTRC2p8XyBrzYqz3Kfl42jEcOuxeHy07DG dm1Euqa5/CKTNBhMWjcujz11TUeI9+f5J2xUSlbj7nGJsnL5P34+SvtsKg== Message-ID: <86b09a54-9394-675e-3722-7007fa66c9c1@rice.edu> Date: Wed, 22 Aug 2018 00:10:11 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <4925AAFC-0D43-4DC3-9E41-61F44359255A@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-22_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808220052 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2018 05:46:52 -0000 On 08/21/2018 23:29, Manfred Antar wrote: > >> On Aug 21, 2018, at 7:23 PM, Alexey Dokuchaev wrot= e: >> >> On Tue, Aug 21, 2018 at 11:22:56PM +0700, Alex V. Petrov wrote: >>> -------- =D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=B0=D0=BF=D1=80=D0=B0=D0=B2= =D0=BB=D0=B5=D0=BD=D0=BD=D0=BE=D0=B5 =D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5= =D0=BD=D0=B8=D0=B5 -------- >>> =D0=A2=D0=B5=D0=BC=D0=B0: nvidia-driver build error (last ports, Free= BSD-HEAD) >>> =D0=94=D0=B0=D1=82=D0=B0: Tue, 21 Aug 2018 16:41:42 +0700 >>> =D0=9E=D1=82: Alex V. Petrov >>> =D0=9A=D0=BE=D0=BC=D1=83: FreeBSD Ports >> Should be fixed as of r477761. >> >> ./danfe > emulators/open-vm-tools is also broken from the recent changes to sys/v= m: > cc -O2 -pipe -isystem /usr/local/include -fno-strict-aliasing -Werror= -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/ports/emulators/open-vm-tools/w= ork/open-vm-tools-stable-10.2.5/open-vm-tools/lib/include -I/usr/ports/em= ulators/open-vm-tools/work/open-vm-tools-stable-10.2.5/open-vm-tools/modu= les/shared/vmxnet -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -f= no-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -M= F.depend.if_vxn.o -MTif_vxn.o -mcmodel=3Dkernel -mno-red-zone -mno-mmx -m= no-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwra= pv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-pr= ototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-po= inter-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -fdi= agnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compar= e -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused= -function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-ad= dress-of-packed-member -mno-aes -mno-avx -std=3Diso9899:1999 -c if_vxn.= c -o if_vxn.o > --- vmmemctl --- > os.c:410:68: error: too many arguments to function call, expected 2, ha= ve 3 > p->bitmap =3D (unsigned long *)kmem_malloc(kernel_arena, p->size, M_= WAITOK | M_ZERO); > ~~~~~~~~~~~ ^~~~= ~~~~~~~~~~~~~ > /usr/src/sys/sys/malloc.h:55:18: note: expanded from macro 'M_WAITOK' > #define M_WAITOK 0x0002 /* ok to block */ > ^ > /usr/src/sys/vm/vm_extern.h:67:1: note: 'kmem_malloc' declared here > vm_offset_t kmem_malloc(vm_size_t size, int flags); > ^ > 1 error generated. > > I also had to rebuild kde-workspace-kde4 and xorg-server before i could= start x without open-vm-tools. > This is on a FreeBSD-12-Alpha2-current as of today.the old open-vm-tool= s/modules/freebsd/vmmemctl > will hang,so i needed to uninstall it to get x. > > if these lines are removed from open-vm-tools/modules/freebsd/vmmemctl/= os.h open-vm-tools will compile and work: > > 407,411d406 > < #if __FreeBSD_version < 1000000 > < p->bitmap =3D (unsigned long *)kmem_alloc(kernel_map, p->size); > < #else > < p->bitmap =3D (unsigned long *)kmem_malloc(kernel_arena, p->size, = M_WAITOK | M_ZERO); > < #endif > > Not sure if this is the right fix but it enabled me to use the vm-tools= again and the associated modules Change this to #if __FreeBSD_version < 1000000 p->bitmap =3D (unsigned long *)kmem_alloc(kernel_map, p->size); #elif __FreeBSD_version < 1200080 p->bitmap =3D (unsigned long *)kmem_malloc(kernel_arena, p->size, M_WAITOK | M_ZERO); #else p->bitmap =3D (unsigned long *)kmem_malloc(p->size, M_WAITOK | M_ZERO= ); #endif That said, it's not clear to me why this allocation doesn't use malloc(9), then no #if's would be required across different versions of FreeBSD.