ygrek / mldonkey

cross-platform multi-network p2p daemon
http://mldonkey.sourceforge.net/
Other
235 stars 43 forks source link

int64_t error compile #59

Closed somethingGoneWrong closed 2 years ago

somethingGoneWrong commented 3 years ago

Hi, i'll try to compile it on LXC alpine 3.12 and I get this error:

/root/mldonkey-3.1.7-2/patches/local/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60  -verbose -ccopt "-I /byterun -o src/utils/lib/fst_hash.o" -ccopt "-g -O2    " -ccopt " " -cclib "-lz  " -c src/utils/lib/fst_hash.c
+ gcc -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC -c -I /byterun -o src/utils/lib/fst_hash.o -g -O2        -I'/root/mldonkey-3.1.7-2/patches/local/lib/ocaml' 'src/utils/lib/fst_hash.c'
src/utils/lib/fst_hash.c:200:52: error: unknown type name 'int64_t'; did you mean 'int64'?
  200 | int fst_hash_file (unsigned char *fth, char *file, int64_t filesize)

here the configure logs and here the compile logs; how can I fix it? Is there a problem with zlib library? Here mine version:

TEST-alpine:~/mldonkey-3.1.7-2# apk info zlib
zlib-1.2.11-r3 description:
A compression/decompression Library

zlib-1.2.11-r3 webpage:
https://zlib.net/

zlib-1.2.11-r3 installed size:
110592

TEST-alpine:~/mldonkey-3.1.7-2# apk info zlib-dev
zlib-dev-1.2.11-r3 description:
A compression/decompression Library (development files)

zlib-dev-1.2.11-r3 webpage:
https://zlib.net/

zlib-dev-1.2.11-r3 installed size:
143360
ygrek commented 3 years ago

It is not the problem with zlib afaics, try adding #include <stdint.h> on top of src/utils/lib/fst_hash.c. What is your C compiler and version?

somethingGoneWrong commented 3 years ago

adding #include on top of src/utils/lib/fst_hash.c

thanks, now it can compile.

What is your C compiler and version?

TEST-alpine:~/mldonkey-3.1.7-2# gcc --version
gcc (Alpine 9.3.0) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.