From owner-freebsd-current@freebsd.org Sat Sep 12 21:00:29 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 70DC73E2D20 for ; Sat, 12 Sep 2020 21:00:29 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BplQ52F4pz4Vpg; Sat, 12 Sep 2020 21:00:29 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kHCdF-0006RV-6W; Sat, 12 Sep 2020 23:00:27 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Dimitry Andric" Cc: "FreeBSD Current" Subject: Re: compiling with ports llvm11 breaks on mman.h: struct shm_larg epage_conf References: Date: Sat, 12 Sep 2020 23:00:19 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.4 X-Spam-Status: No, score=-0.4 required=5.0 tests=ALL_TRUSTED, BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF autolearn=disabled version=3.4.2 X-Scan-Signature: 01ccc3eb840dc35651f50b798cb06ae8 X-Rspamd-Queue-Id: 4BplQ52F4pz4Vpg X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL] 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: Sat, 12 Sep 2020 21:00:29 -0000 On Sat, 12 Sep 2020 18:28:03 +0200, Dimitry Andric wrote: > On 12 Sep 2020, at 17:43, Ronald Klop wrote: >> >> Because I'm tired of hours of compilation of llvm/clang I'm testing >> compiling FreeBSD with llvm11 from a pkg. >> >> Setup a jail with 13-CURRENT. Compilation of the installed version went >> fine. >> Today I svn up'd and compiled and compilation broke. >> >> /lib/clang/11.0.0/include -fstack-protector-strong -Wsystem-headers >> -Werror -Wall -[29/1822] >> t-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-unused-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/li >> b/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 >> /usr/src/lib/libc/sys/shm_open.c:64:28: error: variable has incomplete >> type 'struct shm_larg >> epage_conf' >> struct shm_largepage_conf slc; >> ^ >> /usr/src/lib/libc/sys/shm_open.c:64:9: note: forward declaration of >> 'struct shm_largepage_co >> nf' >> struct shm_largepage_conf slc; >> >> >> I can see the difference between /usr/include/sys/mman.h and >> /usr/src/sys/sys/mman.h is exactly about these symbols. >> Why is the base compiler using the latter and ports llvm11 the former? >> >> Configuration of my src.conf and make.conf is described in >> https://blog.klop.ws/2020/08/waiting-for-clang-forever-and-ever.html . >> >> >> Do I miss some directive about system header files? > > During what stage is this, and is it an incremental (e.g. -DNO_CLEAN) > build? With this kind of failure, it is usually required to be able to > inspect the full buildworld log, and the exact command line you used to > invoke make. If you can, upload that somewhere so it can be viewed. 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=gnu99 -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 > That said, it looks like something is messing up your include order, > as during a very early stage in buildword, the sys/sys/ headers are > symlinked to objdir/tmp/legacy/usr/include/sys/. This should include > the mman.h header. > > -Dimitry > I just added CROSS_TOOLCHAIN=llvm11 to make.conf and src.conf, but no difference. I think I need something with --sysroot, but am not sure if this is something I should set or which the build framework should set. Any advice on this? Or a pointer to the right documentation? Regards, Ronald.