Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failures with the default -O3 in plucky #3716

Open
Saviq opened this issue Jan 9, 2025 · 3 comments
Open

Build failures with the default -O3 in plucky #3716

Saviq opened this issue Jan 9, 2025 · 3 comments
Labels
question triaged Triage into JIRA to plan it in

Comments

@Saviq
Copy link
Collaborator

Saviq commented Jan 9, 2025

So, as we've noticed, the default flags are becoming -O3 in plucky, and failures there are probably some sort of bug that we have (or, maybe, is a toolchain bug that should be filed). I don't mind dropping to -O2 temporarily, but we should also work out what's wrong.

Originally posted by @RAOF in #3691 (comment)


To reproduce:

lxc launch ubuntu-daily:plucky plucky
lxc shell plucky
apt update
git clone --depth=1 https://github.com/canonical/mir.git
cd mir
apt-get build-dep ./
dpkg-buildpackage -uc -us
# when it fails
cd build-amd64
# iterate here
@Saviq Saviq added triaged Triage into JIRA to plan it in question labels Jan 9, 2025
@Saviq
Copy link
Collaborator Author

Saviq commented Jan 9, 2025

At least:

[ 61%] Building CXX object src/platforms/atomic-kms/server/kms/CMakeFiles/mirplatformgraphicsatomickms.dir/platform_symbols.cpp.o
cd /<<PKGBUILDDIR>>/build-amd64/src/platforms/atomic-kms/server/kms && /usr/bin/c++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DEGL_NO_X11 -DLTTNG_UST_HAVE_SDT_INTEGRATION -DMIR_LOG_COMPONENT_FALLBACK=\"atomic-kms\" -DMIR_USE_APPARMOR -DMIR_VERSION_MAJOR=2 -DMIR_VERSION_MICRO=2 -DMIR_VERSION_MINOR=19 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D__GBM__ -Dmirplatformgraphicsatomickms_EXPORTS -I/<<PKGBUILDDIR>>/include/renderers/gl -I/<<PKGBUILDDIR>>/include/renderers/sw -I/<<PKGBUILDDIR>>/include/common -I/<<PKGBUILDDIR>>/src/platforms/common/server -I/<<PKGBUILDDIR>>/src/platforms/atomic-kms/server/kms/.. -I/<<PKGBUILDDIR>>/build-amd64/src/platforms/atomic-kms/server/kms/.. -I/<<PKGBUILDDIR>>/build-amd64/src/platform/graphics -I/<<PKGBUILDDIR>>/include/platform -I/<<PKGBUILDDIR>>/include/wayland -I/<<PKGBUILDDIR>>/src/include/wayland -I/<<PKGBUILDDIR>>/build-amd64/src/wayland -I/<<PKGBUILDDIR>>/include/core -I/<<PKGBUILDDIR>>/build-amd64/src/platforms/atomic-kms/server -isystem /usr/include/libdrm -g -O3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/mir-2.19.2+dev25-g9e4f214b9c-0ubuntu25.04 -Wdate-time -D_FORTIFY_SOURCE=3 -pthread -g -Wall -fno-strict-aliasing  -Wnon-virtual-dtor -Wextra -fPIC -Werror -Wno-mismatched-tags -Wno-psabi -std=c++23 -fPIC -MD -MT src/platforms/atomic-kms/server/kms/CMakeFiles/mirplatformgraphicsatomickms.dir/platform_symbols.cpp.o -MF CMakeFiles/mirplatformgraphicsatomickms.dir/platform_symbols.cpp.o.d -o CMakeFiles/mirplatformgraphicsatomickms.dir/platform_symbols.cpp.o -c /<<PKGBUILDDIR>>/src/platforms/atomic-kms/server/kms/platform_symbols.cpp
In member function ‘__dt_base ’,
    inlined from ‘__dt_base ’ at /usr/include/c++/14/bits/shared_ptr_base.h:1525:7,
    inlined from ‘__dt_base ’ at /usr/include/c++/14/bits/shared_ptr.h:175:11,
    inlined from ‘_M_destroy’ at /usr/include/c++/14/optional:283:35,
    inlined from ‘_M_reset’ at /usr/include/c++/14/optional:314:14,
    inlined from ‘__dt_base ’ at /usr/include/c++/14/optional:437:65,
    inlined from ‘__dt_base ’ at /usr/include/c++/14/optional:508:12,
    inlined from ‘__dt_base ’ at /usr/include/c++/14/optional:703:11,
    inlined from ‘__dt_base ’ at /usr/src/mir-2.19.2+dev25-g9e4f214b9c-0ubuntu25.04/src/server/shell/decoration/input.h:166:12,
    inlined from ‘_M_destroy’ at /usr/include/c++/14/optional:283:35,
    inlined from ‘_M_reset’ at /usr/include/c++/14/optional:314:14,
    inlined from ‘_M_reset’ at /usr/include/c++/14/optional:311:0,
    inlined from ‘_M_reset’ at /usr/include/c++/14/optional:466:53,
    inlined from ‘operator=’ at /usr/include/c++/14/optional:832:16,
    inlined from ‘pointer_leave’ at /usr/src/mir-2.19.2+dev25-g9e4f214b9c-0ubuntu25.04/src/server/shell/decoration/input.cpp:309:20,
    inlined from ‘input_consumed’ at /usr/src/mir-2.19.2+dev25-g9e4f214b9c-0ubuntu25.04/src/server/shell/decoration/input.cpp:74:39:
