open-vm-tools failed to build from source in Fedora rawhide/f36 https://koji.fedoraproject.org/koji/taskinfo?taskID=81984627 For details on the mass rebuild see: https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Please fix open-vm-tools at your earliest convenience and set the bug's status to ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks, open-vm-tools will be orphaned. Before branching of Fedora 37, open-vm-tools will be retired, if it still fails to build. For more details on the FTBFS policy, please visit: https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
Created attachment 1855978 [details] build.log file build.log too big, will only attach last 32768 bytes
Created attachment 1855979 [details] root.log file root.log too big, will only attach last 32768 bytes
Created attachment 1855980 [details] state.log
This is weird. 32-bit and 64-bit builds failed with different errors. x86_64 build: https://kojipkgs.fedoraproject.org//work/tasks/5019/81985019/build.log: libtool: compile: gcc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"11.3.0\" "-DPACKAGE_STRING=\"open-vm-tools 11.3.0\"" -DPACKAGE_BUGREPORT=\"open-vm-tools-devel.net\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1 -DSTDC_HEADERS=1 -DPACKAGE=\"open-vm-tools\" -DVERSION=\"11.3.0\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_X11_EXTENSIONS_XCOMPOSITE_H=1 -DHAVE_DLOPEN=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DNO_DNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DNO_XSM=1 -I. -DUSE_TIRPC -I/usr/include/tirpc -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -DUSE_VGAUTH -DNO_ICU -DVMX86_TOOLS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -DENABLE_RESOLUTIONKMS -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Werror -Wno-unused -c nicinfo_xdr.c -fPIC -DPIC -o .libs/libGuestRpc_la-nicinfo_xdr.o nicinfo_xdr.c: error: -D_FORTIFY_SOURCE not defined [-Werror] Similar command line worked before, please see https://kojipkgs.fedoraproject.org//packages/open-vm-tools/11.3.0/3.fc36/data/logs/x86_64/build.log. libtool: compile: gcc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"11.3.0\" "-DPACKAGE_STRING=\"open-vm-tools 11.3.0\"" -DPACKAGE_BUGREPORT=\"open-vm-tools-devel.net\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1 -DSTDC_HEADERS=1 -DPACKAGE=\"open-vm-tools\" -DVERSION=\"11.3.0\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_X11_EXTENSIONS_XCOMPOSITE_H=1 -DHAVE_DLOPEN=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DNO_DNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DNO_XSM=1 -I. -DUSE_TIRPC -I/usr/include/tirpc -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -DUSE_VGAUTH -DNO_ICU -DVMX86_TOOLS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -DENABLE_RESOLUTIONKMS -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -Wno-unused -c nicinfo_xdr.c -fPIC -DPIC -o .libs/libGuestRpc_la-nicinfo_xdr.o make[2]: Leaving directory '/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/guestRpc' i686 build: https://kojipkgs.fedoraproject.org//work/tasks/5018/81985018/build.log: libtool: compile: gcc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"11.3.0\" "-DPACKAGE_STRING=\"open-vm-tools 11.3.0\"" -DPACKAGE_BUGREPORT=\"open-vm-tools-devel.net\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1 -DSTDC_HEADERS=1 -DPACKAGE=\"open-vm-tools\" -DVERSION=\"11.3.0\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_X11_EXTENSIONS_XCOMPOSITE_H=1 -DHAVE_DLOPEN=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DNO_DNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DNO_XSM=1 -I. -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -DUSE_VGAUTH -DNO_ICU -DVMX86_TOOLS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -DENABLE_RESOLUTIONKMS -DUSE_SSL_DIRECT -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -c asyncsocket.c -fPIC -DPIC -o .libs/asyncsocket.o make[2]: Leaving directory '/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/asyncsocket' In file included from /usr/include/features.h:490, from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdio.h:27, from asyncsocket.c:45: In function 'poll', inlined from 'AsyncTCPSocketPollWork' at asyncsocket.c:2861:19: /usr/include/bits/poll2.h:39:10: error: '__poll_chk' specified size between 2147483648 and 4294967295 exceeds maximum object size 2147483647 [-Werror=stringop-overflow=] 39 | return __glibc_fortify (poll, __nfds, sizeof (*__fds), | ^~~~~~~~~~~~~~~ In file included from /usr/include/sys/poll.h:87, from asyncsocket.c:74: /usr/include/bits/poll2.h: In function 'AsyncTCPSocketPollWork': /usr/include/bits/poll2.h:28:12: note: in a call to function '__poll_chk' declared with attribute 'access (write_only, 1, 2)' 28 | extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout, | ^~~~~~~~~~ Same command worked earlier https://kojipkgs.fedoraproject.org//packages/open-vm-tools/11.3.0/3.fc36/data/logs/i686/build.log: libtool: compile: gcc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"11.3.0\" "-DPACKAGE_STRING=\"open-vm-tools 11.3.0\"" -DPACKAGE_BUGREPORT=\"open-vm-tools-devel.net\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1 -DSTDC_HEADERS=1 -DPACKAGE=\"open-vm-tools\" -DVERSION=\"11.3.0\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_X11_EXTENSIONS_XCOMPOSITE_H=1 -DHAVE_DLOPEN=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DNO_DNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DNO_XSM=1 -I. -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -I/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/include -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -DUSE_VGAUTH -DNO_ICU -DVMX86_TOOLS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -DENABLE_RESOLUTIONKMS -DUSE_SSL_DIRECT -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -c asyncsocket.c -fPIC -DPIC -o .libs/asyncsocket.o make[2]: Leaving directory '/builddir/build/BUILD/open-vm-tools-11.3.0-18090558/lib/asyncsocket' It is unclear why these errors are being reported. What changed in Fedora that broke it?
FWIW, for 64-bit build, error reported is in nicinfo_xdr.c which is a generated file by rpctool. For i686 build, errors are being reported in system header files.
I'm not sure why you are needinfoing me... ;) This could well be a gcc 12 bug... try reporting against gcc or moving this bug over there for triage?
Thanks for the advice Kevin. I needinfo'd you just in case you are aware of the Fedora changes that I could relate it to.
Clearing needinfo of releng role account.
Since the likely cause was bug 2047148 which has now been fixed, I started a scratch build in Rawhide to see if it will now build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82095619
Well the answer was *no*. Unfortunately GCC 12 introduces a lot more warnings about string and array bounds, and these are warn-errors in Fedora. I found in other projects that some of these new warnings are false alarms. The first warning/error is: In file included from /usr/include/features.h:490, from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdio.h:27, from asyncsocket.c:45: In function 'poll', inlined from 'AsyncTCPSocketPollWork' at asyncsocket.c:2861:19: /usr/include/bits/poll2.h:39:10: error: '__poll_chk' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 39 | return __glibc_fortify (poll, __nfds, sizeof (*__fds), | ^~~~~~~~~~~~~~~ In file included from /usr/include/sys/poll.h:87, from asyncsocket.c:74: /usr/include/bits/poll2.h: In function 'AsyncTCPSocketPollWork': /usr/include/bits/poll2.h:28:12: note: in a call to function '__poll_chk' declared with attribute 'access (write_only, 1, 2)' 28 | extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout, | ^~~~~~~~~~ cc1: all warnings being treated as errors BTW never use int for counting elements of arrays. Always use size_t.
Thanks Richard. There were 2 errors and only one is fixed by bug 2047148. Not sure what we can do for the asyncsocket.c issue because warning is on the include statement for stdio.h :(
Although the warning is generated because of an annotation in stdio.h, the flagged error is in asyncsocket.c. (It may or may not be a real error.) You can turn off errors around the function using: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-overflow" // the function ... #pragma GCC diagnostic pop although that's quite a big hammer and it's worth examining the code closely first to see if it's a real error or not.
Addressing the array bounds warning reported in comment 10 by following Richard's advice to use size_t in place of int when walking array elements. The updated annobin-plugin-gcc fix for bug 2047148 was not available immediately; prototyped the fix on the 32 bit build. $ fedpkg --release rawhide mockbuild --mock-config fedora-36-i386 $ fedpkg diff diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 25bc50a..4180be4 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -32,7 +32,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Open Virtual Machine Tools for virtual machines hosted on VMware License: GPLv2 URL: https://github.com/vmware/%{name} @@ -52,7 +52,7 @@ ExclusiveArch: %{ix86} x86_64 aarch64 %endif # Patches -#Patch1: <patch-name1>.patch +Patch1: asyncsocket.c.patch #Patch2: <patch-name2>.patch ]$ fedpkg --release rawhide lint No rpm found ============================ rpmlint session starts ============================ rpmlint: 2.2.0 configuration: /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/licenses.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 2 1 packages and 1 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.3 s Submitted a pull request - https://src.fedoraproject.org/rpms/open-vm-tools/pull-request/4
I noticed in the 32-bit build used to prepare the pull request, that the annobin-plugin-gcc-10.51-2.fc36.i686 expected for the fix for bug 2047148 was available. Tried a "fedpkg mockbuild" for x86-64 configuration: Start: run INFO: Start(/home/jwolfe/GIT2/open-vm-tools/open-vm-tools-11.3.0-5.fc36.src.rpm) Config(fedora-rawhide-x86_64) But the build failed at the same place compiling nicingo_xdr.c shown in comment 1 and comment 4 nicinfo_xdr.c: error: -D_FORTIFY_SOURCE not defined [-Werror] Checking results_open-vm-tools/11.3.0/5.fc36/installed_pkgs.log: annobin-plugin-gcc-10.48-4.fc36.x86_64 1642615604 834575 a9f2a8e408230d2f8353ec2dab8075e5 installed When will annobin-plugin-gcc-10.51-2.fc36.x86_64 be available?
> When will annobin-plugin-gcc-10.51-2.fc36.x86_64 be available? Apparently they've had trouble doing a full Rawhide compose for the past few days, not surprising given the amount of brokenness caused by GCC and the other changes. I installed annobin straight from Koji: https://koji.fedoraproject.org/koji/packageinfo?packageID=24421 and built open-vm-tools with your patch (using "fedpkg local") and it appears to build locally, so I'll merge the patch and do a proper build now.
https://koji.fedoraproject.org/koji/taskinfo?taskID=82275609