Can't compile v3/master on Alpine Linux 3.4
Getting errors like:
In file included from seclang-parser.yy:74:0,
from ../src/parser/driver.h:32,
from rules.cc:26:
../src/actions/transformations/parity_odd_7bit.h:36:47: error: 'u_int64_t' has not been declared
static bool inplace(unsigned char *input, u_int64_t input_len);
^
In file included from seclang-parser.yy:91:0,
from ../src/parser/driver.h:32,
from rules.cc:26:
../src/actions/transformations/html_entity_decode.h:42:46: error: 'u_int64_t' has not been declared
static int inplace(unsigned char *input, u_int64_t input_len);
gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/5.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-5.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 5.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-esp --enable-cloog-backend --enable-languages=c,c++,objc,java,fortran,ada --disable-libssp --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib
Thread model: posix
gcc version 5.3.0 (Alpine 5.3.0)
g++ -v:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/5.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-5.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 5.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-esp --enable-cloog-backend --enable-languages=c,c++,objc,java,fortran,ada --disable-libssp --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib
Thread model: posix
gcc version 5.3.0 (Alpine 5.3.0)
How to resolve this issue?
Hi @GR3S,
Looks like this is related to uint64_t being defined as C99 standard and u_int64_t doesn't seem to be in the standard, although it seems to be pretty common... My guess is that Alpine's minimalistic approach is a bit more picky then most Linuxes out there and hence why we don't saw this issue triggering in other distros before but I will need to look more into this to know for sure.
After fixing these statements in the code I managed to get v3 compiled on Alpine 3.4.x.
Give it a try and let us know.
As pointed out by @victorhora, uint64_t is the widely adopted name. Changes already merged [cf4deaa3a01716926028e2aaf48a2bcc1c8b933f].
Most helpful comment
As pointed out by @victorhora, uint64_t is the widely adopted name. Changes already merged [cf4deaa3a01716926028e2aaf48a2bcc1c8b933f].