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

Compile error on MacOS #150

Closed
serialcode9527 opened this issue May 14, 2024 · 8 comments
Closed

Compile error on MacOS #150

serialcode9527 opened this issue May 14, 2024 · 8 comments

Comments

@serialcode9527
Copy link

serialcode9527 commented May 14, 2024

[1/171] Compile C++ build/macos/debug/obj/yoga/Cache.obj
FAILED: build/macos/debug/obj/yoga/Cache.obj
clang -MMD -MT build/macos/debug/obj/yoga/Cache.obj -MF build/macos/debug/obj/yoga/Cache.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/Cache.obj -c 3rd/yoga/yoga/algorithm/Cache.cpp
In file included from 3rd/yoga/yoga/algorithm/Cache.cpp:9:
In file included from 3rd/yoga/yoga/algorithm/PixelGrid.h:11:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[2/171] Compile C++ build/macos/debug/obj/yoga/AbsoluteLayout.obj
FAILED: build/macos/debug/obj/yoga/AbsoluteLayout.obj
clang -MMD -MT build/macos/debug/obj/yoga/AbsoluteLayout.obj -MF build/macos/debug/obj/yoga/AbsoluteLayout.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/AbsoluteLayout.obj -c 3rd/yoga/yoga/algorithm/AbsoluteLayout.cpp
In file included from 3rd/yoga/yoga/algorithm/AbsoluteLayout.cpp:8:
In file included from 3rd/yoga/yoga/algorithm/AbsoluteLayout.h:11:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[3/171] Compile C++ build/macos/debug/obj/yoga/YGConfig.obj
FAILED: build/macos/debug/obj/yoga/YGConfig.obj
clang -MMD -MT build/macos/debug/obj/yoga/YGConfig.obj -MF build/macos/debug/obj/yoga/YGConfig.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/YGConfig.obj -c 3rd/yoga/yoga/YGConfig.cpp
In file included from 3rd/yoga/yoga/YGConfig.cpp:10:
In file included from 3rd/yoga/yoga/debug/Log.h:14:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[4/171] Compile C++ build/macos/debug/obj/yoga/Baseline.obj
FAILED: build/macos/debug/obj/yoga/Baseline.obj
clang -MMD -MT build/macos/debug/obj/yoga/Baseline.obj -MF build/macos/debug/obj/yoga/Baseline.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/Baseline.obj -c 3rd/yoga/yoga/algorithm/Baseline.cpp
In file included from 3rd/yoga/yoga/algorithm/Baseline.cpp:10:
In file included from 3rd/yoga/yoga/algorithm/Align.h:13:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[5/171] Compile C++ build/macos/debug/obj/yoga/YGNode.obj
FAILED: build/macos/debug/obj/yoga/YGNode.obj
clang -MMD -MT build/macos/debug/obj/yoga/YGNode.obj -MF build/macos/debug/obj/yoga/YGNode.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/YGNode.obj -c 3rd/yoga/yoga/YGNode.cpp
In file included from 3rd/yoga/yoga/YGNode.cpp:11:
In file included from 3rd/yoga/yoga/algorithm/CalculateLayout.h:13:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[6/171] Compile C++ build/macos/debug/obj/yoga/YGNodeLayout.obj
FAILED: build/macos/debug/obj/yoga/YGNodeLayout.obj
clang -MMD -MT build/macos/debug/obj/yoga/YGNodeLayout.obj -MF build/macos/debug/obj/yoga/YGNodeLayout.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/YGNodeLayout.obj -c 3rd/yoga/yoga/YGNodeLayout.cpp
In file included from 3rd/yoga/yoga/YGNodeLayout.cpp:11:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[7/171] Compile C++ build/macos/debug/obj/yoga/YGNodeStyle.obj
FAILED: build/macos/debug/obj/yoga/YGNodeStyle.obj
clang -MMD -MT build/macos/debug/obj/yoga/YGNodeStyle.obj -MF build/macos/debug/obj/yoga/YGNodeStyle.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/YGNodeStyle.obj -c 3rd/yoga/yoga/YGNodeStyle.cpp
In file included from 3rd/yoga/yoga/YGNodeStyle.cpp:10:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[8/171] Compile C++ build/macos/debug/obj/yoga/FlexLine.obj
FAILED: build/macos/debug/obj/yoga/FlexLine.obj
clang -MMD -MT build/macos/debug/obj/yoga/FlexLine.obj -MF build/macos/debug/obj/yoga/FlexLine.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/FlexLine.obj -c 3rd/yoga/yoga/algorithm/FlexLine.cpp
In file included from 3rd/yoga/yoga/algorithm/FlexLine.cpp:10:
In file included from 3rd/yoga/yoga/algorithm/BoundAxis.h:13:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[9/171] Compile C++ build/macos/debug/obj/yoga/YGPixelGrid.obj
FAILED: build/macos/debug/obj/yoga/YGPixelGrid.obj
clang -MMD -MT build/macos/debug/obj/yoga/YGPixelGrid.obj -MF build/macos/debug/obj/yoga/YGPixelGrid.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/YGPixelGrid.obj -c 3rd/yoga/yoga/YGPixelGrid.cpp
In file included from 3rd/yoga/yoga/YGPixelGrid.cpp:10:
In file included from 3rd/yoga/yoga/algorithm/PixelGrid.h:11:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
[10/171] Compile C++ build/macos/debug/obj/yoga/CalculateLayout.obj
FAILED: build/macos/debug/obj/yoga/CalculateLayout.obj
clang -MMD -MT build/macos/debug/obj/yoga/CalculateLayout.obj -MF build/macos/debug/obj/yoga/CalculateLayout.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/CalculateLayout.obj -c 3rd/yoga/yoga/algorithm/CalculateLayout.cpp
In file included from 3rd/yoga/yoga/algorithm/CalculateLayout.cpp:16:
In file included from 3rd/yoga/yoga/algorithm/AbsoluteLayout.h:11:
In file included from 3rd/yoga/yoga/node/Node.h:25:
In file included from 3rd/yoga/yoga/style/Style.h:32:
3rd/yoga/yoga/style/StyleValuePool.h:60:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:60:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:18: error: no member named 'bit_cast' in namespace 'std'
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
            ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:75:32: error: expected '(' for function-style cast or type construction
          ? std::bit_cast<float>(buffer_.get32(handle.value()))
                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:48: error: no member named 'bit_cast' in namespace 'std'
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                          ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:90:57: error: unexpected type name 'uint32_t': expected expression
          buffer_.replace(handle.value(), std::bit_cast<uint32_t>(value));
                                                        ^
