Open puigru opened 8 months ago
Hi, this is a blast from the past. :-)
I suspect that Tango might need to be compiled with some flag. But it has been a long time ago. I can try in the evening.
hm, I cannot get it to compile. If you figure it out, please let me know.
Hello, puigru I wrote message to instagram and Facebook. Read pls.
Hello! I've recently run into this project and indeed found it contain a lot of interesting code.
I was mainly interested in it as a replacement for aMule's own web interface which doesn't work very well in my experience. I understand that this codebase is really old, so it might not be much of an improvement. However, I wanted to give it a try, if anything to learn about aMule's EC protocol. The binary releases are, of course, really old so they're no good for a modern Linux install, as they're linked with ancient versions of shared libraries. So anyway, I started ~blasting~ building.
I came across a good set of instructions on how to set up a D1 build environment with Tango here: https://www.dsource.org/projects/tango/wiki/ManualLinuxInstall
I've been using a Dockerfile for this based on Debian Bookworm, with the latest release of D1 to avoid certain compiler bugs and the latest Tango trunk. This allows for compilation of p2p-gui's master (almost), I have to remove a single private access modifier in api/File.d, but after that it works... until it gets to linking, and here's where I get stuck with this:
At a glance, it seems easy enough. Surely ld is just unable to find zlib, but nope. If we add
-L--verbose
to dmd's flags in dmd.conf, we see the following:Which seems to indicate that it is in fact finding the right object file for it, and
-lz
is the very last of DMD's linker options in the Makefile, which is supported by the advice I was able to find online, so I'm very much stumped here.I have considered the fact that perhaps the zlib function definitions that Tango is trying to import have changed between the version it references (1.2.3) and the latest version (1.2.13). Unfortunately, I wasn't able to spot any significant changes in zlib.h. In addition, manually installing zlib1g and zlib1g-dev 1.2.3 from archive.debian.org didn't make a difference.
This is the aforementioned Dockerfile I'm using: https://gist.github.com/puigru/608f94da8079b3e2d6d169bf62d16641
I've also tried to build it with both the DMD and LDC bundles of the latest version of Tango (0.99.9): http://downloads.dsource.org/projects/tango/0.99.9/tango-0.99.9-bin-linux-with-dmd.1.056.tar.gz (with a 32-bit toolchain) http://downloads.dsource.org/projects/tango/0.99.9/tango-0.99.9-bin-linux64-with-ldc.1.056.tar.gz This requires a version of p2p-gui prior to ca3c57cd5fc3777d692996ade0c543b2a01db735. Sadly, the end result was the same.
As a last ditch effort, I replaced /usr/bin/ld with a copy of lld. This actually resulted in a binary file. However, it immedially segfaults, inspecting it with
nm
reveals that many imported symbols (including those of zlib) are not linked properly, output. So the segfault is not very surprising.I'd really appreciate if you could take a look and share any insight. This is my first time attempting to build a D project (interesting pick, I know).
Thank you!