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

Fails to build on ArchLinux with both GCC-14.1.1 and clang-17.0.6 . #69

Closed
perfStack opened this issue May 16, 2024 · 1 comment · Fixed by #70
Closed

Fails to build on ArchLinux with both GCC-14.1.1 and clang-17.0.6 . #69

perfStack opened this issue May 16, 2024 · 1 comment · Fixed by #70

Comments

@perfStack
Copy link
Contributor

perfStack commented May 16, 2024

clang-17.0.6

[2/8] Building CXX object CMakeFiles/ot.dir/src/opus.cc.o
FAILED: CMakeFiles/ot.dir/src/opus.cc.o 
/usr/bin/clang++ -D_GNU_SOURCE -I/dev/shm/testbuild/opustags/build -I/dev/shm/testbuild/opustags/src -march=native -pipe -O3 -DNDEBUG -std=gnu++20 -I/usr/include -MD -MT CMakeFiles/ot.dir/src/opus.cc.o -MF CMakeFiles/ot.dir/src/opus.cc.o.d -o CMakeFiles/ot.dir/src/opus.cc.o -c /dev/shm/testbuild/opustags/src/opus.cc
/dev/shm/testbuild/opustags/src/opus.cc:171:19: error: no member named 'find_if' in namespace 'std'; did you mean 'std::ranges::find_if'?
  171 |         auto cover_tag = std::find_if(tags.comments.begin(), tags.comments.end(), is_cover);
      |                          ^~~~~~~~~~~~
      |                          std::ranges::find_if
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/bits/ranges_util.h:543:33: note: 'std::ranges::find_if' declared here
  543 |   inline constexpr __find_if_fn find_if{};
      |                                 ^
/dev/shm/testbuild/opustags/src/opus.cc:175:25: error: no member named 'find_if' in namespace 'std'; did you mean 'std::ranges::find_if'?
  175 |         auto extra_cover_tag = std::find_if(std::next(cover_tag), tags.comments.end(), is_cover);
      |                                ^~~~~~~~~~~~
      |                                std::ranges::find_if
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/bits/ranges_util.h:543:33: note: 'std::ranges::find_if' declared here
  543 |   inline constexpr __find_if_fn find_if{};
      |                                 ^
