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

build failure with OCaml 5 (build error. Unbound module Genlex) #120

Open
yunliu1998 opened this issue Nov 17, 2024 · 7 comments
Open

build failure with OCaml 5 (build error. Unbound module Genlex) #120

yunliu1998 opened this issue Nov 17, 2024 · 7 comments

Comments

@yunliu1998
Copy link

when i run gmake, i get these:

File "tools/ocamlpp.ml", line 125, characters 5-11:
125 | open Genlex
           ^^^^^^
Error: Unbound module Genlex

How can i fix it?

@ygrek
Copy link
Owner

ygrek commented Nov 24, 2024

@LoongUser77
Copy link

LoongUser77 commented Nov 29, 2024

Hello, I think I have the same issue:

Arguments to configure:  '--enable-option-checking=fatal' '--disable-bittorrent' '--disable-gnutella' '--disable-fasttrack'
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking how to run the C preprocessor... gcc -E
checking build system type... loongarch64-unknown-linux-gnu
checking host system type... loongarch64-unknown-linux-gnu

--------------------------------
     Checking system tools.
--------------------------------
checking for ranlib... ranlib
checking for gmake... no
checking for make... make
checking if make is GNU make ... yes
checking for bzip2... bzip2
checking for gzip... (cached) bzip2
checking for perl... /usr/bin/perl
checking for rpmbuild... no
checking for rpm... no
checking for wget... wget
----------------------------------------
     Checking system tools finished.
----------------------------------------

--------------------------------
     Checking OCaml compiler.
--------------------------------
checking for ocamlc.opt... /usr/bin/ocamlc.opt
checking for ocamlc... /usr/bin/ocamlc.opt
checking for camlp4... /usr/bin/camlp4
checking for ocamlopt.opt... /usr/bin/ocamlopt.opt
checking for ocamlopt... (cached) /usr/bin/ocamlopt.opt
checking for ocamldep... /usr/bin/ocamldep
checking for ocamllex.opt... /usr/bin/ocamllex.opt
checking for ocamllex... (cached) /usr/bin/ocamllex.opt
checking for ocamlyacc... /usr/bin/ocamlyacc
checking for ocamldoc... /usr/bin/ocamldoc
checking for ocamlmktop... /usr/bin/ocamlmktop
checking for camlp4... (cached) /usr/bin/camlp4
checking for camlp4of... /usr/bin/camlp4of
-------------------------------------------
     Checking OCaml 5.1.1 finished.
-------------------------------------------
checking ocaml num library... no

----------------------------------
     Checking system headers.
----------------------------------
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for setrlimit... yes
checking for getrlimit... yes
checking for strerror_r... yes
checking for strerror... yes
checking for posix_fallocate... yes
checking for byteswap.h... yes
checking for sys/utsname.h... yes
checking for arpa/inet.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking for sys/poll.h... yes
checking for poll... yes
checking for sys/vfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/param.h... yes
checking for sys/mount.h... yes
-------------------------------------------
     Checking system headers finished.
-------------------------------------------

-----------------------------------
     Checking system libraries.
-----------------------------------
----- checking zlib (required)
checking for inflate in -lz... yes
checking for zlib.h... yes
checking for zlibVersion in -lz... yes
----- checking bzlib (optional)
checking for bzlib.h... yes
checking for BZ2_bzReadOpen in -lbz2... yes
checking for BZ2_bzlibVersion in -lbz2... yes
----- checking libmagic (GNU file) (optional)
checking for gcc options needed to detect all undeclared functions... none needed
checking for magic.h... yes
checking for magic_file in -lmagic... yes
checking whether MAGIC_ERROR is declared... yes
----- checking gd (optional)
checking for gdlib-config... no
checking for gd.h... no
configure: libgd not available
----- checking iconv (optional)
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... unknown
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ELF binary format... yes
checking for the common suffixes of directories in the library search path... lib,lib,lib64
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for locale_charset... no
configure: found nl_langinfo(CODESET)
checking for locale_charset in -lcharset... no
checking for libcharset.h... no
checking for langinfo.h... yes
checking for locale.h... yes
----- checking thread support (optional, strongly advised)
checking for a sed that does not truncate output... /usr/bin/sed
checking whether gcc is Clang... no
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
----- GNU C Library version
checking for linux/limits.h... yes
checking for gnu/libc-version.h... yes
checking for GNU C Library version... 2.39
---------------------------------------------
     Checking system libraries finished.
