[build2] Linker Error when Installing build2 on Arch Linux using GCC 10.1.0

Alex Syrnikov san at masterspline.eu
Fri May 22 00:16:09 UTC 2020


Please, try next (staged) version from here:

https://stage.build2.org/0/0.13.0-a.0/

On 21.05.2020 23:58, Markus Pawellek wrote:
> Hello,
>
> using GCC version 10.1.0 on Arch Linux causes the installation process of build2 to quit with the following error message.
> Hereby, I have used the shell script release version 0.12.0 and the staged shell script for version 0.13.0.
>
> ...
> ld build2-0.12.0/libbuild2/cc/libs{build2-cc}
> ar build2-0.12.0/libbuild2/c/libus{build2-c}
> ar build2-0.12.0/libbuild2/cxx/libus{build2-cxx}
> ld build2-0.12.0/libbuild2/c/libs{build2-c}
> ld build2-0.12.0/libbuild2/cxx/libs{build2-cxx}
> ld build2-0.12.0/build2/exe{b} 
> /usr/bin/ld: build2-0.12.0/libbuild2/cc/libbuild2-cc-0.12-0.12.so: undefined reference to `std::unique_lock<std::shared_mutex> build2::cc::common::insert_library<build2::bin::liba>(build2::context&, build2::bin::liba*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, butl::basic_path<char, butl::dir_path_kind<char> > const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, bool, butl::diag_mark<build2::trace_mark_base>&)'
> /usr/bin/ld: build2-0.12.0/libbuild2/cc/libbuild2-cc-0.12-0.12.so: undefined reference to `std::unique_lock<std::shared_mutex> build2::cc::common::insert_library<build2::bin::libs>(build2::context&, build2::bin::libs*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, butl::basic_path<char, butl::dir_path_kind<char> > const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, bool, butl::diag_mark<build2::trace_mark_base>&)'
> /usr/bin/ld: build2-0.12.0/libbuild2/cc/libbuild2-cc-0.12-0.12.so: undefined reference to `std::unique_lock<std::shared_mutex> build2::cc::common::insert_library<build2::bin::libi>(build2::context&, build2::bin::libi*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, butl::basic_path<char, butl::dir_path_kind<char> > const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, bool, butl::diag_mark<build2::trace_mark_base>&)'
> collect2: error: ld returned 1 exit status
> info: failed to update (for install) dir{build2-0.12.0/}
>
> Furthermore, I could find the following warning over and over again in different files.
>
> ...
> In file included from /home/lyrahgames/builds/build2/build2-toolchain-0.12/build2-0.12.0/libbuild2/function.cxx:5:
> /home/lyrahgames/builds/build2/build2-toolchain-0.12/build2-0.12.0/libbuild2/function.hxx: In constructor ‘build2::function_overload::function_overload(const char*, std::size_t, std::size_t, build2::function_overload::types, build2::value (*)(const build2::scope*, butl::vector_view<build2::value>, const build2::function_overload&), D)’:
> /home/lyrahgames/builds/build2/build2-toolchain-0.12/build2-0.12.0/libbuild2/function.hxx:144:27: warning: ‘template<class _Tp> struct std::is_pod’ is deprecated: use is_standard_layout && is_trivial instead [-Wdeprecated-declarations]
>   144 |       static_assert (std::is_pod<D>::value, "type is not POD");
>       |                           ^~~~~~
> In file included from /usr/include/c++/10.1.0/bits/move.h:57,
>                  from /usr/include/c++/10.1.0/bits/stl_pair.h:59,
>                  from /usr/include/c++/10.1.0/bits/stl_algobase.h:64,
>                  from /usr/include/c++/10.1.0/bits/stl_tree.h:63,
>                  from /usr/include/c++/10.1.0/map:60,
>                  from /home/lyrahgames/builds/build2/build2-toolchain-0.12/build2-0.12.0/libbuild2/function.hxx:8,
>                  from /home/lyrahgames/builds/build2/build2-toolchain-0.12/build2-0.12.0/libbuild2/function.cxx:5:
> /usr/include/c++/10.1.0/type_traits:697:5: note: declared here
>   697 |     is_pod
>       |     ^~~~~~
> ...
>
> Downgrading to GCC version 9.3.0 allowed me to install build2 with no errors and warnings.
> This behavior may appear due to the new C++20 implementations since GCC major version 10.
> Sadly, I am not that into the build2 source code for now and therefore the only option was send this bug report.
> Thank you very much in advance for further suggestions.
>
> Greetings
> Markus
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.build2.org/archives/users/attachments/20200522/5c8ec8c8/attachment-0001.sig>


More information about the users mailing list