Public bug reported:

With deps at 2024.06.18 things work:

```
$ git clone https://github.com/canonical/mir.git --depth 1
$ cd mir
$ apt build-dep . --snapshot 20240618T000000Z
$ dpkg-buildpackage -uc -us
```

Upgrading binutils causes a FTBFS
```
$ apt install binutils
# /var/log/apt/history.log
Commandline: apt install binutils
Upgrade: libctf-nobfd0:amd64 (2.42-4ubuntu2, 2.42.50.20240618-1ubuntu1), 
libbinutils:amd64 (2.42-4ubuntu2, 2.42.50.20240618-1ubuntu1), 
binutils-x86-64-linux-gnu:amd64 (2.42-4ubuntu2, 2.42.50.20240618-1ubuntu1), 
libctf0:amd64 (2.42-4ubuntu2, 2.42.50.20240618-1ubuntu1), binutils-common:amd64 
(2.42-4ubuntu2, 2.42.50.20240618-1ubuntu1), libsframe1:amd64 (2.42-4ubuntu2, 
2.42.50.20240618-1ubuntu1), libgprofng0:amd64 (2.42-4ubuntu2, 
2.42.50.20240618-1ubuntu1), binutils:amd64 (2.42-4ubuntu2, 
2.42.50.20240618-1ubuntu1)

$ dpkg-buildpackage -uc -us
```

An excerpt from the errors:
```
/usr/bin/c++ -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer 
-ffile-prefix-map=/root/mir=. -flto=auto -ffat-lto-objects 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection 
-fdebug-prefix-map=/root/mir=/usr/src/mir-2.17.0 -Wdate-time 
-D_FORTIFY_SOURCE=3 -pthread -g -Wall -fno-strict-aliasing  -Wnon-virtual-dtor 
-Wextra -fPIC -Werror -Wno-mismatched-tags -Wno-psabi -flto -ffat-lto-objects 
-Wno-error=null-dereference -Wno-error=overloaded-virtual -Wno-sign-compare 
-Wno-error=maybe-uninitialized  -Wno-pedantic -Wl,-Bsymbolic-functions 
-flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,--as-needed -Wl,--no-undefined 
"CMakeFiles/miral-test.dir/external_client.cpp.o" 
"CMakeFiles/miral-test.dir/runner.cpp.o" 
"CMakeFiles/miral-test.dir/wayland_extensions.cpp.o" 
"CMakeFiles/miral-test.dir/zone.cpp.o" 
"CMakeFiles/miral-test.dir/server_example_decoration.cpp.o" 
"CMakeFiles/miral-test.dir/org_kde_kwin_server_decoration.c.o" 
"CMakeFiles/miral-test.dir/server-decoration_wrapper.cpp.o" -o 
../../bin/miral-test.bin  ../libmir-test-assist.a ../../lib/libmiral.so.7 
../../src/miral/libmiral-internal.a 
/usr/lib/x86_64-linux-gnu/libwayland-client.so 
/usr/lib/x86_64-linux-gnu/libyaml-cpp.so ../../lib/libmirserver.so.60 
/usr/lib/x86_64-linux-gnu/libuuid.so 
../../src/platforms/common/server/libserver_platform_common.a 
../../lib/libmirplatform.so.28 ../../lib/libmirwayland.so.5 
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.83.0 
/usr/lib/x86_64-linux-gnu/libepoxy.so ../../lib/libmircommon.so.11 
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.83.0 
/usr/lib/x86_64-linux-gnu/libboost_atomic.so.1.83.0 -ldl 
/usr/lib/x86_64-linux-gnu/libxkbcommon.so ../../lib/libmircore.so.2 
/usr/lib/x86_64-linux-gnu/libwayland-server.so 
../../src/platforms/common/server/kms-utils/libkms_utils.a 
/usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.83.0 
/usr/lib/x86_64-linux-gnu/libdrm.so /usr/lib/x86_64-linux-gnu/libEGL.so 
/usr/lib/x86_64-linux-gnu/libGLESv2.so /usr/lib/x86_64-linux-gnu/libudev.so 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so 
/usr/lib/x86_64-linux-gnu/libglib-2.0.so /usr/lib/x86_64-linux-gnu/libxcb.so 
/usr/lib/x86_64-linux-gnu/libxcb-composite.so 
/usr/lib/x86_64-linux-gnu/libxcb-xfixes.so 
/usr/lib/x86_64-linux-gnu/libxcb-randr.so 
/usr/lib/x86_64-linux-gnu/libxcb-render.so 
/usr/lib/x86_64-linux-gnu/libXcursor.so 
/usr/lib/x86_64-linux-gnu/liblttng-ust.so 
/usr/lib/x86_64-linux-gnu/liblttng-ust-common.so 
/usr/lib/x86_64-linux-gnu/libdl.a /usr/lib/x86_64-linux-gnu/libfreetype.so 
-latomic /usr/lib/x86_64-linux-gnu/libapparmor.so 
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.83.0 -lgtest_main 
../../libGMock.a -lgtest                                                        
                                                                                
                    /usr/bin/ld: /tmp/cccNaqUj.ltrans0.ltrans.o: in function 
`(anonymous namespace)::ExternalClient::ExternalClient() [clone .lto_priv.0]':  
                                                                                
                                             
/usr/src/mir-2.17.0/tests/miral/external_client.cpp:32:(.text+0x343e): warning: 
the use of `tmpnam' is dangerous, better use `mkstemp'                          
                                                                                
                      /usr/bin/ld: 