---------------------------------------------

--------------------------------------
     Checking activated networks.
--------------------------------------
checking eDonkey... yes
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking for g++... g++
checking eMule SUI... yes
checking whether C++ compiler accepts -fno-omit-frame-pointer... yes
checking whether C++ compiler accepts -mno-omit-leaf-frame-pointer... no
checking FileTP... yes
checking DirectConnect... yes
-----------------------------------------------
     Checking activated networks finished.
-----------------------------------------------
configure: creating ./config.status
config.status: creating Makefile.config
config.status: creating mldonkey.rc
config.status: creating ../src/utils/lib/autoconf.ml.new
config.status: creating ../src/utils/lib/gAutoconf.ml.new
config.status: creating ../src/utils/bitstring/bitstring.ml
config.status: creating ../src/utils/lib/magic.ml
config.status: creating ../src/networks/donkey/donkeySui.ml
config.status: creating ../src/daemon/driver/driverGraphics.ml
config.status: creating ../packages/rpm/mldonkey.spec
config.status: creating ../packages/rpm/Makefile
config.status: creating ../packages/slackware/mldonkey.options
config.status: creating config.h
config.status: config.h is unchanged

Building dependencies (if it blocks, try 'make depend' to see the problem)
Building dependencies fails: try: 'make depend'

Configuring MLDonkey 3.2.1 completed.

Network modules:
 - eDonkey           enabled (eMule SUI enabled)
 - BitTorrent                disabled - ocaml num library missing (must be installed manually when building with OCaml >= 4.06)
 - FileTP (aka wget) enabled
 - Fasttrack                 disabled
 - Gnutella                  disabled - unmaintained
 - Gnutella2                 disabled - unmaintained
 - Direct Connect    enabled
 - Open Napster              disabled - currently not usable
 - Soulseek                  disabled - currently not usable
 - OpenFT                    disabled - currently not usable

Core features:
 - zlib (required)   enabled
 - threads           enabled
 - bzip2             enabled
 - iconv             enabled
 - libmagic          enabled
 - upnp & natpmp             disabled
 - graphical stats           disabled

Compilers:
 - OCaml version     5.1.1 
 - gcc version       14.1.1
 - g++ version       14.1.1

\nNow execute 'make' to start compiling. Good luck!

To compile a static code execute:     make mlnet.static
To produce a release tarball execute: make release.mlnet.static
To clean the build directory execute: make maintainerclean

Compiling CryptoPP.cc can take several minutes, on slow machines up to half an hour.
  • make -j16
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70   -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c tools/ocamlpp.ml
/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70    -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c src/daemon/common/commonMain.ml
/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70    -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c src/utils/extlib/IO.ml
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/utils/cdk/zlibstubs.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/utils/cdk/zlibstubs.c
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/utils/cdk/bzip2stubs.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/utils/cdk/bzip2stubs.c
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/config/unix/os_stubs_c.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/config/unix/os_stubs_c.c
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/utils/lib/fst_hash.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/utils/lib/fst_hash.c
cp -f src/utils/lib/md4_cc.o src/utils/lib/md4_comp.o
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/utils/lib/charsetstubs.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/utils/lib/charsetstubs.c
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/utils/lib/sha1_c.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/utils/lib/sha1_c.c
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/utils/lib/tiger.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/utils/lib/tiger.c
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70  -verbose -ccopt "-I /byterun -o src/utils/lib/stubs_c.o" -ccopt "-g -O2     -pthread" -ccopt " " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" -c src/utils/lib/stubs_c.c
+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/utils/lib/fst_hash.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/utils/lib/fst_hash.c'
/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70    -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c src/utils/cdk/bzlib.ml
/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70    -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c src/utils/cdk/bzip2.ml
+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/utils/cdk/zlibstubs.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/utils/cdk/zlibstubs.c'
+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/utils/cdk/bzip2stubs.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/utils/cdk/bzip2stubs.c'
File "_none_", line 1:
Alert ocaml_deprecated_auto_include: 
OCaml's lib directory layout changed in 5.0. The str subdirectory has been
automatically added to the search path, but you should add -I +str to the
command-line to silence this alert (e.g. by adding str to the list of
libraries in your dune file, or adding use_str to your _tags file for
ocamlbuild, or using -package str for ocamlfind).

