ygrek / mldonkey

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

couldn't make GUI #79

Open dchmelik opened 2 years ago

dchmelik commented 2 years ago

I tried building mldonkey 20220107_6de7bff on Slackware64 15.1-current GNU/Linux. I have lablgtk-2.18.12-x86_64-1_SBo, ocaml-4.13.1-x86_64-2_SBo, camlp4-4.13-x86_64-1_SBo, camlp5-8.0-x86_64-1_SBo.         It ends up not making GUI (log.)

lulol commented 2 years ago

The log you posted may be truncated?

Since you have ocaml-4.13 I guess that the problem is about the unsafe-string issue not being allowed in newer versions so you could try adding the flag --enable-force-ocaml (or --enable-ocamlver=4.01.0) to your configure command to use an old version.

See #46

dchmelik commented 1 year ago

New make error log: gist. I never truncated: apparently output goes to various streams (stdout, stderr) so when redirected to text file log I saw many warnings I didn't see with previous normal build.         Since I did --enable-batch does the system ocaml not matter? I tried your arguments/flags/switches to enable/force right version but lost that log and will try again with those also.

lulol commented 1 year ago

To even attempt to build the GUI the resulting configuration options output must show a line like (see full example):

- GUI support GTK2 GUI

Otherwise don't bother to try to make if you want the GUI.

The GUI flag is not showing in your case because for some reason the Installation of lablgtk2 failed

May be the lablgtk2 source was previously partially downloaded (happened to me twice), so a new download was skipped or build failed due to using ocaml-4.13 (didn't try, not sure).

Verify that you see this prompt to download lablgtk2: https://github.com/ygrek/mldonkey/blob/6de7bffad7a26b61880e0fb2a9fe460abd7bc38f/config/configure.in#L1408-L1409

Try make maintainerclean before configure to start from a clean state to be sure.

The --enable-batch switch just say to assume yes to any question like downloading and building a missing ocaml or lablgtk2. In your case only affected lablgtk2 since your system has installed ocaml 4.13 and is what was used. If you don't set this flag while manually building (recomended) the scripts will ask you what to do when something is amiss.

The flag --enable-ocamlver=4.01.0 will download, compile and use that specified version to build the executables instead of your system installed ocaml.

dchmelik commented 1 year ago

Trying new commit fresh still don't get 'GUI support GTK2 GUI'.

d@cosmos:~/math/src/network/mldonkey$ ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --localstatedir=/var --docdir=/usr/doc/$PRGNAM-$VERSION --enable-batch --enable-force-ocaml --build=$ARCH-slackware-linux --enable-gui=newgui2
Configuring MLDonkey 3.1.7 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

Compilers:
 - OCaml version     4.01.0 - byte code
 - gcc version       12.1.0
 - g++ version       12.1.0

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

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

Compiling CryptoPP.cc can take several minutes, on slow machines up to half an hour.
lulol commented 1 year ago

You may try removing --enable-batch from the ./configure options as I suggested above and watch if lablgtk2 is being properly downloaded and installed after being prompted.

And verify that there is no Installation of lablgtk2 failed warning.

And if it doesn't work you could search the log output for clues about the missing libraries after the legend:

---------------------------------------------------------
Checking the libraries required to build the GTK GUI.
---------------------------------------------------------
dchmelik commented 1 year ago

i removed '--enable-batch' and chose versions shown most recently above; rest of output (other than compiling dependencies):

Compiling CryptoPP.cc can take several minutes, on slow machines up to half an hour.
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/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.mli
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/networks/direct_connect  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey -I +camlp4  -c src/utils/cdk/printf2.mli
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/networks/direct_connect  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey -I +camlp4  -c src/utils/cdk/printexc2.mli
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/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/verificationBitmap.mli
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/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/intmap.mli
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/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/options.mli
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/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/url.mli
/tmp/SBo/mldonkey/patches/local/bin/ocamlc -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/networks/direct_connect  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey -I +camlp4  -c src/utils/cdk/zip.mli
File "src/utils/cdk/zip.mli", line 149, characters 32-37:
Error: Unbound type constructor bytes
make: *** [Makefile:5419: src/utils/cdk/zip.cmi] Error 2
ygrek commented 1 year ago

as answered in another issue git master is currently wip, don't expect it to compile, use last release tag or https://github.com/ygrek/mldonkey/commit/6de7bffad7a26b61880e0fb2a9fe460abd7bc38f which doesn't have breaking changes

dchmelik commented 1 year ago

as answered in another issue git master is currently wip, don't expect it to compile, use last release tag or [6de7bff]

As stated 14 days ago, I switched to latest release but only know how to use stable and latest releases.

lulol commented 1 year ago

@dchmelik

git checkout 6de7bff or git checkout release-3-1-7-2 or download 6de7bff or release-3-1-7-2

or go to the github pull-down menu labeled master and change to release-3-1-7-2 tag, then click the green code download button to the right and download the zip.

If you still prefer using the master branch may try setting instead --enable-ocamlver=4.09.0 that I think is the highest ocaml version that was working last time I tried. (see https://github.com/ygrek/mldonkey/issues/83#issuecomment-1226456970)

dchmelik commented 1 year ago

V3-1-7-2 hasn't compiled in maybe 1+ years; 6de7bff gets same error as on 23 August.

dchmelik commented 1 year ago

I got same error on recent commits (sometime last year and everything through 20220806_e136e74).