../../src/miral/libmiral-internal.a(input_device_config.cpp.o): in function 
`std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
>::operator+=(char)':                                                           
              
/usr/include/c++/13/bits/basic_string.h:1388:(.text._ZNKSt8__format14__formatter_fpIcE6formatIDF128_NS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_[_ZNKSt8__format14__formatter_fpIcE6formatIDF128_NS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_]+0x1587):
 undefined reference to `std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::push_back(char)'                
                                                                                
           /usr/bin/ld: 
/usr/include/c++/13/bits/basic_string.h:1388:(.text._ZNKSt8__format14__formatter_fpIcE6formatIeNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_[_ZNKSt8__format14__formatter_fpIcE6formatIeNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_]+0x1524):
 undefined reference to `std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::push_back(char)'                
                                                                                
        /usr/bin/ld: 
/usr/include/c++/13/bits/basic_string.h:1388:(.text._ZNKSt8__format14__formatter_fpIcE6formatIdNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_[_ZNKSt8__format14__formatter_fpIcE6formatIdNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_]+0x1527):
 undefined reference to `std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::push_back(char)'                
                                                                                
        /usr/bin/ld: 
/usr/include/c++/13/bits/basic_string.h:1388:(.text._ZNKSt8__format14__formatter_fpIcE6formatIfNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_[_ZNKSt8__format14__formatter_fpIcE6formatIfNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_]+0x1517):
 undefined reference to `std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::push_back(char)'                
                                                                                
        /usr/bin/ld: 
../../src/miral/libmiral-internal.a(static_display_config.cpp.o): in function 
`std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(std::__shared_count<(__gnu_cxx::_Lock_policy)2>
 const&)':                                                 
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x32c7): undefined 
reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                                                
               /usr/bin/ld: 
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x374c): undefined 
reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                                                
  /usr/bin/ld: /usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x3b86): 
undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                                                
  /usr/bin/ld: /usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x3bac): 
undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                                                
  /usr/bin/ld: /usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x3bd8): 
undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'
/usr/bin/ld: ../../src/miral/libmiral-internal.a(static_display_config.cpp.o): 
in function `std::lock_guard<std::mutex>::lock_guard(std::mutex&)':
/usr/include/c++/13/bits/std_mutex.h:249:(.text+0x5d68): undefined reference to 
`std::mutex::lock()'
/usr/bin/ld: ../../src/miral/libmiral-internal.a(static_display_config.cpp.o): 
in function 
`std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(std::__shared_count<(__gnu_cxx::_Lock_policy)2>
 const&)':
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x6bdb): undefined 
reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'
/usr/bin/ld: /usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x744f): 
undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                                                
  /usr/bin/ld: /usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x74b6): 
undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                                         
/usr/bin/ld: /usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x74f6): 
undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'
/usr/bin/ld: /usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text+0x754f): 
undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'
/usr/bin/ld: 
../../src/miral/libmiral-internal.a(static_display_config.cpp.o):/usr/include/c++/13/bits/shared_ptr_base.h:1078:
 more undefined references to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()' follow
/usr/bin/ld: ../../src/miral/libmiral-internal.a(static_display_config.cpp.o): 
in function `std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > std::__str_concat<std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<
char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::value_type const*, std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::size_type, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
>::value_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::size_type, std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::allocator_type const&)':        
                 
/usr/include/c++/13/bits/basic_string.h:3538:(.text.unlikely+0x607): undefined 
reference to `std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::append(char const*, unsigned long)'                     
                                /usr/bin/ld: 
/usr/include/c++/13/bits/basic_string.h:3539:(.text.unlikely+0x615): undefined 
reference to `std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::append(char const*, unsigned long)'                     
                   /usr/bin/ld: 
../../src/miral/libmiral-internal.a(static_display_config.cpp.o): in function 
`std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(std::__shared_count<(__gnu_cxx::_Lock_policy)2>
 const&)':                                                 
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text._ZN4YAML4Node5beginEv[_ZN4YAML4Node5beginEv]+0x47):
 undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                    /usr/bin/ld: 
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text._ZN4YAML4Node5beginEv[_ZN4YAML4Node5beginEv]+0x90):
 undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                       /usr/bin/ld: 
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text._ZN4YAML4Node3endEv[_ZN4YAML4Node3endEv]+0x47):
 undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                           /usr/bin/ld: 
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text._ZN4YAML4Node3endEv[_ZN4YAML4Node3endEv]+0x90):
 undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                           /usr/bin/ld: 
/usr/include/c++/13/bits/shared_ptr_base.h:1078:(.text._ZZNK4YAML6detail9node_data3getIiEEPNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEEENKUlSt4pairIS4_S4_EE_clESC_.isra.0[_ZNK4YAML6detail9node_data3getIiEEPNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x4b):
 undefined reference to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()'          
                                                                                
                                                         /usr/bin/ld: 
../../src/miral/libmiral-internal.a(static_display_config.cpp.o):/usr/include/c++/13/bits/shared_ptr_base.h:1078:
 more undefined references to 
`std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()' follow   
    
```

ProblemType: Bug
DistroRelease: Ubuntu 24.10
Package: binutils 2.42.50.20240618-1ubuntu1
ProcVersionSignature: Ubuntu 6.8.0-35.35-generic 6.8.4
Uname: Linux 6.8.0-35-generic x86_64
ApportVersion: 2.28.1-0ubuntu4
Architecture: amd64
CasperMD5CheckResult: unknown
CloudArchitecture: x86_64
CloudBuildName: server
CloudID: lxd
CloudName: lxd
CloudPlatform: lxd
CloudSerial: 20240622
CloudSubPlatform: LXD socket API v. 1.0 (/dev/lxd/sock)
Date: Mon Jun 24 17:04:03 2024
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=screen-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: binutils
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: binutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug cloud-image oracular

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2070302

Title:
  binutils 2.42.50.20240618-1FTBFS of mir 2.17, undefined references to
  stdlib with LTO

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/2070302/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to