Date: Sat, 13 Nov 2021 09:54:47 +0100 (CET) From: Gerald Pfeifer <gerald@pfeifer.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Yasuhiro Kimura <yasu@freebsd.org>, freebsd-current@freebsd.org, kde@freebsd.org, Damjan Jovanovic <damjan.jov@gmail.com> Subject: Re: Build of devel/ninja and lang/gcc11 fails with latest 14-CURRENT amd64 Message-ID: <76e4f589-2df5-8f6f-ac9d-403020f8587b@pfeifer.com> Resent-Message-ID: <f5692a87-2b34-4c7a-e250-3192151197a7@pfeifer.com> In-Reply-To: <YY7xEDOd7XOrrAGj@kib.kiev.ua> References: <20211113.053153.925491349721631675.yasu@FreeBSD.org> <YY7xEDOd7XOrrAGj@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 13 Nov 2021, Konstantin Belousov wrote: >> ---------------------------------------------------------------------- >> commit 160b4b922b6 >> Author: Konstantin Belousov <kib@FreeBSD.org> >> Date: Sat Oct 23 00:17:21 2021 >> >> Add real sched.h >> >> It is required by IEEE Std 1003.1-2008 AKA POSIX. >> >> Put some Linux compatibility stuff under BSD_VISIBLE namespace, in >> particular, sys/cpuset.h definitions. Also, if user really want >> Linux compatibility, she can request cpu_set_t typedef with >> _WITH_CPU_SET_T define. >> >> Reviewed by: jhb >> Sponsored by: The FreeBSD Foundation >> MFC after: 1 week >> Differential revision: https://reviews.freebsd.org/D32901 >> ---------------------------------------------------------------------- >> >> It seems likely this is the cause of build error. > Ninja builds with the following patch, other failing ports have a chance > as well. > > commit 1acaa4bb838c074c29926cb34b7827efb26cdc85 > Author: Konstantin Belousov <kib@FreeBSD.org> > Date: Thu Nov 11 10:01:54 2021 +0200 > > sched.h: Make cpu_set_t compat typedef visible unconditionally > > or rather, visible if BSD namespace is enabled, instead of requiring > _WITH_CPU_SET_T define to expose it. It seems a lot of code assumes > that presence of sched_getaffinity() implies existence of cpu_set_t. > > Reported by: portmgr (antoine) > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > > diff --git a/include/sched.h b/include/sched.h > index 1c41cda79046..2d4f301c9718 100644 > --- a/include/sched.h > +++ b/include/sched.h > @@ -34,13 +34,8 @@ > #include <sys/sched.h> > #if __BSD_VISIBLE > #include <sys/cpuset.h> > -#endif /* __BSD_VISIBLE */ > - > -#if __BSD_VISIBLE > -#ifdef _WITH_CPU_SET_T > struct _cpuset; > typedef struct _cpuset cpu_set_t; > -#endif /* _WITH_CPU_SET_T */ > #endif /* __BSD_VISIBLE */ > > __BEGIN_DECLS I also got a build notification for emulators/wine and believe emulators/wine-devel is impacted as well. The code in question looks as follows, and it seems your follow up patch should address this? int set_thread_affinity( struct thread *thread, affinity_t affinity ) { int ret = 0; #ifdef HAVE_SCHED_SETAFFINITY if (thread->unix_tid != -1) { cpu_set_t set; int i; affinity_t mask; CPU_ZERO( &set ); for (i = 0, mask = 1; mask; i++, mask <<= 1) if (affinity & mask) CPU_SET( i, &set ); ret = sched_setaffinity( thread->unix_tid, sizeof(set), &set ); } #endif If so, it looks like your work unleashes enhanced functionality on FreeBSD! Nice. Original notification message below. Gerald ====== forwarded message ====== >>From pkg-fallout@FreeBSD.org Sat Nov 13 09:14:03 2021 From: pkg-fallout@FreeBSD.org To: gerald@FreeBSD.org Cc: pkg-fallout@FreeBSD.org Date: Sat, 13 Nov 2021 05:59:23 GMT Subject: [package - main-amd64-default][emulators/wine] Failed for wine-6.0.2,1 in build You are receiving this mail as a port that you maintain is failing to build on the FreeBSD package build server. Please investigate the failure and submit a PR to fix build. Maintainer: gerald@FreeBSD.org Log URL: http://beefy18.nyi.freebsd.org/data/main-amd64-default/p0bef5c19453e_sd032cda0d0/logs/wine-6.0.2,1.log Build URL: http://beefy18.nyi.freebsd.org/build.html?mastername=main-amd64-default&build=p0bef5c19453e_sd032cda0d0 Log: =>> Building emulators/wine build started at Sat Nov 13 05:50:39 UTC 2021 port directory: /usr/ports/emulators/wine package name: wine-6.0.2,1 building for: FreeBSD main-amd64-default-job-02 14.0-CURRENT FreeBSD 14.0-CURRENT 1400041 amd64 maintained by: gerald@FreeBSD.org Makefile ident: Poudriere version: 3.2.8-21-g883afb07 Host OSVERSION: 1400008 Jail OSVERSION: 1400041 Job Id: 02 !!! Jail is newer than host. (Jail: 1400041, Host: 1400008) !!! !!! This is not supported. !!! !!! Host kernel must be same or newer than jail. !!! !!! Expect build failures. !!! ---Begin Environment--- SHELL=/bin/sh OSVERSION=1400041 UNAME_v=FreeBSD 14.0-CURRENT 1400041 UNAME_r=14.0-CURRENT BLOCKSIZE=K MAIL=/var/mail/root MM_CHARSET=UTF-8 LANG=C.UTF-8 STATUS=1 HOME=/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin LOCALBASE=/usr/local USER=root LIBEXECPREFIX=/usr/local/libexec/poudriere POUDRIERE_VERSION=3.2.8-21-g883afb07 MASTERMNT=/usr/local/poudriere/data/.m/main-amd64-default/ref POUDRIERE_BUILD_TYPE=bulk PACKAGE_BUILDING=yes SAVED_TERM= PWD=/usr/local/poudriere/data/.m/main-amd64-default/ref/.p/pool P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS MASTERNAME=main-amd64-default SCRIPTPREFIX=/usr/local/share/poudriere OLDPWD=/usr/local/poudriere/data/.m/main-amd64-default/ref/.p SCRIPTPATH=/usr/local/share/poudriere/bulk.sh POUDRIEREPATH=/usr/local/bin/poudriere ---End Environment--- ---Begin Poudriere Port Flags/Env--- PORT_FLAGS= PKGENV= FLAVOR= DEPENDS_ARGS= MAKE_ARGS= ---End Poudriere Port Flags/Env--- ---Begin OPTIONS List--- ===> The following configuration options are available for wine-6.0.2,1: CUPS=off: CUPS printing system support DOCS=on: Build and/or install documentation DOSBOX=off: Use DOSBox to run MS-DOS programs GECKO=off: Bundle Gecko MSI package for Wine GNUTLS=on: SSL/TLS support via GnuTLS LDAP=off: LDAP protocol support LIBXSLT=off: Use libxslt (only used by msxml3.dll) MONO=off: Bundle Mono MSI package for Wine MPG123=off: MP3 decoding support via mpg123 OPENAL=on: Audio support via OpenAL V4L=off: Video 4 Linux support WINEMAKER=off: Fully support winemaker (requires Perl) X11=on: X11 (graphics) support ===> Use 'make config' to modify these settings ---End OPTIONS List--- --MAINTAINER-- gerald@FreeBSD.org --End MAINTAINER-- --CONFIGURE_ARGS-- --verbose --disable-kerberos --disable-tests --without-alsa --without-capi --without-dbus --without-gettext --without-gettextpo --without-gphoto --without-gsm --without-gstreamer --without-inotify --without-krb5 --without-mingw --without-opencl --without-osmesa --with-oss --with-pcap --with-pthread --without-pulse --without-sane --with-sdl --without-tiff --without-udev --without-unwind --without-usb --without-cups --with-gnutls --without-ldap --without-xslt --without-mpg123 --with-openal --without-v4l2 --with-x --with-cms --with-fontconfig --with-freetype --with-jpeg --with-opengl --with-png --with-vkd3d --with-xinerama --with-xinput2 --with-xrandr --with-xrender --enable-win64 --libdir=/usr/local/lib --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/usr/local ${_LATE_CONFIGURE_ARGS} --End CONFIGURE_ARGS-- --CONFIGURE_ENV-- CPPBIN="cpp10" FLEX="/usr/local/bin/flex" MAKE=gmake PKG_CONFIG=pkgconf SDL2_CONFIG=/usr/local/bin/sdl2-config XDG_DATA_HOME=/wrkdirs/usr/ports/emulators/wine/work XDG_CONFIG_HOME=/wrkdirs/usr/ports/emulators/wine/work XDG_CACHE_HOME=/wrkdirs/usr/ports/emulators/wine/work/.cache HOME=/wrkdirs/usr/ports/emulators/wine/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/emulators/wine/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin SHELL=/bin/sh CONFIG_SHELL=/bin/sh ADDR2LINE="/usr/local/bin/addr2line" AR="/usr/local/bin/ar" AS="/usr/local/bin/as" CPPFILT="/usr/local/bin/c++filt" GPROF="/usr/local/bin/gprof" LD="/usr/local/bin/ld" NM="/usr/local/bin/nm" OBJCOPY="/usr/local/bin/objcopy" OBJDUMP="/usr/local/bin/objdump" RANLIB="/usr/local/bin/ranlib" READELF="/usr/local/bin/readelf" SIZE="/usr/local/bin/size" STRINGS="/usr/local/bin/strings" CMAKE_PREFIX_PATH="/usr/local" CONFIG_SITE=/usr/ports/Templates/config.site lt_cv_sys_max_cmd_len=524288 --End CONFIGURE_ENV-- --MAKE_ENV-- SDL2_CONFIG=/usr/local/bin/sdl2-config XDG_DATA_HOME=/wrkdirs/usr/ports/emulators/wine/work XDG_CONFIG_HOME=/wrkdirs/usr/ports/emulators/wine/work XDG_CACHE_HOME=/wrkdirs/usr/ports/emulators/wine/work/.cache HOME=/wrkdirs/usr/ports/emulators/wine/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/emulators/wine/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES ADDR2LINE="/usr/local/bin/addr2line" AR="/usr/local/bin/ar" AS="/usr/local/bin/as" CPPFILT="/usr/local/bin/c++filt" GPROF="/usr/local/bin/gprof" LD="/usr/local/bin/ld" NM="/usr/local/bin/nm" OBJCOPY="/usr/local/bin/objcopy" OBJDUMP="/usr/local/bin/objdump" RANLIB="/usr/local/bin/ranlib" READELF="/usr/local/bin/readelf" SIZE="/usr/local/bin/size" STRINGS="/usr/local/bin/strings" PREFIX=/usr/local LOCALBASE=/usr/local CC="gcc10" CFLAGS="-O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/incl ude -fno-strict-aliasing " CPP="cpp10" CPPFLAGS="-isystem /usr/local/include" LDFLAGS=" -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 " LIBS="-L/usr/local/lib" CXX="g++10" CXXFLAGS="-O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" --End MAKE_ENV-- --PLIST_SUB-- PORTDOCS="" CUPS="@comment " NO_CUPS="" DOCS="" NO_DOCS="@comment " DOSBOX="@comment " NO_DOSBOX="" GECKO="@comment " NO_GECKO="" GNUTLS="" NO_GNUTLS="@comment " LDAP="@comment " NO_LDAP="" LIBXSLT="@comment " NO_LIBXSLT="" MONO="@comment " NO_MONO="" MPG123="@comment " NO_MPG123="" OPENAL="" NO_OPENAL="@comment " V4L="@comment " NO_V4L="" WINEMAKER="@comment " NO_WINEMAKER="" X11="" NO_X11="@comment " WINE32="@comment " WINE64="" OSREL=14.0 PREFIX=%D LOCALBASE=/usr/local RESETPREFIX=/usr/local LIB32DIR=lib DOCSDIR="share/doc/wine" EXAMPLESDIR="share/examples/wine" DATADIR="share/wine" WWWDIR="www/wine" ETCDIR="etc/wine" --End PLIST_SUB-- --SUB_LIST-- CUPS="@comment " NO_CUPS="" DOCS="" NO_DOCS="@comment " DOSBOX="@comment " NO_DOSBOX="" GECKO="@comment " NO_GECKO="" GNUTLS="" NO_GNUTLS="@comment " LDAP="@comment " NO_LDAP="" LIBXSLT="@comment " NO_LIBXSLT="" MONO="@comment " NO_MONO="" MPG123="@comment " NO_MPG123="" OPENAL="" NO_OPENAL="@comment " V4L="@comment " NO_V4L="" WINEMAKER="@comment " NO_WINEMAKER="" X11="" NO_X11="@comment " PREFIX=/usr/local LOCALBASE=/usr/local DATADIR=/usr/local/share/wine DOCSDIR=/usr/local/share/doc/wine EXAMPLESDIR=/usr/local/share/examples/wine WWWDIR=/usr/local/www/wine ETCDIR=/usr/local/etc/wine --End SUB_LIST-- ---Begin make.conf--- USE_PACKAGE_DEPENDS=yes BATCH=yes WRKDIRPREFIX=/wrkdirs PORTSDIR=/usr/ports PACKAGES=/packages DISTDIR=/distfiles PACKAGE_BUILDING=yes PACKAGE_BUILDING_FLAVORS=yes #### /usr/local/etc/poudriere.d/make.conf #### # XXX: We really need this but cannot use it while 'make checksum' does not # try the next mirror on checksum failure. It currently retries the same # failed mirror and then fails rather then trying another. It *does* # try the next if the size is mismatched though. #MASTER_SITE_FREEBSD=yes # Build ALLOW_MAKE_JOBS_PACKAGES with 2 jobs MAKE_JOBS_NUMBER=2 #### /usr/ports/Mk/Scripts/ports_env.sh #### _CCVERSION_921dbbb2=FreeBSD clang version 12.0.1 (git@github.com:llvm/llvm-project.git llvmorg-12.0.1-0-gfed41342a82f) Target: x86_64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin _ALTCCVERSION_921dbbb2=none _CXXINTERNAL_acaad9ca=FreeBSD clang version 12.0.1 (git@github.com:llvm/llvm-project.git llvmorg-12.0.1-0-gfed41342a82f) Target: x86_64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=both" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o" CC_OUTPUT_921dbbb2_58173849=yes CC_OUTPUT_921dbbb2_9bdba57c=yes CC_OUTPUT_921dbbb2_6a4fe7f5=yes CC_OUTPUT_921dbbb2_6bcac02b=yes CC_OUTPUT_921dbbb2_67d20829=yes CC_OUTPUT_921dbbb2_bfa62e83=yes CC_OUTPUT_921dbbb2_f0b4d593=yes CC_OUTPUT_921dbbb2_308abb44=yes CC_OUTPUT_921dbbb2_f00456e5=yes CC_OUTPUT_921dbbb2_65ad290d=yes CC_OUTPUT_921dbbb2_f2776b26=yes CC_OUTPUT_921dbbb2_b2657cc3=yes CC_OUTPUT_921dbbb2_380987f7=yes CC_OUTPUT_921dbbb2_160933ec=yes CC_OUTPUT_921dbbb2_fb62803b=yes _OBJC_CCVERSION_921dbbb2=FreeBSD clang version 12.0.1 (git@github.com:llvm/llvm-project.git llvmorg-12.0.1-0-gfed41342a82f) Target: x86_64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin _OBJC_ALTCCVERSION_921dbbb2=none ARCH=amd64 OPSYS=FreeBSD _OSRELEASE=14.0-CURRENT OSREL=14.0 OSVERSION=1400041 PYTHONBASE=/usr/local HAVE_COMPAT_IA32_KERN=YES CONFIGURE_MAX_CMD_LEN=524288 HAVE_PORTS_ENV=1 #### Misc Poudriere #### GID=0 UID=0 ---End make.conf--- --Resource limits-- cpu time (seconds, -t) unlimited file size (512-blocks, -f) unlimited data seg size (kbytes, -d) 33554432 stack size (kbytes, -s) 524288 core file size (512-blocks, -c) unlimited max memory size (kbytes, -m) unlimited locked memory (kbytes, -l) unlimited max user processes (-u) 89999 open files (-n) 1024 virtual mem size (kbytes, -v) unlimited swap limit (kbytes, -w) unlimited socket buffer size (bytes, -b) unlimited pseudo-terminals (-p) unlimited kqueues (-k) unlimited umtx shared locks (-o) unlimited --End resource limits-- =======================<phase: check-sanity >============================ ===> License LGPL21 LGPL3 accepted by the user =========================================================================== =======================<phase: pkg-depends >============================ ===> wine-6.0.2,1 depends on file: /usr/local/sbin/pkg - not found ===> Installing existing package /packages/All/pkg-1.17.5.pkg [main-amd64-default-job-02] Installing pkg-1.17.5... [main-amd64-default-job-02] Extracting pkg-1.17.5: .......... done ===> wine-6.0.2,1 depends on file: /usr/local/sbin/pkg - found ===> Returning to build of wine-6.0.2,1 =========================================================================== =======================<phase: fetch-depends >============================ =========================================================================== =======================<phase: fetch >============================ ===> License LGPL21 LGPL3 accepted by the user ===> Fetching all distfiles required by wine-6.0.2,1 for building =========================================================================== =======================<phase: checksum >============================ ===> License LGPL21 LGPL3 accepted by the user ===> Fetching all distfiles required by wine-6.0.2,1 for building => SHA256 Checksum OK for wine-6.0.2.tar.xz. =========================================================================== =======================<phase: extract-depends>============================ =========================================================================== =======================<phase: extract >============================ ===> License LGPL21 LGPL3 accepted by the user ===> Fetching all distfiles required by wine-6.0.2,1 for building ===> Extracting for wine-6.0.2,1 => SHA256 Checksum OK for wine-6.0.2.tar.xz. =========================================================================== <snip> : gcc10 -m64 -c -o server/thread.o server/thread.c -Iserver -Iinclude -D__WINESRC__ -Wall -pipe -fcf-protection=none \ -fno-stack-protector -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body \ -Wignored-qualifiers -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits \ -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op -isystem \ /usr/local/include -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -fno-strict-aliasing : server/thread.c: In function 'set_thread_affinity': server/thread.c:562:9: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'? 562 | cpu_set_t set; | ^~~~~~~~~ | cpuset_t In file included from /usr/include/sys/cpuset.h:39, from /usr/include/sched.h:36, from server/thread.c:39: server/thread.c:566:9: error: request for member '__bits' in something not a structure or union 566 | CPU_ZERO( &set ); | ^~~~~~~~ server/thread.c:568:34: error: request for member '__bits' in something not a structure or union 568 | if (affinity & mask) CPU_SET( i, &set ); | ^~~~~~~ server/thread.c:570:65: warning: passing argument 3 of 'sched_setaffinity' from incompatible pointer type [-Wincompatible-pointer-types] 570 | ret = sched_setaffinity( thread->unix_tid, sizeof(set), &set ); | ^~~~ | | | int * In file included from server/thread.c:39: /usr/include/sched.h:49:65: note: expected 'const cpuset_t *' {aka 'const struct _cpuset *'} but argument is of type 'int *' 49 | int sched_setaffinity(int pid, size_t cpusetsz, const cpuset_t *cpuset); | ~~~~~~~~~~~~~~~~^~~~~~ server/thread.c: In function 'get_thread_affinity': server/thread.c:583:9: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'? 583 | cpu_set_t set; | ^~~~~~~~~ | cpuset_t server/thread.c:586:64: warning: passing argument 3 of 'sched_getaffinity' from incompatible pointer type [-Wincompatible-pointer-types] 586 | if (!sched_getaffinity( thread->unix_tid, sizeof(set), &set )) | ^~~~ | | | int * In file included from server/thread.c:39: /usr/include/sched.h:48:61: note: expected 'cpuset_t *' {aka 'struct _cpuset *'} but argument is of type 'int *' 48 | int sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset); | ~~~~~~~~~~^~~~~~ In file included from /usr/include/sys/cpuset.h:39, from /usr/include/sched.h:36, from server/thread.c:39: server/thread.c:588:21: error: request for member '__bits' in something not a structure or union 588 | if (CPU_ISSET( i, &set )) mask |= (affinity_t)1 << i; | ^~~~~~~~~ gmake[1]: *** [Makefile:157790: server/thread.o] Error 1 gmake[1]: *** Waiting for unfinished jobs.... gmake[1]: Leaving directory '/wrkdirs/usr/ports/emulators/wine/work/wine-6.0.2' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/emulators/wine
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?76e4f589-2df5-8f6f-ac9d-403020f8587b>