3rd/yoga/yoga/style/StyleValuePool.h:95:41: error: no member named 'bit_cast' in namespace 'std'
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                   ~~~~~^
3rd/yoga/yoga/style/StyleValuePool.h:95:50: error: unexpected type name 'uint32_t': expected expression
      auto newIndex = buffer_.push(std::bit_cast<uint32_t>(value));
                                                 ^
8 errors generated.
ninja: build stopped: subcommand failed.

System: MacOS 13.0

看起来像是luamake 使用了系统的/usr/bin/clang , 而这个版本的clang不支持c++20。<-- 个人判断是这个原因

验证了下,确实是clang版本的问题,用macports 装的clang-17 ,可以正常执行编译命令

/opt/local/bin/clang-mp-17 -MMD -MT build/macos/debug/obj/yoga/FlexLine.obj -MF build/macos/debug/obj/yoga/FlexLine.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I3rd/yoga -DDEBUG -o build/macos/debug/obj/yoga/FlexLine.obj -c 3rd/yoga/yoga/algorithm/FlexLine.cpp

luamake 如何指定用特定版本或目录的clang呢?

@actboy168
Copy link
Contributor

luamake -cc clang-17

@serialcode9527
Copy link
Author

luamake -cc clang-17

感谢,在我的case下是
luamake -cc clang-mp-17

@serialcode9527
Copy link
Author

