From owner-freebsd-current@freebsd.org Wed Aug 22 16:37:11 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 92BA8108E2D4 for ; Wed, 22 Aug 2018 16:37:11 +0000 (UTC) (envelope-from manfredantar@gmail.com) Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D6537D5EC; Wed, 22 Aug 2018 16:37:11 +0000 (UTC) (envelope-from manfredantar@gmail.com) Received: by mail-qt0-x241.google.com with SMTP id x7-v6so2834900qtk.5; Wed, 22 Aug 2018 09:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ikxAzzygXDhnNkEMHpV8g6NZwg8ULErjWmiu0Vc3Hs8=; b=ZEiXkIvWdfTLlcaU1QxDsNXFdIC2SgqXGzF181LKvDurhrofxROBOqr9F3OlfE/iAV lYrLUgIWBEs4zi/Rq9S2ZxpMkB6fpuLaxS+fqzOutxLWoz47aUx+qjHKYBZU7yutxyru EBDYRsMCwClSKk+QZTuw0CwZnQTm85blTXTWDADBYMgg2uN60YWgQS92RzzSzvO5kBBY cSGmCvN9kPDkS45S6w/3eYcWfFAJFiFUH2X9BPNxtOmWs2ndM+BPMlZo0Rl0CUmat+pL bOGwjXXhea039txLaw+sLEBOqeyDIWOQ8WBwZj/ES59V2DPMhflXcBeEqm0EiCgfCst5 vBJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ikxAzzygXDhnNkEMHpV8g6NZwg8ULErjWmiu0Vc3Hs8=; b=jYT+hxX/cfnjDQyoDqlXIo4/wvRyMeuoEkEGyvLyfsvuwOQsAvCf6uURmOJj2ytdos ikkpNJZH/YRBGF1yV8FXeEAt2ZwvT4kYrUi9V0fafOiYxXRO0SG/613mScuziQKwDree GcdwaZoSbY8rpsZbdmwCVErcmdCk4iWtwNDd+MjeBwjsEXNOBgj/TRYrxgOvPcoLSJ2A vGq2KbVruFgoUAbL9tND419UN/m6TRuqlJH0NbmQQsUyqn9PW1WTnYMfkKRcpALF4VjH frZPjTypR4oI4ggHdxBWGiplqMmVFjj4eNAOd6rnhMRoPCaLxsGo4OnZsO3b0AYsfFgH P5Kg== X-Gm-Message-State: AOUpUlFr+fPdwExmyXXZtDFP/zRkSY2GrrmGlQ+O4DiyttIhe+Mbm20K d/NC4ynNH2eyl6ta/I1Z5kE= X-Google-Smtp-Source: AA+uWPxaCi0FRAUJ96JLVuOa35rY3dgnwlA/LslZFqF+MvjVue/te7YewR2aR0xPvYOtUat6clMVBQ== X-Received: by 2002:a0c:e9ce:: with SMTP id q14-v6mr52619654qvo.106.1534955830714; Wed, 22 Aug 2018 09:37:10 -0700 (PDT) Received: from octo.pozo.com (50-197-129-138-static.hfc.comcastbusiness.net. [50.197.129.138]) by smtp.gmail.com with ESMTPSA id n25-v6sm1054779qtp.94.2018.08.22.09.37.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Aug 2018 09:37:10 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: nvidia-driver build error (last ports, FreeBSD-HEAD) From: Manfred Antar In-Reply-To: <86b09a54-9394-675e-3722-7007fa66c9c1@rice.edu> Date: Wed, 22 Aug 2018 09:37:08 -0700 Cc: Alexey Dokuchaev , "Alex V. Petrov" , freebsd-current , alc@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <83B426AF-3B5E-4D19-9248-0CD33BB1038D@gmail.com> References: <20180822022343.GA60855@FreeBSD.org> <4925AAFC-0D43-4DC3-9E41-61F44359255A@gmail.com> <86b09a54-9394-675e-3722-7007fa66c9c1@rice.edu> To: Alan Cox X-Mailer: Apple Mail (2.3445.9.1) 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 16:37:11 -0000 > On Aug 21, 2018, at 10:10 PM, Alan Cox wrote: >=20 > On 08/21/2018 23:29, Manfred Antar wrote: >>=20 >>> On Aug 21, 2018, at 7:23 PM, Alexey Dokuchaev = wrote: >>>=20 >>> 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, = FreeBSD-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. >>>=20 >>> ./danfe >> emulators/open-vm-tools is also broken from the recent changes to = sys/vm: >> cc -O2 -pipe -isystem /usr/local/include -fno-strict-aliasing = -Werror -D_KERNEL -DKLD_MODULE -nostdinc = -I/usr/ports/emulators/open-vm-tools/work/open-vm-tools-stable-10.2.5/open= -vm-tools/lib/include = -I/usr/ports/emulators/open-vm-tools/work/open-vm-tools-stable-10.2.5/open= -vm-tools/modules/shared/vmxnet -I. -I/usr/src/sys = -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer = -mno-omit-leaf-frame-pointer -MD -MF.depend.if_vxn.o -MTif_vxn.o = -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float = -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector = -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef = -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ = -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas = -Wno-error-tautological-compare -Wno-error-empty-body = -Wno-error-parentheses-equality -Wno-error-unused-function = -Wno-error-pointer-sign -Wno-error-shift-negative-value = -Wno-address-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, = have 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. >>=20 >> 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-tools/modules/freebsd/vmmemctl >> will hang,so i needed to uninstall it to get x. >>=20 >> if these lines are removed from = open-vm-tools/modules/freebsd/vmmemctl/os.h open-vm-tools will compile = and work: >>=20 >> 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 >>=20 >> Not sure if this is the right fix but it enabled me to use the = vm-tools again and the associated modules >=20 > Change this to >=20 > #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 >=20 > 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. >=20 This works on current AMD64 Thanks