Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

mlua 0.8.3 fails to build #90

Open
krumelmonster opened this issue Jul 10, 2023 · 0 comments · May be fixed by #94
Open

mlua 0.8.3 fails to build #90

krumelmonster opened this issue Jul 10, 2023 · 0 comments · May be fixed by #94

Comments

@krumelmonster
Copy link

mlua 0.8.3 (up to 0.8.6), as specified in Cargo.lock, fails to build with gcc 13.1.1 due to a missing include in the luau version it uses.

I got to build and run blackjack by running cargo update -p mlua --precise 0.8.7 or cargo update -p mlua (0.8.9).

gcc errors index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp: In function ‘bool Luau::equalsLower(std::string_view, std::string_view)’: index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:208:21: error: ‘uint8_t’ was not declared in this scope 208 | if (tolower(uint8_t(lhs[i])) != tolower(uint8_t(rhs[i]))) | ^~~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:10:1: note: ‘uint8_t’ is defined in header ‘’; did you forget to ‘#include ’? 9 | #include +++ |+#include 10 | index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp: In function ‘size_t Luau::hashRange(const char*, size_t)’: index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:217:5: error: ‘uint32_t’ was not declared in this scope 217 | uint32_t hash = 2166136261; | ^~~~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:217:5: note: ‘uint32_t’ is defined in header ‘’; did you forget to ‘#include ’? index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:221:9: error: ‘hash’ was not declared in this scope; did you mean ‘std::hash’? 221 | hash ^= uint8_t(data[i]); | ^~~~ | std::hash In file included from /usr/include/c++/13.1.1/bits/stl_bvector.h:61, from /usr/include/c++/13.1.1/vector:67, from index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/include/Luau/StringUtils.h:4, from index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:2: /usr/include/c++/13.1.1/bits/functional_hash.h:59:12: note: ‘std::hash’ declared here 59 | struct hash; | ^~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:221:17: error: ‘uint8_t’ was not declared in this scope 221 | hash ^= uint8_t(data[i]); | ^~~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:221:17: note: ‘uint8_t’ is defined in header ‘’; did you forget to ‘#include ’? index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:225:12: error: ‘hash’ was not declared in this scope; did you mean ‘std::hash’? 225 | return hash; | ^~~~ | std::hash /usr/include/c++/13.1.1/bits/functional_hash.h:59:12: note: ‘std::hash’ declared here 59 | struct hash; | ^~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp: In function ‘std::string Luau::escape(std::string_view, bool)’: index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:238:10: error: ‘uint8_t’ was not declared in this scope 238 | for (uint8_t c : s) | ^~~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:238:10: note: ‘uint8_t’ is defined in header ‘’; did you forget to ‘#include ’? index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:290:5: error: expected primary-expression before ‘return’ 290 | return r; | ^~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:288:6: error: expected ‘;’ before ‘return’ 288 | } | ^ | ; 289 | 290 | return r; | ~~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:290:5: error: expected primary-expression before ‘return’ 290 | return r; | ^~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:288:6: error: expected ‘)’ before ‘return’ 288 | } | ^ | ) 289 | 290 | return r; | ~~~~~~ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:238:9: note: to match this ‘(’ 238 | for (uint8_t c : s) | ^ index.crates.io-6f17d22bba15001f/luau0-src-0.3.8+luau545/luau/Ast/src/StringUtils.cpp:291:1: warning: control reaches end of non-void function [-Wreturn-type] 291 | } | ^ exit status: 1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant