ygrek / mldonkey

cross-platform multi-network p2p daemon (previously at http://mldonkey.sourceforge.net/)
Other
240 stars 45 forks source link

Compile fails with Ocaml 4.11/gcc 10 on F33 #51

Closed ilf-S closed 3 years ago

ilf-S commented 3 years ago

I'm trying to compile mldonkey on Fedora 33 with Ocaml 4.11

camlp4 is from github, compiled and installed. bindir is /usr/bin and libdir is /usr/lib64/camlp4

After running configure of mldonkey this is the generated output:

Configuring MLDonkey 3.1.7.git - SCM: release-3-1-7-2-2-g670ef92b completed.

Network modules:

  • eDonkey enabled (eMule SUI enabled)
  • BitTorrent enabled
  • FileTP (aka wget) enabled
  • Fasttrack enabled
  • 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 enabled

    • png support enabled
    • jpg support enabled
  • GUI support GTK2 GUI

Compilers:

  • OCaml version 4.11.0+dev2-2020-04-22
  • gcc version 10
  • g++ version 10

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

gmake -j1 produces this:

/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60 -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/gtk2/gui -I src/gtk2/gui/x11 -I src/gtk2/gui/win32 -I icons/rsvg -I +lablgtk2 -I src/networks/direct_connect -I src/networks/fasttrack -I src/networks/fileTP -I src/networks/bittorrent -I src/networks/donkey -I +camlp4 -c src/utils/lib/syslog.ml File "src/utils/lib/syslog.ml", line 197, characters 50-53: 197 | ignore (write loginfo.fd str 0 (String.length str)); ^^^ Error: This expression has type bytes but an expression was expected of type string gmake: *** [Makefile:5443: src/utils/lib/syslog.cmx] Error 2

I'm lost here. Attempted to find a solution by myself but I can't. I know that ocaml 4.11 seem to work for Arch, so I suppose it's either the Fedora version or gcc, but I'm not really sure.

ygrek commented 3 years ago

duplicate of #46 mldonkey is not compatible with OCaml >= 4.10 yet (due to deprecation of unsafe-string)