Compilation fails on Archlinux
Closed this issue · 8 comments
I ran:
./configure --disable-dependency-tracking --enable-lz4
make -j4
And this error occurs on '0.7.61.6':
template_db/file_tools.cc: In member function ‘uint32 Blocking_Client_Socket::get_command()’:
template_db/file_tools.cc:82:28: error: ‘uint8_t’ was not declared in this scope
82 | socket_descriptor, ((uint8_t*)&buffer[0])+bytes_in_buffer, buffer.size()*sizeof(uint32) - bytes_in_buffer, 0);
| ^~~~~~~
template_db/file_tools.cc:38:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
37 | #include <iostream>
+++ |+#include <cstdint>
38 | #include <vector>
template_db/file_tools.cc:82:36: error: expected primary-expression before ‘)’ token
82 | socket_descriptor, ((uint8_t*)&buffer[0])+bytes_in_buffer, buffer.size()*sizeof(uint32) - bytes_in_buffer, 0);
| ^
Same thing works on Debian. Is there a way to compile it on Archlinux?
Can you try to reach out to your Archlinux community and discuss it with them in a first step? They might be in a better position to point you to Archlinux specific issues.
I thought this might be something ArchLinux specific, like in AirenSoft/OvenMediaEngine#1271 ... The issue suggests that the missing "std::" namespace for uint8_t is causing the issue. However, the error message there is slightly different.
Maybe worth noting: They have resolved the issue by including stdint.h since they prefer using uint8_t over std::uint8_t.
Thanks for investigating my issue, but this does not seem to have fixed it, also looking at the diff between the .6 and .7 tar file, there is no code change except the version number.
I tested this on an ArchLinux docker image now. Like the compiler error message above states, the only missing thing was an #include <cstdint>
in template_db/file_tools.cc line 38.
template_db/file_tools.cc:38:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?