v4.22.0 build fails with collect2: error: ld returned 1 exit status
Hi all!
I am maintaining the datovka package in Arch Linux and am hitting the below compile error when I try to build the latest v4.22.0 on top of libdatovka v0.3.0.
...
In member function ‘__ct ’,
inlined from ‘detached’ at /usr/include/qt6/QtCore/qhash.h:575:20,
inlined from ‘detach’ at /usr/include/qt6/QtCore/qhash.h:939:75,
inlined from ‘operator[]’ at /usr/include/qt6/QtCore/qhash.h:1057:15:
/usr/include/qt6/QtCore/qhash.h:559:17: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
559 | spans = new Span[nSpans];
| ^
/usr/include/c++/12.2.1/new: In member function ‘operator[]’:
/usr/include/c++/12.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
/usr/include/qt6/QtCore/qhash.h: In member function ‘__ct_base ’:
/usr/include/qt6/QtCore/qhash.h:559:17: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
559 | spans = new Span[nSpans];
| ^
/usr/include/c++/12.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
In member function ‘__ct ’,
inlined from ‘detached’ at /usr/include/qt6/QtCore/qhash.h:575:20,
inlined from ‘detach’ at /usr/include/qt6/QtCore/qhash.h:939:75,
inlined from ‘emplace’ at /usr/include/qt6/QtCore/qhash.h:1314:15,
inlined from ‘emplace’ at /usr/include/qt6/QtCore/qhash.h:1301:23,
inlined from ‘insert’ at /usr/include/qt6/QtCore/qhash.h:1279:23,
inlined from ‘insert’ at /usr/include/qt6/QtCore/qset.h:156:56,
inlined from ‘originAcntIds’ at src/gui/dlg_download_messages.cpp:329:17:
/usr/include/qt6/QtCore/qhash.h:559:17: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
559 | spans = new Span[nSpans];
| ^
/usr/include/c++/12.2.1/new: In function ‘originAcntIds’:
/usr/include/c++/12.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_set_locale'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_get_engine_info'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_strerror_r'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_data_new'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_data_set_encoding'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_op_verify'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_data_new_from_mem'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_get_protocol_name'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_release'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_data_release'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_free'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_engine_check_version'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_new'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_check_version_internal'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_set_protocol'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libdatovka.so: undefined reference to `gpgme_data_release_and_get_mem'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1453: datovka] Error 1
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed
When trying to build datovka v4.21.1 with libdatovka v0.3.0 it seem to fail with the same error. Could the cause be rather in the libdatovka package? Althoug libdatovka built just fine with these build instructions.
And this is the PKBUILD for datovka, with just updated version number when I try to compile, no other changes to the v4.22.0
Thanks for your help! J