File "tools/ocamlpp.ml", line 125, characters 5-11:
125 | open Genlex
           ^^^^^^
Error: Unbound module Genlex+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/config/unix/os_stubs_c.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/config/unix/os_stubs_c.c'
/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70    -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c src/utils/cdk/zlib.ml

/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70    -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c src/utils/cdk/zlib2.ml
File "src/daemon/common/commonMain.ml", line 20, characters 5-12:
20 | open Printf2
          ^^^^^^^
Error: Unbound module Printf2make: *** [Makefile:5443: tools/ocamlpp.cmo] Error 2
make: *** Waiting for unfinished jobs....

Hint: Did you mean Printf?+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/utils/lib/charsetstubs.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/utils/lib/charsetstubs.c'

+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/utils/lib/sha1_c.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/utils/lib/sha1_c.c'
make: *** [Makefile:5440: src/daemon/common/commonMain.cmx] Error 2
+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/utils/lib/tiger.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/utils/lib/tiger.c'
+ gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -g -ffile-prefix-map=/build/ocaml/src=/usr/src/debug/ocaml -flto=auto -ffat-lto-objects  -D_FILE_OFFSET_BITS=64    -c  -I /byterun -o src/utils/lib/stubs_c.o -g -O2     -pthread   -pthread  -I'/usr/lib/ocaml' 'src/utils/lib/stubs_c.c'
File "src/utils/extlib/IO.ml", line 22, characters 16-26:
22 | module Stdlib = Pervasives
                     ^^^^^^^^^^
