https://bugs.kde.org/show_bug.cgi?id=480662

            Bug ID: 480662
           Summary: kdesrc-build prison fails because -fexceptions is
                    disabled
    Classification: Frameworks and Libraries
           Product: frameworks-prison
           Version: 5.248.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: s...@vuorela.dk
          Reporter: raphael....@jakse.fr
  Target Milestone: ---

I am trying to build prison on an updated openSUSE Tumbleweed using
kdesrc-build prison. It fails with the following. Apparently, my version of g++
(g++ (SUSE Linux) 13.2.1 20240125 [revision
fc7d87e0ffadca49bec29b2107c1efd0da6b6ded]) wants -fexceptions:

FAILED: src/scanner/CMakeFiles/KF6PrisonScanner.dir/videoscannerworker.cpp.o 
/usr/bin/c++ -DKF6PrisonScanner_EXPORTS
-DPRISONSCANNER_DEPRECATED_WARNINGS_SINCE=0x0
-DPRISONSCANNER_DISABLE_DEPRECATED_BEFORE_AND_AT=0x0 -DQT_CORE_LIB
-DQT_DEPRECATED_WARNINGS_SINCE=0x70000 -DQT_DISABLE_DEPRECATED_BEFORE=0x60500
-DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH
-DQT_NO_KEYWORDS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER
-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/home/raph/kde/build/prison/src/scanner
-I/home/raph/kde/src/prison/src/scanner
-I/home/raph/kde/build/prison/src/scanner/KF6PrisonScanner_autogen/include
-I/home/raph/kde/build/prison -isystem /usr/include/qt6/QtMultimedia -isystem
/usr/include/qt6 -isystem /usr/include/qt6/QtCore -isystem
/usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtGui -isystem
/usr/include/qt6/QtNetwork -isystem /home/raph/kde/usr/include -pipe
-fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align
-Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef
-Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self
-Werror=undef -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -pedantic
-Wzero-as-null-pointer-constant -Wmissing-include-dirs
-fdiagnostics-color=always -O2 -g -DNDEBUG -std=c++20 -fPIC -fvisibility=hidden
-fvisibility-inlines-hidden -MD -MT
src/scanner/CMakeFiles/KF6PrisonScanner.dir/videoscannerworker.cpp.o -MF
src/scanner/CMakeFiles/KF6PrisonScanner.dir/videoscannerworker.cpp.o.d -o
src/scanner/CMakeFiles/KF6PrisonScanner.dir/videoscannerworker.cpp.o -c
/home/raph/kde/src/prison/src/scanner/videoscannerworker.cpp
In file included from /home/raph/kde/usr/include/ZXing/ReadBarcode.h:9,
                 from
/home/raph/kde/src/prison/src/scanner/videoscannerworker.cpp:17:
/home/raph/kde/usr/include/ZXing/ImageView.h: In constructor
‘ZXing::ImageView::ImageView(const uint8_t*, int, int, ZXing::ImageFormat, int,
int)’:
/home/raph/kde/usr/include/ZXing/ImageView.h:80:105: error: exception handling
disabled, use ‘-fexceptions’ to enable
   80 |                         throw std::invalid_argument("Can not construct
an ImageView from a NULL pointer");
      |                                                                        
                                ^
/home/raph/kde/src/prison/src/scanner/videoscannerworker.cpp: In member
function ‘void
Prison::VideoScannerWorker::slotScanFrame(Prison::VideoScannerFrame)’:
/home/raph/kde/src/prison/src/scanner/videoscannerworker.cpp:35:24: warning:
‘using ZXing::DecodeHints = class ZXing::ReaderOptions’ is deprecated
[-Wdeprecated-declarations]
   35 |     ZXing::DecodeHints hints;
      |                        ^~~~~
In file included from /home/raph/kde/usr/include/ZXing/ReadBarcode.h:8:
/home/raph/kde/usr/include/ZXing/ReaderOptions.h:176:7: note: declared here
  176 | using DecodeHints [[deprecated]] = ReaderOptions;
      |       ^~~~~~~~~~~
[33/84] Linking CXX shared module bin/org/kde/prison/libprisonquickplugin.so
[34/84] Building CXX object
autotests/CMakeFiles/prison-aztecbarcodetest.dir/__/src/lib/aztecbarcode.cpp.o
In file included from /usr/include/c++/13/variant:44,
                 from /usr/include/qt6/QtCore/qtypeinfo.h:11,
                 from /usr/include/qt6/QtCore/qglobal.h:47,
                 from /home/raph/kde/src/prison/src/lib/barcode.h:13,
                 from /home/raph/kde/src/prison/src/lib/abstractbarcode_p.h:10,
                 from /home/raph/kde/src/prison/src/lib/aztecbarcode_p.h:10,
                 from /home/raph/kde/src/prison/src/lib/aztecbarcode.cpp:7:
In function ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*,
_Args&& ...) [with _Tp = aztec_code_t; _Args = {aztec_code_t}]’,
    inlined from ‘static constexpr void