[35/352] Compile C++ build/macos/debug/obj/bee/lua_filesystem.obj
FAILED: build/macos/debug/obj/bee/lua_filesystem.obj
clang-mp-17 -MMD -MT build/macos/debug/obj/bee/lua_filesystem.obj -MF build/macos/debug/obj/bee/lua_filesystem.obj.d -std=c++20  -Wall -g -mmacosx-version-min=13.3 -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua -Ibuild/macos/debug/lua54 -DBEE_STATIC -o build/macos/debug/obj/bee/lua_filesystem.obj -c 3rd/bee.lua/binding/lua_filesystem.cpp
3rd/bee.lua/binding/lua_filesystem.cpp:114:71: error: reference to 'format_string' is ambiguous
  114 |     static void lua_pusherrmsg(lua_State* L, std::error_code ec, std::format_string<Args...> fmt, Args... args) {
      |                                                                       ^
3rd/bee.lua/bee/nonstd/format.h:42:18: note: candidate found by name lookup is 'std::format_string'
   42 |     using ::fmt::format_string;
      |                  ^
/opt/local/libexec/llvm-17/bin/../include/c++/v1/__format/format_functions.h:373:1: note: candidate found by name lookup is 'std::__1::format_string'
  373 | using format_string = basic_format_string<char, type_identity_t<_Args>...>;
      | ^
1 error generated.

后续编译遇到这个错误,怎么解?

@serialcode9527
Copy link
Author

[186/311] Compile C++ build/macos/debug/obj/rmlui_css/StyleSheetNode.obj
FAILED: build/macos/debug/obj/rmlui_css/StyleSheetNode.obj
clang-mp-17 -MMD -MT build/macos/debug/obj/rmlui_css/StyleSheetNode.obj -MF build/macos/debug/obj/rmlui_css/StyleSheetNode.obj.d -std=c++2b  -Wall -g -mmacosx-version-min=13.3 -I./3rd/glm -Ipkg/ant.rmlui/src -I./3rd/yoga -I./3rd/stylecache -I./3rd/bee.lua -Ibuild/macos/debug/lua54 -DGLM_ENABLE_EXPERIMENTAL -DGLM_FORCE_QUAT_DATA_XYZW -DGLM_FORCE_INTRINSICS -DDEBUG -o build/macos/debug/obj/rmlui_css/StyleSheetNode.obj -c pkg/ant.rmlui/src/css/StyleSheetNode.cpp
In file included from pkg/ant.rmlui/src/css/StyleSheetNode.cpp:6:
./3rd/bee.lua/bee/nonstd/charconv.h:40:19: error: reference to 'to_chars_result' is ambiguous
   40 |     [[nodiscard]] to_chars_result to_chars(char* first, char* last, const T value) noexcept {
      |                   ^
./3rd/bee.lua/bee/nonstd/charconv.h:34:12: note: candidate found by name lookup is 'std::to_chars_result'
   34 |     struct to_chars_result {
      |            ^
/opt/local/libexec/llvm-17/bin/../include/c++/v1/__charconv/to_chars_result.h:24:34: note: candidate found by name lookup is 'std::__1::to_chars_result'
   24 | struct _LIBCPP_EXPORTED_FROM_ABI to_chars_result {
      |                                  ^
1 error generated.
[195/311] Compile C++ build/macos/debug/obj/rmlui_css/StyleSheetSpecification.obj
ninja: build stopped: subcommand failed.

还有这个编译错误,和上面那个错误,都跟 3rd/bee.lua/bee/nonstd 的代码有关系

@actboy168
Copy link
Contributor

bee有个检测,如果你的编译器支持charconv/format就用编译器的,不支持就用bee自带的。检测是用了c++的feature test,但clang(准确地说是libc++)在这方面做到比较糟糕,明明还不支持,或者不完全支持就开始定义这个宏。

我没有你的环境,所以不知道具体的原因。你可以尝试通过检查libc++的版本的方式来决定激活这些功能。可能会比feature test更准确。

@serialcode9527
Copy link
Author

serialcode9527 commented May 15, 2024

我没有你的环境,所以不知道具体的原因。

需要我提供哪些环境信息,一起定位下原因

@serialcode9527
Copy link
Author

你可以尝试通过检查libc++的版本的方式来决定激活这些功能

或者可以细说下这个怎么操作吗,对c++及其编译不是很熟

@actboy168
Copy link
Contributor

actboy168 commented May 15, 2024

对于format的错误,你可以看这个文件https://github.com/actboy168/bee.lua/blob/master/bee/nonstd/format.h

看起来是你的编译器是支持std::format的,但现在的检测代码却认为不支持。

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

No branches or pull requests

2 participants