2 errors generated.
[4/8] Building CXX object CMakeFiles/ot.dir/src/cli.cc.o
FAILED: CMakeFiles/ot.dir/src/cli.cc.o 
/usr/bin/clang++ -D_GNU_SOURCE -I/dev/shm/testbuild/opustags/build -I/dev/shm/testbuild/opustags/src -march=native -pipe -O3 -DNDEBUG -std=gnu++20 -I/usr/include -MD -MT CMakeFiles/ot.dir/src/cli.cc.o -MF CMakeFiles/ot.dir/src/cli.cc.o.d -o CMakeFiles/ot.dir/src/cli.cc.o -c /dev/shm/testbuild/opustags/src/cli.cc
/dev/shm/testbuild/opustags/src/cli.cc:177:8: error: no member named 'transform' in namespace 'std'
  177 |                 std::transform(local_to_add.begin(), local_to_add.end(),
      |                 ~~~~~^
/dev/shm/testbuild/opustags/src/cli.cc:179:8: error: no member named 'transform' in namespace 'std'
  179 |                 std::transform(local_to_delete.begin(), local_to_delete.end(),
      |                 ~~~~~^
/dev/shm/testbuild/opustags/src/cli.cc:185:9: error: no member named 'transform' in namespace 'std'
  185 |                         std::transform(local_to_add.begin(), local_to_add.end(),
      |                         ~~~~~^
/dev/shm/testbuild/opustags/src/cli.cc:187:9: error: no member named 'transform' in namespace 'std'
  187 |                         std::transform(local_to_delete.begin(), local_to_delete.end(),
      |                         ~~~~~^
/dev/shm/testbuild/opustags/src/cli.cc:243:28: error: no member named 'count' in namespace 'std'
  243 |         auto newline_count = std::count(source.begin(), source.end(), opt.tag_delimiter);
      |                              ~~~~~^
5 errors generated.
[6/8] Building CXX object CMakeFiles/ot.dir/src/system.cc.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

gcc-14.1.1

FAILED: CMakeFiles/ot.dir/src/opus.cc.o 
/usr/bin/c++ -D_GNU_SOURCE -I/dev/shm/testbuild/spe/opustags/build -I/dev/shm/testbuild/spe/opustags/src -O3 -DNDEBUG -std=gnu++20 -I/usr/include -MD -MT CMakeFiles/ot.dir/src/opus.cc.o -MF CMakeFiles/ot.dir/src/opus.cc.o.d -o CMakeFiles/ot.dir/src/opus.cc.o -c /dev/shm/testbuild/spe/opustags/src/opus.cc
In file included from /dev/shm/testbuild/spe/opustags/src/opus.cc:24:
/dev/shm/testbuild/spe/opustags/src/opustags.h:127:54: warning: ignoring attributes on template argument ‘int (*)(FILE*)’ [-Wignored-attributes]
  127 | struct file : std::unique_ptr<FILE, decltype(&fclose)> {
      |                                                      ^
/dev/shm/testbuild/spe/opustags/src/opustags.h: In constructor ‘ot::file::file(FILE*)’:
/dev/shm/testbuild/spe/opustags/src/opustags.h:128:74: warning: ignoring attributes on template argument ‘int (*)(FILE*)’ [-Wignored-attributes]
  128 |         file(FILE* f = nullptr) : std::unique_ptr<FILE, decltype(&fclose)>(f, &fclose) {}
      |                                                                          ^
/dev/shm/testbuild/spe/opustags/src/opus.cc: In function ‘std::optional<ot::picture> ot::extract_cover(const opus_tags&)’:
/dev/shm/testbuild/spe/opustags/src/opus.cc:171:31: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
  171 |         auto cover_tag = std::find_if(tags.comments.begin(), tags.comments.end(), is_cover);
      |                               ^~~~~~~
      |                               find
/dev/shm/testbuild/spe/opustags/src/opus.cc:175:37: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
  175 |         auto extra_cover_tag = std::find_if(std::next(cover_tag), tags.comments.end(), is_cover);
      |                                     ^~~~~~~
      |                                     find
[3/8] Building CXX object CMakeFiles/ot.dir/src/cli.cc.o
FAILED: CMakeFiles/ot.dir/src/cli.cc.o 
/usr/bin/c++ -D_GNU_SOURCE -I/dev/shm/testbuild/spe/opustags/build -I/dev/shm/testbuild/spe/opustags/src -O3 -DNDEBUG -std=gnu++20 -I/usr/include -MD -MT CMakeFiles/ot.dir/src/cli.cc.o -MF CMakeFiles/ot.dir/src/cli.cc.o.d -o CMakeFiles/ot.dir/src/cli.cc.o -c /dev/shm/testbuild/spe/opustags/src/cli.cc
In file included from /dev/shm/testbuild/spe/opustags/src/cli.cc:9:
/dev/shm/testbuild/spe/opustags/src/opustags.h:127:54: warning: ignoring attributes on template argument ‘int (*)(FILE*)’ [-Wignored-attributes]
  127 | struct file : std::unique_ptr<FILE, decltype(&fclose)> {
      |                                                      ^
/dev/shm/testbuild/spe/opustags/src/opustags.h: In constructor ‘ot::file::file(FILE*)’:
/dev/shm/testbuild/spe/opustags/src/opustags.h:128:74: warning: ignoring attributes on template argument ‘int (*)(FILE*)’ [-Wignored-attributes]
  128 |         file(FILE* f = nullptr) : std::unique_ptr<FILE, decltype(&fclose)>(f, &fclose) {}
      |                                                                          ^
/dev/shm/testbuild/spe/opustags/src/cli.cc: In function ‘ot::options ot::parse_options(int, char**, FILE*)’:
/dev/shm/testbuild/spe/opustags/src/cli.cc:177:22: error: ‘transform’ is not a member of ‘std’
  177 |                 std::transform(local_to_add.begin(), local_to_add.end(),
      |                      ^~~~~~~~~
/dev/shm/testbuild/spe/opustags/src/cli.cc:179:22: error: ‘transform’ is not a member of ‘std’
  179 |                 std::transform(local_to_delete.begin(), local_to_delete.end(),
      |                      ^~~~~~~~~
/dev/shm/testbuild/spe/opustags/src/cli.cc:185:30: error: ‘transform’ is not a member of ‘std’
  185 |                         std::transform(local_to_add.begin(), local_to_add.end(),
      |                              ^~~~~~~~~
/dev/shm/testbuild/spe/opustags/src/cli.cc:187:30: error: ‘transform’ is not a member of ‘std’
  187 |                         std::transform(local_to_delete.begin(), local_to_delete.end(),
      |                              ^~~~~~~~~
/dev/shm/testbuild/spe/opustags/src/cli.cc: In function ‘std::u8string format_value(const std::u8string&, const ot::options&)’:
/dev/shm/testbuild/spe/opustags/src/cli.cc:243:35: error: ‘count’ is not a member of ‘std’; did you mean ‘popcount’?
  243 |         auto newline_count = std::count(source.begin(), source.end(), opt.tag_delimiter);
      |                                   ^~~~~
      |                                   popcount

Likely due to ArchLinux's recent upgrade to GCC 14.1.1
Version : Release 1.10.0

@fmang
Copy link
Owner

fmang commented May 17, 2024

Thank you for the report. The broken .cc files likely miss an #include <algorithm>. Would you like to make a pull request for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants