Bug 226682

Summary: Build broken on Gentoo OS by Loongson 2f MIPS CPU
Product: WebKit Reporter: Emtone <tong__hui>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: aperez, bugs-noreply, tong__hui
Priority: P2    
Version: WebKit Local Build   
Hardware: PC   
OS: Linux   

Description Emtone 2021-06-05 08:13:41 PDT
Build error info:
 * Working in BUILD_DIR: "/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkit-gtk-2.32.1_build"
ninja -v -j1 -l0
[1/4768] /usr/bin/mips64el-unknown-linux-gnu-g++ -DBUILDING_GTK__=1 -DBUILDING_WITH_CMAKE=1 -DBUILDING_WTF -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"WebKit2GTK-4.0\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DSVN_REVISION=\"tarball\" -DWEBKITGTK_API_VERSION_STRING=\"4.0\" -I. -IDerivedSources/WTF -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/dtoa -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/persistence -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/text -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/text/icu -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/threads -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/unicode -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/lib32/libffi/include -isystem /usr/include/glib-2.0 -isystem /usr/lib32/glib-2.0/include  -DNDEBUG -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -O2 -march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fPIC -fno-strict-aliasing -fno-exceptions -fno-rtti -fPIC -std=c++17 -MD -MT Source/WTF/wtf/CMakeFiles/WTF.dir/DateMath.cpp.o -MF Source/WTF/wtf/CMakeFiles/WTF.dir/DateMath.cpp.o.d -o Source/WTF/wtf/CMakeFiles/WTF.dir/DateMath.cpp.o -c /var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/DateMath.cpp
FAILED: Source/WTF/wtf/CMakeFiles/WTF.dir/DateMath.cpp.o
/usr/bin/mips64el-unknown-linux-gnu-g++ -DBUILDING_GTK__=1 -DBUILDING_WITH_CMAKE=1 -DBUILDING_WTF -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"WebKit2GTK-4.0\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DSVN_REVISION=\"tarball\" -DWEBKITGTK_API_VERSION_STRING=\"4.0\" -I. -IDerivedSources/WTF -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/dtoa -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/persistence -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/text -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/text/icu -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/threads -I/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/unicode -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/lib32/libffi/include -isystem /usr/include/glib-2.0 -isystem /usr/lib32/glib-2.0/include  -DNDEBUG -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -O2 -march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fPIC -fno-strict-aliasing -fno-exceptions -fno-rtti -fPIC -std=c++17 -MD -MT Source/WTF/wtf/CMakeFiles/WTF.dir/DateMath.cpp.o -MF Source/WTF/wtf/CMakeFiles/WTF.dir/DateMath.cpp.o.d -o Source/WTF/wtf/CMakeFiles/WTF.dir/DateMath.cpp.o -c /var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/DateMath.cpp
/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/DateMath.cpp: In function ‘void WTF::getLocalTime(const time_t*, tm*)’:
/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/DateMath.cpp:114:5: error: ‘localtime_s’ was not declared in this scope
     localtime_s(localTime, localTM);
     ^~~~~~~~~~~
/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1/Source/WTF/wtf/DateMath.cpp:114:5: note: suggested alternative: ‘localtime_r’
     localtime_s(localTime, localTM);
     ^~~~~~~~~~~
     localtime_r
ninja: build stopped: subcommand failed.
 * ERROR: net-libs/webkit-gtk-2.32.1::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed
 *
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 3916:  Called cmake_src_compile
 *   environment, line 1609:  Called cmake_build
 *   environment, line 1578:  Called eninja
 *   environment, line 2039:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
 *
 * If you need support, post the output of `emerge --info '=net-libs/webkit-gtk-2.32.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-libs/webkit-gtk-2.32.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-libs/webkit-gtk-2.32.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-libs/webkit-gtk-2.32.1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkit-gtk-2.32.1_build'
 * S: '/var/tmp/portage/net-libs/webkit-gtk-2.32.1/work/webkitgtk-2.32.1'
Comment 1 Adrian Perez 2022-03-22 06:25:39 PDT
Hello, is this still an issue in newer releases like 2.34.x or (better)
the recently released 2.36.0? It also strikes me as odd that localtime_s()
is being used, it looks like the check for localtime_r() may have failed
during configuration... and localtime_r() has been in glibc for ages 🤔️