/usr/include/c++/14/bits/shared_ptr_base.h:1068:13: error: ‘MEM[(struct __shared_count *)_3 + 208B]._M_pi’ may be used uninitialized [-Werror=maybe-uninitialized]
 1068 |         if (_M_pi != nullptr)
      |             ^
lto1: all warnings being treated as errors
make[4]: *** [/tmp/ccdqFeA7.mk:104: /tmp/ccBsRV7S.ltrans34.ltrans.o] Error 1
make[4]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

https://launchpadlibrarian.net/769547850/buildlog_ubuntu-plucky-amd64.mir_2.19.2+dev25-g9e4f214b9c-0ubuntu25.04_BUILDING.txt.gz
https://launchpadlibrarian.net/769549070/buildlog_ubuntu-plucky-ppc64el.mir_2.19.2+dev25-g9e4f214b9c-0ubuntu25.04_BUILDING.txt.gz

@Saviq
Copy link
Collaborator Author

Saviq commented Jan 9, 2025

On arm64:

/usr/bin/ld: ../libmir-test-assist.a(mmap_wrapper.cpp.o): in function `std::literals::string_literals::operator"" s[abi:cxx11](char const*, unsigned long)':
/usr/include/c++/14/bits/basic_string.h:4694:(.text+0x650): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)'
/usr/bin/ld: /usr/include/c++/14/bits/basic_string.h:4694:(.text+0xa68): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)'
collect2: error: ld returned 1 exit status

https://launchpadlibrarian.net/769549434/buildlog_ubuntu-plucky-arm64.mir_2.19.2+dev25-g9e4f214b9c-0ubuntu25.04_BUILDING.txt.gz

@Saviq
Copy link
Collaborator Author

Saviq commented Jan 9, 2025

armhf builds, but a test fails:

[ RUN ] UdevWrapperTest.UdevMonitorDoesNotTriggerBeforeEnabling
./tests/unit-tests/test_udev_wrapper.cpp:330: Failure
Value of: event_handler_called
Actual: true
Expected: false

https://launchpadlibrarian.net/769549446/buildlog_ubuntu-plucky-armhf.mir_2.19.2+dev25-g9e4f214b9c-0ubuntu25.04_BUILDING.txt.gz

OPNA2608 added a commit to OPNA2608/nixpkgs that referenced this issue Jan 19, 2025
Failure seems to have been noticed by upstream, I assume they'll look into it:
canonical/mir#3716 (comment)
OPNA2608 added a commit to OPNA2608/nixpkgs that referenced this issue Jan 19, 2025
…Enabling

Failure seems to have been noticed by upstream, I assume they'll look into it:
canonical/mir#3716 (comment)
OPNA2608 added a commit to OPNA2608/nixpkgs that referenced this issue Jan 19, 2025
…Enabling

Failure seems to have been noticed by upstream, I assume they'll look into it:
canonical/mir#3716 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question triaged Triage into JIRA to plan it in
Projects
None yet
Development

No branches or pull requests

1 participant