ygrek / mldonkey

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

3.1.7 - Can't find libgd on Ubuntu 18.04 #68

Open sturia opened 2 years ago

sturia commented 2 years ago

with 3.1.7 I can't compile support for graphical stats with libgd, as it's not found at compile time, although libgd are installed.

Ubuntu 18.04

libgd-dev/bionic-updates,bionic-security,now 2.2.5-4ubuntu0.5 amd64 [installed]
libgd-gd2-noxpm-ocaml/bionic,now 1.0~alpha5-8build4 all [installed]
libgd-ocaml/bionic,now 1.0~alpha5-8build4 amd64 [installed,automatic]
libgd2-xpm-dev/now 2.1.0-3ubuntu0.11 all [installed,local]
libgd3/bionic-updates,bionic-security,now 2.2.5-4ubuntu0.5 amd64 [installed,automatic]

any chance to fix it?

ygrek commented 2 years ago

afaics the reason is that mldonkey uses gdlib-config to discover libgd, but it is no longer provided by packages. Should use pkg-config

lulol commented 2 years ago

For a clean ununtu bionic install (using the bare minimum official docker container) these packages seems that are sufficient to build all (except mlgui.static because it looks for the libraries in /usr/local/lib). Iibgd is enabled because configure.in also looks for the installed gd.h headers and tests that work.

$ docker run -it --name=builder --entrypoint /bin/bash ubuntu:bionic
# apt update && apt-get install git make autoconf
# apt-get install -y --no-install-recommends g++ camlp4 ocaml-nox libminiupnpc-dev libnatpmp-dev libbz2-dev librsvg2-dev libmagic-dev libgtk2.0-dev liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev liblablgtk2-gnome-ocaml-dev libgd-dev
# cd home
# git clone https://github.com/ygrek/mldonkey.git
# cd mldonkey

# ./configure --enable-batch --enable-upnp-natpmp --disable-gnutella --disable-gnutella2 --enable-gui=newgui2

Configuring MLDonkey 3.1.7.git - SCM: release-3-1-7-2-9-g6de7bffa 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     enabled
 - graphical stats   enabled
   - png support     enabled
   - jpg support     enabled

 - GUI support       GTK2 GUI

Compilers:
 - OCaml version     4.05.0 
 - gcc version       7
 - g++ version       7

\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.