NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.44k stars 13.64k forks source link

qt6Packages.qtdeclarative: does not build reproducibly #230291

Closed raboof closed 8 months ago

raboof commented 1 year ago

Building this package twice does not produce the bit-by-bit identical result each time, making it harder to detect CI breaches. You can read more about this at https://reproducible-builds.org/ .

Fixing bit-by-bit reproducibility also has additional advantages, such as avoiding hard-to-reproduce bugs, making content-addressed storage more effective and reducing rebuilds in such systems.

Steps To Reproduce

nix-build '<nixpkgs>' -A qt6Packages.qtdeclarative --check --keep-failed

You can use diffoscope to analyze the differences in the output of the two builds.

To view the build log of the build that produced the artifact in the binary cache:

nix-store --read-log $(nix-instantiate '<nixpkgs>' -A qt6Packages.qtdeclarative)

Additional context

https://reproducible.nixos.org/nixos-iso-gnome-runtime/diff/a1c9c89fb3168282d64c64feff4b1114a7baf686bbaf93be3559d08c1cf2b238-ba6832ff08079ae4ec355297f0e39f4114b11a77eb22315c2e5eed514494ec34.html

SFrijters commented 1 year ago

This just failed to build for me just now (at nixpkgs 68688454720b2ea0df54ee9625739f7911fae000), but trying again made it work.

qtdeclarative> FAILED: src/quick/CMakeFiles/Quick.dir/items/qquicktextedit.cpp.o
qtdeclarative> /nix/store/gm9kmfgrx7v1vzabd3i4qh4k8fdq5vf2-gcc-wrapper-12.2.0/bin/g++ -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_QUICK_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_AS_CONST=1 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_INTEGER_EVENT_COORDINATES -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_URL_CAST_FROM_STRING -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DQuick_EXPORTS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/build/qtdeclarative-everywhere-src-6.5.0/build/src/quick/Quick_autogen/include -I/build/qtdeclarative-everywhere-src-6.5.0/build/include -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQuick -I/build/qtdeclarative-everywhere-src-6.5.0/src/quick -I/build/qtdeclarative-everywhere-src-6.5.0/build/src/quick -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQuick/6.5.0 -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQuick/6.5.0/QtQuick -I/build/qtdeclarative-everywhere-src-6.5.0/build/src/qml -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQml/6.5.0 -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQml/6.5.0/QtQml -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQml -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQmlIntegration -I/build/qtdeclarative-everywhere-src-6.5.0/src/qmlintegration -I/build/qtdeclarative-everywhere-src-6.5.0/build/src/qmlintegration -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQmlModels -I/build/qtdeclarative-everywhere-src-6.5.0/build/src/qmlmodels -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQmlModels/6.5.0 -I/build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQmlModels/6.5.0/QtQmlModels -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtCore/6.5.0 -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtCore/6.5.0/QtCore -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtCore -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/mkspecs/linux-g++ -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtNetwork -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui/6.5.0 -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui/6.5.0/QtGui -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtOpenGL -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtOpenGL/6.5.0 -isystem /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtOpenGL/6.5.0/QtOpenGL -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -Wsuggest-override -std=c++17 -Winvalid-pch -include /build/qtdeclarative-everywhere-src-6.5.0/build/src/quick/CMakeFiles/Quick.dir/cmake_pch.hxx -MD -MT src/quick/CMakeFiles/Quick.dir/items/qquicktextedit.cpp.o -MF src/quick/CMakeFiles/Quick.dir/items/qquicktextedit.cpp.o.d -o src/quick/CMakeFiles/Quick.dir/items/qquicktextedit.cpp.o -c /build/qtdeclarative-everywhere-src-6.5.0/src/quick/items/qquicktextedit.cpp
qtdeclarative> In file included from /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui/6.5.0/QtGui/private/qtextdocument_p.h:35,
qtdeclarative>                  from /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui/6.5.0/QtGui/private/qtextengine_p.h:37,
qtdeclarative>                  from /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui/6.5.0/QtGui/private/qfontengine_p.h:22,
qtdeclarative>                  from /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui/6.5.0/QtGui/private/qrawfont_p.h:21,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQuick/6.5.0/QtQuick/private/../../../../../../src/quick/scenegraph/qsgcontext_p.h:26,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQuick/6.5.0/QtQuick/private/qsgcontext_p.h:1,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQuick/6.5.0/QtQuick/private/../../../../../../src/quick/items/qquickwindow_p.h:20,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/build/include/QtQuick/6.5.0/QtQuick/private/qquickwindow_p.h:1,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/src/quick/items/qquickitem_p.h:25,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/src/quick/items/qquickimplicitsizeitem_p_p.h:18,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/src/quick/items/qquicktextedit_p_p.h:19,
qtdeclarative>                  from /build/qtdeclarative-everywhere-src-6.5.0/src/quick/items/qquicktextedit.cpp:5:
qtdeclarative> /nix/store/xap374f83y97j3i4r30qfl8xhjfcf9x4-qtbase-6.5.0/include/QtGui/6.5.0/QtGui/private/qfragmentmap_p.h:596:1: internal compiler error: Segmentation fault
qtdeclarative>   596 | }
qtdeclarative>       | ^
qtdeclarative> 0x1b9d527 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
qtdeclarative>  ???:0
qtdeclarative> 0x1b9e377 internal_error(char const*, ...)
qtdeclarative>  ???:0
qtdeclarative> 0xdd8d8f crash_signal(int)
qtdeclarative>  ???:0
qtdeclarative> 0x941cf3 ggc_set_mark(void const*)
qtdeclarative>  ???:0
qtdeclarative> 0x8939b7 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x8942c9 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x895747 gt_ggc_mx_language_function(void*)
qtdeclarative>  ???:0
qtdeclarative> 0xb621cf gt_ggc_mx_function(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894a5e gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x893ecd gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x8948d3 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x8942c9 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894301 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894301 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894caa gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894301 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894301 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894301 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x894ab3 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> 0x893f37 gt_ggc_mx_lang_tree_node(void*)
qtdeclarative>  ???:0
qtdeclarative> Please submit a full bug report, with preprocessed source (by using -freport-bug).
qtdeclarative> Please include the complete backtrace with any bug report.
qtdeclarative> See <https://gcc.gnu.org/bugs/> for instructions.
qtdeclarative> [1237/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquickrendertarget.cpp.o
qtdeclarative> [1238/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquicktextcontrol.cpp.o
qtdeclarative> [1239/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquicktextdocument.cpp.o
qtdeclarative> [1240/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquickscreen.cpp.o
qtdeclarative> [1241/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquicktextnode.cpp.o
qtdeclarative> [1242/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquicktextutil.cpp.o
qtdeclarative> [1243/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquickstateoperations.cpp.o
qtdeclarative> [1244/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquicktext.cpp.o
qtdeclarative> [1245/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquicktextnodeengine.cpp.o
qtdeclarative> [1246/2922] Building CXX object src/quick/CMakeFiles/Quick.dir/items/qquicktextinput.cpp.o
qtdeclarative> [1247/2922] Building CXX object src/qmldom/CMakeFiles/QmlDomPrivate.dir/qqmldomitem.cpp.o
qtdeclarative> ninja: build stopped: subcommand failed.
error: builder for '/nix/store/ygkf5zv3bvmdw0m968qyizqv1xh1k8dd-qtdeclarative-6.5.0.drv' failed with exit code 1
raboof commented 8 months ago

(this is not showing up in the latest report, may have been fixed or not reproducibly unreproducible)

raboof commented 8 months ago

(closing until we see it again)