std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*,
_Args&& ...) [with _Up = aztec_code_t; _Args = {aztec_code_t}; _Tp =
aztec_code_t]’ at /usr/include/c++/13/bits/alloc_traits.h:540:21,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {aztec_code_t};
_Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:468:28,
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args =
{aztec_code_t}; _Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:123:21,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::push_back(value_type&&) [with _Tp = aztec_code_t; _Alloc =
std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:1296:21,
    inlined from ‘Prison::BitVector Prison::AztecBarcode::aztecEncode(const
QByteArray&) const’ at
/home/raph/kde/src/prison/src/lib/aztecbarcode.cpp:415:28:
/usr/include/c++/13/bits/stl_construct.h:97:14: warning: writing 1 byte into a
region of size 0 [-Wstringop-overflow=]
   97 |     { return ::new((void*)__location)
_Tp(std::forward<_Args>(__args)...); }
      |             
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/usr/include/c++/13/x86_64-suse-linux/bits/c++allocator.h:33,
                 from /usr/include/c++/13/bits/allocator.h:46,
                 from /usr/include/c++/13/memory:65,
                 from /home/raph/kde/src/prison/src/lib/barcode.h:15:
In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const
void*) [with _Tp = aztec_code_t]’,
    inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1>
>::allocate(std::size_t) [with _Tp = aztec_code_t]’ at
/usr/include/c++/13/bits/allocator.h:198:40,
    inlined from ‘static constexpr _Tp*
std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&,
size_type) [with _Tp = aztec_code_t]’ at
/usr/include/c++/13/bits/alloc_traits.h:482:28,
    inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer
std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp =
aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:378:33,
    inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer
std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp =
aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:375:7,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {aztec_code_t};
_Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:459:44,
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args =
{aztec_code_t}; _Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:123:21,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::push_back(value_type&&) [with _Tp = aztec_code_t; _Alloc =
std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:1296:21,
    inlined from ‘Prison::BitVector Prison::AztecBarcode::aztecEncode(const
QByteArray&) const’ at
/home/raph/kde/src/prison/src/lib/aztecbarcode.cpp:415:28:
/usr/include/c++/13/bits/new_allocator.h:151:55: note: at offset -2 into
destination object of size 9223372036854775806 allocated by ‘operator new’
  151 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n *
sizeof(_Tp)));
      |                                                       ^
In function ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*,
_Args&& ...) [with _Tp = aztec_code_t; _Args = {aztec_code_t}]’,
    inlined from ‘static constexpr void
std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*,
_Args&& ...) [with _Up = aztec_code_t; _Args = {aztec_code_t}; _Tp =
aztec_code_t]’ at /usr/include/c++/13/bits/alloc_traits.h:540:21,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {aztec_code_t};
_Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:468:28,
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args =
{aztec_code_t}; _Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:123:21,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::push_back(value_type&&) [with _Tp = aztec_code_t; _Alloc =
std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:1296:21,
    inlined from ‘Prison::BitVector Prison::AztecBarcode::aztecEncode(const
QByteArray&) const’ at
/home/raph/kde/src/prison/src/lib/aztecbarcode.cpp:415:28:
/usr/include/c++/13/bits/stl_construct.h:97:14: warning: writing 1 byte into a
region of size 0 [-Wstringop-overflow=]
   97 |     { return ::new((void*)__location)
_Tp(std::forward<_Args>(__args)...); }
      |             
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const
void*) [with _Tp = aztec_code_t]’,
    inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1>
>::allocate(std::size_t) [with _Tp = aztec_code_t]’ at
/usr/include/c++/13/bits/allocator.h:198:40,
    inlined from ‘static constexpr _Tp*
std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&,
size_type) [with _Tp = aztec_code_t]’ at
/usr/include/c++/13/bits/alloc_traits.h:482:28,
    inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer
std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp =
aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:378:33,
    inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer
std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp =
aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:375:7,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {aztec_code_t};
_Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:459:44,
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args =
{aztec_code_t}; _Tp = aztec_code_t; _Alloc = std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/vector.tcc:123:21,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::push_back(value_type&&) [with _Tp = aztec_code_t; _Alloc =
std::allocator<aztec_code_t>]’ at
/usr/include/c++/13/bits/stl_vector.h:1296:21,
    inlined from ‘Prison::BitVector Prison::AztecBarcode::aztecEncode(const
QByteArray&) const’ at
/home/raph/kde/src/prison/src/lib/aztecbarcode.cpp:415:28:
/usr/include/c++/13/bits/new_allocator.h:151:55: note: at offset -1 into
destination object of size 9223372036854775806 allocated by ‘operator new’
  151 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n *
sizeof(_Tp)));
      |                                                       ^

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to