Repository navigation
Avoid macOS [[nodiscard]] on std::future<bool>::get() - #1014
Conversation
|
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
|
On which compiler is that? Can you reproduce this in the CI? I don't see a |
The one that comes in the box with macOS 27.0.1 "Golden Gate".
It does in ours. It looks like the one here is on macOS 26 rather than 27 so it won't repro there. (As it did not repro in ours before I updated us)
Standard library implementations are allowed to add additional such annotations, and the libc++ maintainers have apparently decided to do so. (Speaking as a former standard library maintainer, I disagree with this one but I didn't own that implementation :) ) [73/118] /usr/bin/c++ -DHAVE_EIGEN -D_OSX_ -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_video/include -I/Users/builduser/Data/b/pangolin/arm64-osx-dbg/include -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_core/include -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_image/include -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_packetstream/include -isystem /Users/builduser/Data/installed/arm64-osx/include -isystem /Users/builduser/Data/installed/arm64-osx/include/libxml2 -isystem /Users/builduser/Data/installed/arm64-osx/debug/lib/pkgconfig/../../../include -isystem /Users/builduser/Data/installed/arm64-osx/debug/lib/pkgconfig/../../../include/srt -isystem /Users/builduser/Data/installed/arm64-osx/debug/lib/pkgconfig/../../../include/svt-av1 -isystem /Users/builduser/Data/installed/arm64-osx/include/webp -isystem /Users/builduser/Data/installed/arm64-osx/include/opus -isystem /Users/builduser/Data/installed/arm64-osx/include/openjpeg-2.5 -isystem /Users/builduser/Data/installed/arm64-osx/include/eigen3 -fPIC -g -std=gnu++17 -arch arm64 -fPIC -Wall -Wextra -Werror -Wno-parentheses -Wno-null-pointer-arithmetic -Wno-null-pointer-subtraction -Werror=vla -Wno-error=ignored-qualifiers -Wno-error=sign-compare -Wno-error=deprecated-copy -Wno-error=missing-field-initializers -Wno-error=pessimizing-move -DRTC_BUILD=0 -UEB_DLL -MD -MT CMakeFiles/pango_video.dir/components/pango_video/src/drivers/pango_video_output.cpp.o -MF CMakeFiles/pango_video.dir/components/pango_video/src/drivers/pango_video_output.cpp.o.d -o CMakeFiles/pango_video.dir/components/pango_video/src/drivers/pango_video_output.cpp.o -c /Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_video/src/drivers/pango_video_output.cpp
FAILED: [code=1] CMakeFiles/pango_video.dir/components/pango_video/src/drivers/pango_video_output.cpp.o
/usr/bin/c++ -DHAVE_EIGEN -D_OSX_ -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_video/include -I/Users/builduser/Data/b/pangolin/arm64-osx-dbg/include -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_core/include -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_image/include -I/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_packetstream/include -isystem /Users/builduser/Data/installed/arm64-osx/include -isystem /Users/builduser/Data/installed/arm64-osx/include/libxml2 -isystem /Users/builduser/Data/installed/arm64-osx/debug/lib/pkgconfig/../../../include -isystem /Users/builduser/Data/installed/arm64-osx/debug/lib/pkgconfig/../../../include/srt -isystem /Users/builduser/Data/installed/arm64-osx/debug/lib/pkgconfig/../../../include/svt-av1 -isystem /Users/builduser/Data/installed/arm64-osx/include/webp -isystem /Users/builduser/Data/installed/arm64-osx/include/opus -isystem /Users/builduser/Data/installed/arm64-osx/include/openjpeg-2.5 -isystem /Users/builduser/Data/installed/arm64-osx/include/eigen3 -fPIC -g -std=gnu++17 -arch arm64 -fPIC -Wall -Wextra -Werror -Wno-parentheses -Wno-null-pointer-arithmetic -Wno-null-pointer-subtraction -Werror=vla -Wno-error=ignored-qualifiers -Wno-error=sign-compare -Wno-error=deprecated-copy -Wno-error=missing-field-initializers -Wno-error=pessimizing-move -DRTC_BUILD=0 -UEB_DLL -MD -MT CMakeFiles/pango_video.dir/components/pango_video/src/drivers/pango_video_output.cpp.o -MF CMakeFiles/pango_video.dir/components/pango_video/src/drivers/pango_video_output.cpp.o.d -o CMakeFiles/pango_video.dir/components/pango_video/src/drivers/pango_video_output.cpp.o -c /Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_video/src/drivers/pango_video_output.cpp
/Users/builduser/Data/b/pangolin/src/v0.9.5-93bea75c25.clean/components/pango_video/src/drivers/pango_video_output.cpp:253:13: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
253 | encode_finished[i-1].get();
| ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated. |
|
@christian-rauch Looks like macOS CI here is already broken; I certainly didn't change how libraw is found by cmake by adding a It looks like vcpkg's lab isn't seeing that failure because we explicitly disable it: |
There are no macOS 27 public GitHub runners yet: https://docs.github.com/en/actions/reference/runners/github-hosted-runners. There is only
It seems like different OSes use different libstdc++ implementations? At least the libc++ 15 version on Ubuntu ( In any case, I do not have macOS to reproduce these issues. I can have a look at fixing the "wheel" issue with Python on macOS. |
Yes we have our own because all the GitHub provided ones don't have enough performance to reasonably build all 2800 things.
Ubuntu comes with libstdc++, not libc++. (clang has a switch to switch if you want but it won't be in |
This code is using the side effects of get() so it is not a meaningless call. (I do not understand why libc++ decided to nodiscard that)
c7c9c75 to
7ef8365
Compare
This code is using the side effects of get() so it is not a meaningless call.
(I do not understand why libc++ decided to nodiscard that)
This was discovered by the macOS update part of microsoft/vcpkg#54519