From owner-freebsd-current@freebsd.org Sun Sep 13 18:56:37 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D280D3E46BC for ; Sun, 13 Sep 2020 18:56:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BqJcj5Bklz4XW1; Sun, 13 Sep 2020 18:56:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 3ECAA1C8DD; Sun, 13 Sep 2020 18:56:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::34af:fbc2:64d8:92da] (unknown [IPv6:2001:470:7a58:0:34af:fbc2:64d8:92da]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 97A9F6E9B0; Sun, 13 Sep 2020 20:56:35 +0200 (CEST) From: Dimitry Andric Message-Id: <11FD9B3A-E977-4188-99BF-B05BFDCFE923@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_124C6773-4892-4373-AE91-2B81BAD05A91"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: compiling with ports llvm11 breaks on mman.h: struct shm_larg epage_conf Date: Sun, 13 Sep 2020 20:56:27 +0200 In-Reply-To: Cc: FreeBSD Current To: Ronald Klop References: X-Mailer: Apple Mail (2.3445.104.15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 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: Sun, 13 Sep 2020 18:56:37 -0000 --Apple-Mail=_124C6773-4892-4373-AE91-2B81BAD05A91 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 12 Sep 2020, at 23:00, Ronald Klop wrote: >=20 > On Sat, 12 Sep 2020 18:28:03 +0200, Dimitry Andric = wrote: >> On 12 Sep 2020, at 17:43, Ronald Klop wrote: >>>=20 >>> Because I'm tired of hours of compilation of llvm/clang I'm testing = compiling FreeBSD with llvm11 from a pkg. ... It is during the building world stage and happens with and without = NO_CLEAN. > Full command: > /usr/local/bin/clang11 -O2 -pipe -fno-common -DNO__SCCSID = -DNO__RCSID -I/usr/src/lib/libc > /include -I/usr/src/include -I/usr/src/lib/libc/amd64 -DNLS = -D__DBINTERFACE_PRIVATE -I/usr/ > src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 = -I/usr/obj/usr/src/amd64.amd64/lib/lib > c -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE = -I/usr/src/lib/libmd -I/usr/src/ > contrib/jemalloc/include -DMALLOC_PRODUCTION = -I/usr/src/contrib/tzcode/stdtime -I/usr/src/li > b/libc/stdtime -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP = -DDES_BUILTIN -I/usr/src/li > b/libc/rpc -DWANT_HYPERV -DYP -DNS_CACHING -DSYMBOL_VERSIONING -g -MD = -MF.depend.shm_open.o > -MTshm_open.o -std=3Dgnu99 -Wno-format-zero-length -nobuiltininc = -idirafter /usr/local/llvm11 > /lib/clang/11.0.0/include -fstack-protector-strong -Wsystem-headers = -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign = -Wno-empty-body -Wno-string-plus-int -Wno-unused- > const-variable -Wno-tautological-compare -Wno-unused-value = -Wno-parentheses-equality -Wno-un > used-function -Wno-enum-conversion -Wno-unused-local-typedef = -Wno-address-of-packed-member - > Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter = -Qunused-arguments -I/usr/src/lib/libutil -I/usr/src/lib/msun/amd64 = -I/usr/src/lib/msun/x86 -I/usr/src/lib/msun/src -c /usr/ > src/lib/libc/sys/shm_open.c -o shm_open.o After a pretty long build of the llvm11 port, I can at least reproduce = your error. It looks like the problem is that clang11 does not get any = --sysroot parameter passed. If I install the devel/xtoolchain-llvm90 port and use that, I get a = slightly different command line. Here's both of them, in diff = --side-by-side format: /usr/local/bin/clang11 | = /usr/local/bin/clang90 > -target = x86_64-unknown-freebsd13.0 > = --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp > -B/var/empty -O2 -O2 -pipe -pipe -fno-common -fno-common -DNO__SCCSID -DNO__SCCSID -DNO__RCSID -DNO__RCSID -I/usr/src/lib/libc/include = -I/usr/src/lib/libc/include -I/usr/src/include = -I/usr/src/include -I/usr/src/lib/libc/amd64 = -I/usr/src/lib/libc/amd64 -DNLS -DNLS -D__DBINTERFACE_PRIVATE = -D__DBINTERFACE_PRIVATE -I/usr/src/contrib/gdtoa = -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis = -I/usr/src/contrib/libc-vis -DINET6 -DINET6 -I/usr/obj/usr/src/amd64.amd64/lib/libc = -I/usr/obj/usr/src/amd64.amd64/lib/libc -I/usr/src/lib/libc/resolv = -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE = -D_ACL_PRIVATE -DPOSIX_MISTAKE = -DPOSIX_MISTAKE -I/usr/src/lib/libmd = -I/usr/src/lib/libmd -I/usr/src/contrib/jemalloc/include = -I/usr/src/contrib/jemalloc/include -I/usr/src/contrib/tzcode/stdtime = -I/usr/src/contrib/tzcode/stdtime -I/usr/src/lib/libc/stdtime = -I/usr/src/lib/libc/stdtime -I/usr/src/lib/libc/locale = -I/usr/src/lib/libc/locale -DBROKEN_DES -DBROKEN_DES -DPORTMAP -DPORTMAP -DDES_BUILTIN = -DDES_BUILTIN -I/usr/src/lib/libc/rpc = -I/usr/src/lib/libc/rpc -DWANT_HYPERV = -DWANT_HYPERV -DYP -DYP -DNS_CACHING -DNS_CACHING -DSYMBOL_VERSIONING = -DSYMBOL_VERSIONING -g -g -MD -MD -MF.depend.shm_open.o = -MF.depend.shm_open.o -MTshm_open.o = -MTshm_open.o -std=3Dgnu99 -std=3Dgnu99= -Wno-format-zero-length = -Wno-format-zero-length -nobuiltininc = -nobuiltininc -idirafter /usr/local/llvm11/lib/clang/11.0.0/include | -idirafter = /usr/local/llvm90/lib/clang/9.0.1/include -fstack-protector-strong = -fstack-protector-strong -Wsystem-headers = -Wsystem-headers -Werror -Werror -Wall -Wall -Wno-format-y2k = -Wno-format-y2k -Wno-uninitialized = -Wno-uninitialized -Wno-pointer-sign = -Wno-pointer-sign -Wno-empty-body = -Wno-empty-body -Wno-string-plus-int = -Wno-string-plus-int -Wno-unused-const-variable = -Wno-unused-const-variable -Wno-tautological-compare = -Wno-tautological-compare -Wno-unused-value = -Wno-unused-value -Wno-parentheses-equality = -Wno-parentheses-equality -Wno-unused-function = -Wno-unused-function -Wno-enum-conversion = -Wno-enum-conversion -Wno-unused-local-typedef = -Wno-unused-local-typedef -Wno-address-of-packed-member = -Wno-address-of-packed-member -Wno-switch -Wno-switch -Wno-switch-enum = -Wno-switch-enum -Wno-knr-promoted-parameter = -Wno-knr-promoted-parameter -Qunused-arguments = -Qunused-arguments -I/usr/src/lib/libutil = -I/usr/src/lib/libutil -I/usr/src/lib/msun/amd64 = -I/usr/src/lib/msun/amd64 -I/usr/src/lib/msun/x86 = -I/usr/src/lib/msun/x86 -I/usr/src/lib/msun/src = -I/usr/src/lib/msun/src -c /usr/src/lib/libc/sys/shm_open.c -c = /usr/src/lib/libc/sys/shm_open.c -o shm_open.o -o = shm_open.o So except for the expected difference in the -idirafter option that = points to the clang internal headers, the main problem is that for some = reason, clang11 does not get the -target and --sysroot options passed. -Dimitry --Apple-Mail=_124C6773-4892-4373-AE91-2B81BAD05A91 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX15rWwAKCRCwXqMKLiCW o/XEAKDSPeyciL42LjjBfDjgQmgzDaP3mgCeIIuPxtfA0nUKKUpcvz8BmxSsoAs= =MmFg -----END PGP SIGNATURE----- --Apple-Mail=_124C6773-4892-4373-AE91-2B81BAD05A91--