Error: Unbound module Pervasives
make: *** [Makefile:5440: src/utils/extlib/IO.cmx] Error 2
File "src/utils/cdk/bzip2.ml", line 9, characters 13-34:
9 |   { in_chan: Pervasives.in_channel;
                 ^^^^^^^^^^^^^^^^^^^^^
Error: Unbound module Pervasives
make: *** [Makefile:5440: src/utils/cdk/bzip2.cmx] Error 2
File "src/utils/cdk/bzlib.ml", line 1:
Error: Could not find the .cmi file for interface src/utils/cdk/bzlib.mli.
make: *** [Makefile:5440: src/utils/cdk/bzlib.cmx] Error 2
File "src/utils/cdk/zlib2.ml", line 1, characters 5-9:
1 | open Zlib
         ^^^^
Error: Unbound module ZlibIn file included from src/utils/lib/fst_hash.c:182:
src/utils/lib/fst_hash.c: In function ‘fst_hash_file_ml’:
/usr/lib/ocaml/caml/mlvalues.h:329:24: warning: passing argument 1 of ‘fst_hash_file’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ~^~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/lib/fst_hash.c:327:20: note: in expansion of macro ‘String_val’
  327 |   if(fst_hash_file(String_val(digest), String_val(filename),
      |                    ^~~~~~~~~~
src/utils/lib/fst_hash.c:201:35: note: expected ‘unsigned char *’ but argument is of type ‘const char *’
  201 | int fst_hash_file (unsigned char *fth, char *file, int64_t filesize)
      |                    ~~~~~~~~~~~~~~~^~~
/usr/lib/ocaml/caml/mlvalues.h:329:24: warning: passing argument 2 of ‘fst_hash_file’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ~^~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/lib/fst_hash.c:327:40: note: in expansion of macro ‘String_val’
  327 |   if(fst_hash_file(String_val(digest), String_val(filename),
      |                                        ^~~~~~~~~~
src/utils/lib/fst_hash.c:201:46: note: expected ‘char *’ but argument is of type ‘const char *’
  201 | int fst_hash_file (unsigned char *fth, char *file, int64_t filesize)
      |                                        ~~~~~~^~~~

src/utils/lib/fst_hash.c:329:3: error: implicit declaration of function ‘failwith’; did you mean ‘caml_failwith’? [-Wimplicit-function-declaration]
  329 |   failwith("Exception during FST computation");
      |   ^~~~~~~~
      |   caml_failwith
src/utils/lib/fst_hash.c: In function ‘fst_hash_string_ml’:
/usr/lib/ocaml/caml/mlvalues.h:329:24: warning: passing argument 1 of ‘fst_hash_string’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ~^~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/lib/fst_hash.c:334:19: note: in expansion of macro ‘String_val’
  334 |   fst_hash_string(String_val(digest), String_val(s), Int_val(size));
      |                   ^~~~~~~~~~
src/utils/lib/fst_hash.c:275:38: note: expected ‘unsigned char *’ but argument is of type ‘const char *’
  275 | void fst_hash_string (unsigned char *fth, unsigned char *file, int64_t filesize)
      |                       ~~~~~~~~~~~~~~~^~~
make: *** [Makefile:5440: src/utils/cdk/zlib2.cmx] Error 2
/usr/lib/ocaml/caml/mlvalues.h:329:24: warning: passing argument 2 of ‘fst_hash_string’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ~^~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/lib/fst_hash.c:334:39: note: in expansion of macro ‘String_val’
  334 |   fst_hash_string(String_val(digest), String_val(s), Int_val(size));
      |                                       ^~~~~~~~~~
src/utils/lib/fst_hash.c:275:58: note: expected ‘unsigned char *’ but argument is of type ‘const char *’
  275 | void fst_hash_string (unsigned char *fth, unsigned char *file, int64_t filesize)
      |                                           ~~~~~~~~~~~~~~~^~~~
src/utils/lib/fst_hash.c: In function ‘fst_hash_checksum_ml’:
/usr/lib/ocaml/caml/mlvalues.h:329:24: warning: passing argument 1 of ‘fst_hash_checksum’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:77:47: note: in definition of macro ‘Val_long’
   77 | #define Val_long(x)     ((intnat) (((uintnat)(x) << 1)) + 1)
      |                                               ^
src/utils/lib/fst_hash.c:340:10: note: in expansion of macro ‘Val_int’
  340 |   return Val_int(fst_hash_checksum(String_val(digest)));
      |          ^~~~~~~
src/utils/lib/fst_hash.c:340:36: note: in expansion of macro ‘String_val’
  340 |   return Val_int(fst_hash_checksum(String_val(digest)));
      |                                    ^~~~~~~~~~
src/utils/lib/fst_hash.c:185:50: note: expected ‘unsigned char *’ but argument is of type ‘const char *’
  185 | unsigned short fst_hash_checksum (unsigned char *hash)
      |                                   ~~~~~~~~~~~~~~~^~~~
src/utils/cdk/bzip2stubs.c: In function ‘camlzip_bzerror’:
src/utils/cdk/bzip2stubs.c:45:7: error: implicit declaration of function ‘invalid_argument’; did you mean ‘caml_invalid_argument’? [-Wimplicit-function-declaration]
   45 |       invalid_argument("Exception Bzlib.Error not initialized");
      |       ^~~~~~~~~~~~~~~~
      |       caml_invalid_argument
File "src/utils/cdk/zlib.ml", line 1:
Error: Could not find the .cmi file for interface src/utils/cdk/zlib.mli.
src/utils/cdk/bzip2stubs.c:48:10: error: implicit declaration of function ‘copy_string’; did you mean ‘caml_copy_string’? [-Wimplicit-function-declaration]
   48 |     s1 = copy_string(fn);
      |          ^~~~~~~~~~~
      |          caml_copy_string
make: *** [Makefile:5473: src/utils/lib/fst_hash.o] Error 2
make: *** [Makefile:5440: src/utils/cdk/zlib.cmx] Error 2
src/utils/cdk/bzip2stubs.c:71:14: error: implicit declaration of function ‘alloc_small’; did you mean ‘caml_alloc_small’? [-Wimplicit-function-declaration]
   71 |     bucket = alloc_small(3, 0);
      |              ^~~~~~~~~~~
      |              caml_alloc_small
src/utils/cdk/bzip2stubs.c:76:3: error: implicit declaration of function ‘mlraise’; did you mean ‘caml_raise’? [-Wimplicit-function-declaration]
   76 |   mlraise(bucket);
      |   ^~~~~~~
      |   caml_raise
make: *** [Makefile:5473: src/utils/cdk/bzip2stubs.o] Error 2
src/config/unix/os_stubs_c.c: In function ‘os_ftruncate’:
src/config/unix/os_stubs_c.c:70:11: error: implicit declaration of function ‘failwith’ [-Wimplicit-function-declaration]
   70 |   if(!fd) failwith("ftruncate32: file is closed");
      |           ^~~~~~~~
src/config/unix/os_stubs_c.c:86:39: warning: format ‘%Ld’ expects argument of type ‘long long int’, but argument 4 has type ‘OFF_T’ {aka ‘long int’} [-Wformat=]
   86 |       fprintf(stderr, "ftruncate(%d,%Ld)\n", fd, len);
      |                                     ~~^          ~~~
      |                                       |          |
      |                                       |          OFF_T {aka long int}
      |                                       long long int
      |                                     %ld
src/config/unix/os_stubs_c.c: In function ‘glibc_version’:
src/config/unix/os_stubs_c.c:169:7: error: implicit declaration of function ‘copy_string’; did you mean ‘caml_copy_string’? [-Wimplicit-function-declaration]
  169 |   v = copy_string (gnu_get_libc_version());
      |       ^~~~~~~~~~~
      |       caml_copy_string
src/utils/lib/charsetstubs.c: In function ‘raise_error’:
src/utils/lib/charsetstubs.c:171:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  171 |     closure_f = caml_named_value("charset_error");
      |               ^
src/config/unix/os_stubs_c.c: In function ‘os_ftruncate’:
src/config/unix/os_stubs_c.c:83:5: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   83 |     write(fd, &zero, 1);
      |     ^~~~~~~~~~~~~~~~~~~
src/utils/lib/charsetstubs.c:173:3: error: implicit declaration of function ‘raise_constant’; did you mean ‘caml_raise_constant’? [-Wimplicit-function-declaration]
  173 |   raise_constant(*closure_f);
      |   ^~~~~~~~~~~~~~
      |   caml_raise_constant
make: *** [Makefile:5473: src/config/unix/os_stubs_c.o] Error 2
src/utils/lib/charsetstubs.c: In function ‘ml_copy_string_len_and_free’:
src/utils/lib/charsetstubs.c:1339:7: error: implicit declaration of function ‘alloc_string’; did you mean ‘caml_alloc_string’? [-Wimplicit-function-declaration]
 1339 |   v = alloc_string (len);
      |       ^~~~~~~~~~~~
      |       caml_alloc_string
In file included from src/utils/lib/charsetstubs.c:93:
/usr/lib/ocaml/caml/mlvalues.h:329:24: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ~^~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/lib/charsetstubs.c:1340:11: note: in expansion of macro ‘String_val’
 1340 |   memcpy (String_val(v), str, len);
      |           ^~~~~~~~~~
In file included from /usr/include/features.h:503,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from src/utils/lib/charsetstubs.c:31:
/usr/include/bits/string_fortified.h:26:1: note: expected ‘void *’ but argument is of type ‘const char *’
   26 | __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
      | ^~~~~
src/utils/lib/charsetstubs.c: In function ‘ml_convert_string’:
src/utils/lib/charsetstubs.c:1351:38: error: implicit declaration of function ‘string_length’; did you mean ‘caml_string_length’? [-Wimplicit-function-declaration]
 1351 |   c_res = ml_convert(String_val(str),string_length(str),
      |                                      ^~~~~~~~~~~~~
      |                                      caml_string_length
src/utils/lib/charsetstubs.c: In function ‘ml_locale_charset’:
src/utils/lib/charsetstubs.c:1380:11: error: implicit declaration of function ‘copy_string’; did you mean ‘caml_copy_string’? [-Wimplicit-function-declaration]
 1380 |   return (copy_string ((char*) str));
      |           ^~~~~~~~~~~
      |           caml_copy_string
src/utils/cdk/zlibstubs.c: In function ‘camlzip_zlibversion’:
src/utils/cdk/zlibstubs.c:195:7: error: implicit declaration of function ‘copy_string’; did you mean ‘caml_copy_string’? [-Wimplicit-function-declaration]
  195 |   v = copy_string (zlibVersion());
      |       ^~~~~~~~~~~
      |       caml_copy_string
make: *** [Makefile:5473: src/utils/lib/charsetstubs.o] Error 2
make: *** [Makefile:5473: src/utils/cdk/zlibstubs.o] Error 2
In file included from /usr/lib/ocaml/caml/signals.h:24,
                 from src/utils/lib/../../utils/lib/os_stubs.h:94,
                 from src/utils/lib/tiger.c:20:
src/utils/lib/tiger.c: In function ‘tigertree_unsafe_string’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/tiger.c:830:27: note: in expansion of macro ‘String_val’
  830 |   unsigned char *digest = String_val(digest_v);
      |                           ^~~~~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/tiger.c:831:27: note: in expansion of macro ‘String_val’
  831 |   unsigned char *string = String_val(string_v);
      |                           ^~~~~~~~~~
src/utils/lib/tiger.c: In function ‘tiger_unsafe_string’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/tiger.c:841:27: note: in expansion of macro ‘String_val’
  841 |   unsigned char *digest = String_val(digest_v);
      |                           ^~~~~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/tiger.c:842:27: note: in expansion of macro ‘String_val’
  842 |   unsigned char *string = String_val(string_v);
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c: In function ‘try_poll’:
src/utils/lib/stubs_c.c:143:3: error: implicit declaration of function ‘enter_blocking_section’; did you mean ‘caml_enter_blocking_section’? [-Wimplicit-function-declaration]
  143 |   enter_blocking_section();
      |   ^~~~~~~~~~~~~~~~~~~~~~
      |   caml_enter_blocking_section
src/utils/lib/stubs_c.c:145:3: error: implicit declaration of function ‘leave_blocking_section’; did you mean ‘caml_leave_blocking_section’? [-Wimplicit-function-declaration]
  145 |   leave_blocking_section();
      |   ^~~~~~~~~~~~~~~~~~~~~~
      |   caml_leave_blocking_section
src/utils/lib/stubs_c.c: In function ‘ml_getsize64’:
src/utils/lib/stubs_c.c:375:10: error: implicit declaration of function ‘copy_int64’; did you mean ‘caml_copy_int64’? [-Wimplicit-function-declaration]
  375 |   return copy_int64(os_getfilesize(String_val(path)));
      |          ^~~~~~~~~~
      |          caml_copy_int64
In file included from /usr/lib/ocaml/caml/signals.h:24,
                 from src/utils/lib/../../utils/lib/os_stubs.h:94,
                 from src/utils/lib/stubs_c.c:20:
/usr/lib/ocaml/caml/mlvalues.h:329:24: warning: passing argument 1 of ‘os_getfilesize’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ~^~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/lib/stubs_c.c:375:36: note: in expansion of macro ‘String_val’
  375 |   return copy_int64(os_getfilesize(String_val(path)));
      |                                    ^~~~~~~~~~
src/utils/lib/../../utils/lib/os_stubs.h:159:37: note: expected ‘char *’ but argument is of type ‘const char *’
  159 | extern int64_t os_getfilesize(char *path);
      |                               ~~~~~~^~~~
src/utils/lib/stubs_c.c: In function ‘ml_strstr’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:423:13: note: in expansion of macro ‘String_val’
  423 |   char *s = String_val(s_v);
      |             ^~~~~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:424:15: note: in expansion of macro ‘String_val’
  424 |   char *sub = String_val(sub_v);
      |               ^~~~~~~~~~
src/utils/lib/stubs_c.c: In function ‘ml_ints_of_string’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:443:13: note: in expansion of macro ‘String_val’
  443 |   char *s = String_val(s_v);
      |             ^~~~~~~~~~
src/utils/lib/stubs_c.c:484:3: error: implicit declaration of function ‘raise_not_found’; did you mean ‘caml_raise_not_found’? [-Wimplicit-function-declaration]
  484 |   raise_not_found();
      |   ^~~~~~~~~~~~~~~
      |   caml_raise_not_found
src/utils/lib/stubs_c.c:488:9: error: implicit declaration of function ‘alloc’; did you mean ‘valloc’? [-Wimplicit-function-declaration]
  488 |   res = alloc(4,0);
      |         ^~~~~
      |         valloc
src/utils/lib/stubs_c.c: In function ‘sha1_unsafe64_fd’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:512:27: note: in expansion of macro ‘String_val’
  512 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:583:1: note: in expansion of macro ‘ML_HASH’
  583 | ML_HASH(sha1,SHA1_CTX,sha1_begin,sha1_hash, sha1_end)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘sha1_unsafe_string’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:544:27: note: in expansion of macro ‘String_val’
  544 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:583:1: note: in expansion of macro ‘ML_HASH’
  583 | ML_HASH(sha1,SHA1_CTX,sha1_begin,sha1_hash, sha1_end)
      | ^~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:545:27: note: in expansion of macro ‘String_val’
  545 |   unsigned char *string = String_val(string_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:583:1: note: in expansion of macro ‘ML_HASH’
  583 | ML_HASH(sha1,SHA1_CTX,sha1_begin,sha1_hash, sha1_end)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘sha1_unsafe_file’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:558:21: note: in expansion of macro ‘String_val’
  558 |   char *filename  = String_val(filename_v); \
      |                     ^~~~~~~~~~
src/utils/lib/stubs_c.c:583:1: note: in expansion of macro ‘ML_HASH’
  583 | ML_HASH(sha1,SHA1_CTX,sha1_begin,sha1_hash, sha1_end)
      | ^~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:559:27: note: in expansion of macro ‘String_val’
  559 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:583:1: note: in expansion of macro ‘ML_HASH’
  583 | ML_HASH(sha1,SHA1_CTX,sha1_begin,sha1_hash, sha1_end)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘md5_unsafe64_fd’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:512:27: note: in expansion of macro ‘String_val’
  512 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:584:1: note: in expansion of macro ‘ML_HASH’
  584 | ML_HASH(md5,md5_state_t,md5_init,md5_append,md5_finish)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘md5_unsafe_string’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:544:27: note: in expansion of macro ‘String_val’
  544 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:584:1: note: in expansion of macro ‘ML_HASH’
  584 | ML_HASH(md5,md5_state_t,md5_init,md5_append,md5_finish)
      | ^~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:545:27: note: in expansion of macro ‘String_val’
  545 |   unsigned char *string = String_val(string_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:584:1: note: in expansion of macro ‘ML_HASH’
  584 | ML_HASH(md5,md5_state_t,md5_init,md5_append,md5_finish)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘md5_unsafe_file’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:558:21: note: in expansion of macro ‘String_val’
  558 |   char *filename  = String_val(filename_v); \
      |                     ^~~~~~~~~~
src/utils/lib/stubs_c.c:584:1: note: in expansion of macro ‘ML_HASH’
  584 | ML_HASH(md5,md5_state_t,md5_init,md5_append,md5_finish)
      | ^~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:559:27: note: in expansion of macro ‘String_val’
  559 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:584:1: note: in expansion of macro ‘ML_HASH’
  584 | ML_HASH(md5,md5_state_t,md5_init,md5_append,md5_finish)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘md4_unsafe64_fd’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:512:27: note: in expansion of macro ‘String_val’
  512 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:585:1: note: in expansion of macro ‘ML_HASH’
  585 | ML_HASH(md4,MD4_CTX,MD4Init,MD4Update,md4_finish)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘md4_unsafe_string’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:544:27: note: in expansion of macro ‘String_val’
  544 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:585:1: note: in expansion of macro ‘ML_HASH’
  585 | ML_HASH(md4,MD4_CTX,MD4Init,MD4Update,md4_finish)
      | ^~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:545:27: note: in expansion of macro ‘String_val’
  545 |   unsigned char *string = String_val(string_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:585:1: note: in expansion of macro ‘ML_HASH’
  585 | ML_HASH(md4,MD4_CTX,MD4Init,MD4Update,md4_finish)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘md4_unsafe_file’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:558:21: note: in expansion of macro ‘String_val’
  558 |   char *filename  = String_val(filename_v); \
      |                     ^~~~~~~~~~
src/utils/lib/stubs_c.c:585:1: note: in expansion of macro ‘ML_HASH’
  585 | ML_HASH(md4,MD4_CTX,MD4Init,MD4Update,md4_finish)
      | ^~~~~~~
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:559:27: note: in expansion of macro ‘String_val’
  559 |   unsigned char *digest = String_val(digest_v); \
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c:585:1: note: in expansion of macro ‘ML_HASH’
  585 | ML_HASH(md4,MD4_CTX,MD4Init,MD4Update,md4_finish)
      | ^~~~~~~
src/utils/lib/stubs_c.c: In function ‘tigertree_unsafe64_fd’:
/usr/lib/ocaml/caml/mlvalues.h:329:23: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  329 | #define String_val(x) ((const char *) Bp_val(x))
      |                       ^
src/utils/lib/stubs_c.c:636:27: note: in expansion of macro ‘String_val’
  636 |   unsigned char *digest = String_val(digest_v);
      |                           ^~~~~~~~~~
src/utils/lib/stubs_c.c: In function ‘copy_statfs’:
src/utils/lib/stubs_c.c:1132:7: error: implicit declaration of function ‘copy_string’ [-Wimplicit-function-declaration]
 1132 |   v = copy_string ("-1"); caml_modify (&Field (bufv, 9), v);
      |       ^~~~~~~~~~~
src/utils/lib/stubs_c.c: In function ‘statfs_statfs’:
src/utils/lib/stubs_c.c:1155:5: error: implicit declaration of function ‘raise_constant’; did you mean ‘caml_raise_constant’? [-Wimplicit-function-declaration]
 1155 |     raise_constant(*(value *)caml_named_value("error"));
      |     ^~~~~~~~~~~~~~
      |     caml_raise_constant
src/utils/lib/stubs_c.c: In function ‘ml_getrlimit’:
src/utils/lib/stubs_c.c:1370:12: error: implicit declaration of function ‘alloc_tuple’; did you mean ‘caml_alloc_tuple’? [-Wimplicit-function-declaration]
 1370 |   retval = alloc_tuple(2);
      |            ^~~~~~~~~~~
      |            caml_alloc_tuple
src/utils/lib/stubs_c.c: In function ‘dns_thread’:
src/utils/lib/stubs_c.c:854:3: warning: ignoring return value of ‘nice’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  854 |   nice(19);
      |   ^~~~~~~~
make: *** [Makefile:5473: src/utils/lib/stubs_c.o] Error 2
```


                  -`                    loongson@loongson01 
                  .o+`                   ------------------- 
                 `ooo/                   OS: Arch Linux loongarch64 
                `+oooo:                  Host: Loongson-3A6000-HV-7A2000-1w-V0.1-EVB 
               `+oooooo:                 Kernel: 6.10.0-2 
               -+oooooo+:                Uptime: 1 hour, 4 mins 
             `/:-:++oooo+:               Packages: 630 (pacman) 
            `/++++/+++++++:              Shell: bash 5.2.26 
           `/++++++++++++++:             Resolution: 1920x1080 
          `/+++ooooooooooooo/`           Terminal: /dev/pts/0 
         ./ooosssso++osssssso+`          CPU: Loongson-3A6000-HV (8) 
        .oossssso-````/ossssss+`         GPU: 00:06.1 Loongson Technology LLC Display Controller 
       -osssssso.      :ssssssso.        Memory: 245MiB / 15970MiB 
      :osssssss/        osssso+++.
     /ossssssss/        +ssssooo/-                               
   `/ossssso+/:-        -:/+osssso+-                             
  `+sso+:-`                 `.-/+oso:
 `++:.                           `-/+/
 .`                                 `/



@carlonluca
Copy link
Contributor

Try building with a single job.

@LoongUser77
Copy link

Hi,

I used -j because I obtain more logs, but with 1 job it fails too:

make
/usr/bin/ocamlc.opt -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70   -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4  -c tools/ocamlpp.ml
File "_none_", line 1:
Alert ocaml_deprecated_auto_include: 
OCaml's lib directory layout changed in 5.0. The str subdirectory has been
automatically added to the search path, but you should add -I +str to the
command-line to silence this alert (e.g. by adding str to the list of
libraries in your dune file, or adding use_str to your _tags file for
ocamlbuild, or using -package str for ocamlfind).

File "tools/ocamlpp.ml", line 125, characters 5-11:
125 | open Genlex
           ^^^^^^
Error: Unbound module Genlex
make: *** [Makefile:5443: tools/ocamlpp.cmo] Error 2

Thanks!

@ygrek
Copy link
Owner

ygrek commented Nov 29, 2024

build with OCaml 5 is expected to fail yet
this is mentioned in 3.2.0 release notes https://github.com/ygrek/mldonkey/releases/tag/release-3-2-0
will keep this issue open to track the status of ocaml 5 support

@ygrek ygrek changed the title build error. Unbound module Genlex build failure with OCaml 5 (build error. Unbound module Genlex) Nov 29, 2024
@LoongUser77
Copy link

Thanks! I will wait, meanwhile I'll use amule, but I prefer mldonkey.

@carlonluca
Copy link
Contributor

You can use docker, which is very convenient, if building is a problem.

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

No branches or pull requests

4 participants