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

Can't build on Manjaro #470

Closed
desuex opened this issue Jun 4, 2023 · 4 comments
Closed

Can't build on Manjaro #470

desuex opened this issue Jun 4, 2023 · 4 comments
Labels
build Build system and compilation

Comments

@desuex
Copy link

desuex commented Jun 4, 2023

My flags are
cmake -B Build -S . -DBUILD_SAMPLES=ON -DCMAKE_TOOLCHAIN_FILE="~/tools/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSAMPLES_BACKEND=SDL_SDLrenderer -DCMAKE_CXX_FLAGS="-std=c++14"

Here's the error I'm getting:

[ 14%] Building CXX object CMakeFiles/RmlCore.dir/Source/Core/Element.cpp.o
In file included from /home/admin/tools/RmlUi/Source/Core/Element.cpp:52:
/home/admin/tools/RmlUi/Source/Core/ElementStyle.h:43:31: error: no type named 'uint8_t' in namespace 'std'; did you mean simply 'uint8_t'?
enum class PseudoClassState : std::uint8_t { Clear = 0, Set = 1, Override = 2 };
                              ^~~~~~~~~~~~
                              uint8_t
/usr/include/bits/stdint-uintn.h:24:19: note: 'uint8_t' declared here
typedef __uint8_t uint8_t;
                  ^
1 error generated.

Any idea what I'm doing wrong? I'm following the guide in readme.md.

@mikke89 mikke89 added the build Build system and compilation label Jun 4, 2023
@mikke89
Copy link
Owner

mikke89 commented Jun 4, 2023

Hey. Which version of clang are you using?

Normally, both the std-namespaced and non-namespaced version of these types are made available, but according to this, they are not required to. I prefer not to type the namespace for these types, which leaves us with two alternatives:

  1. We can either replace all std-prefixed integer types with non-std, and ensure that we always #include <stdint.h>.
  2. Or alternatively, we always #include <cstdint> and instead write using std::uint8_t; [...] inside the Rml namespace.

@desuex
Copy link
Author

desuex commented Jun 4, 2023

Here's my clang -v, I hope it would help. I can try to install another version if it might help.

clang version 15.0.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/13.1.1
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

@mikke89
Copy link
Owner

mikke89 commented Jun 4, 2023

I see, that's newer than we currently use on our CI. Maybe they tightened it up a bit, or changed around some include dependencies.

I pushed a commit just now, can you test these changes?

@desuex
Copy link
Author

desuex commented Jun 4, 2023

Thank you! Now it works perfectly

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

No branches or pull requests

2 participants