johna
September 10, 2023, 6:52pm
1
Summarized:
Need to patch 3 files
src/Types.h
src/amule.cpp
libs/common/MuleDebug.cpp
Files already patched, just untar and overwrite
Or a single patch
And then compile a new version of the wxwidgets adding the flag --disable-debug_flag if not the gui fails giving this error
In my case i compiled the library in static mode and embeded the wxwidgets in the amule binary, bigger files but less dependencies
8 Likes
Nexus-6
September 10, 2023, 9:06pm
2
Is it still a thing in 2023?
Yes, more than ever?
Peer to Peer networks like Kademlia and Gnutella donât rely on any central authority. No DNS servers, no big company like Google being the entry point to pretty much everything. We should do more of that!
Bittorrent is more popular but it doesnât include any search features by itself, and so it is dependant on the web (or some other way) to get your torrent files or magnet links, while these network do include a search function, and as such, they are completely standalone.
4 Likes
Nexus-6
September 11, 2023, 7:11am
4
Mine was more a practical question about its adoption rate. The raise of BitTorrent and the various file sharing sites sunset eMule/aMule also for technical reasons. Iâm surprised to see a client still working these days.
@johna After looking at the AMule wiki, it seems that wxWidgets and libCrypto++ are the only nonstandard dependencies. Did you use the GTK3 version of the wxWidgets wrapper?
Begasus
September 11, 2023, 12:37pm
6
Thereâs also boost, libintl, libupnp
johna
September 11, 2023, 12:41pm
7
pkgman install libunpnp_devel boost-devel ccache wxgtk_devel gettext_devel gettext_libintl crypto++_devel
I complied the wxwidgets in static mode using this version
https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.2.1/wxWidgets-3.2.2.1.tar.bz2
This is how i compiled the wxwidgets
./configure --prefix=$(pwd) --with-gtk=3 --enable-monolithic --disable-shared --enable-unicode --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --enable-largefile --with-sdl âdisable-debug_flag
Then the amule after patches
./configure --prefix=/boot/home/amule/ --with-wx-config=/boot/home/wx_3/wx-config
And then, make
wx_3=name where you unpacked and compiled the wxwidgets
Akakor
September 11, 2023, 12:51pm
8
Mainline DHT is the name given to the Kademlia -based distributed hash table (DHT) used by BitTorrent clients to find peers via the BitTorrent protocol.
Begasus
September 11, 2023, 1:52pm
9
Nice thing, reminds me of the old days
Begasus
September 11, 2023, 2:05pm
10
Did a local build with our wxgtk, that worked out ok (also used cmake for the build).
1 Like
johna
September 11, 2023, 3:07pm
12
Well in my case building the release and the git version in cmake with it crashes
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.2.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/NetworkFunctionsTest.dir/__/__/src/LibSocket.cpp.o: in function `boost::asio::detail::socket_ops::close(int, unsigned char&, bool, boost::system::error_code&) [clone .isra.0]':
LibSocket.cpp:(.text+0x340): undefined reference to `setsockopt'
Begasus
September 11, 2023, 4:38pm
14
Add â-DCMAKE_EXE_LINKER_FLAGS=â-lbsd -lnetwork" when you run cmake ⌠(fixes linking errors)
This silences the deprcated warnings when put in the top CMakeList.txt âadd_definitions(-Wno-deprecated-declarations)â
For the int errors there are some patches around at haikuports, I did it like this:
#ifdef __HAIKU__
#include <SupportDefs.h>
#else
typedef uint8_t int8;
typedef uint16_t int16;
typedef uint32_t int32;
typedef uint64_t int64;
#endif
typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;
typedef uint64_t uint64;
typedef int8_t sint8;
typedef int16_t sint16;
typedef int32_t sint32;
typedef int64_t sint64;
1 Like
johna
September 11, 2023, 5:32pm
15
Now compiles great and solves the wxwigets problem, no need to recompile with a special flag, using the installed wxgtk works fine
2 Likes
Begasus
September 11, 2023, 6:53pm
16
For the second part of your patch there is something mentioned upstream
opened 11:14PM - 21 Sep 22 UTC
Trying to build aMule 2.3.3 on my Gentoo musl box it errors out with **MuleDebug⌠.cpp:70:14: error: 'set_terminate' is not a member of 'std'**
```
[...]
/usr/include/wx-3.0-gtk3/wx/string.h:4055:86: warning: implicitly-declared 'constexpr wxUniCharRef::wxUniCharRef(const wxUniCharRef&)' is deprecated [-Wdeprecated-copy]
4055 | inline bool operator!=(const wxString& s, const wxUniCharRef& c) { return !s.IsSameAs(c); }
| ~~~~~~~~~~^~~
/usr/include/wx-3.0-gtk3/wx/unichar.h:224:19: note: because 'wxUniCharRef' has user-provided 'wxUniCharRef& wxUniCharRef::operator=(const wxUniCharRef&)'
224 | wxUniCharRef& operator=(const wxUniCharRef& c)
| ^~~~~~~~
/usr/include/wx-3.0-gtk3/wx/string.h:2146:30: note: initializing argument 1 of 'bool wxString::IsSameAs(wxUniCharRef, bool) const'
2146 | bool IsSameAs(wxUniCharRef c, bool compareWithCase = true) const
| ~~~~~~~~~~~~~^
MuleDebug.cpp: In function 'void OnUnhandledException()':
MuleDebug.cpp:70:14: error: 'set_terminate' is not a member of 'std'
70 | std::set_terminate(std::abort);
| ^~~~~~~~~~~~~
MuleDebug.cpp: In function 'void InstallMuleExceptionHandler()':
MuleDebug.cpp:113:14: error: 'set_terminate' is not a member of 'std'
113 | std::set_terminate(OnUnhandledException);
| ^~~~~~~~~~~~~
MuleDebug.cpp: In function 'wxString get_backtrace(unsigned int)':
MuleDebug.cpp:313:33: warning: unused parameter 'n' [-Wunused-parameter]
313 | wxString get_backtrace(unsigned n)
| ~~~~~~~~~^
MuleDebug.cpp: At global scope:
MuleDebug.cpp:287:17: warning: 'wxString demangle(const wxString&)' defined but not used [-Wunused-function]
287 | static wxString demangle(const wxString& function)
| ^~~~~~~~
make[4]: *** [Makefile:536: MuleDebug.o] Error 1
```
Same with git HEAD. But it builds fine on my other Gentoo box with glibc C-Library.
Here is the Gentoo downstream bug report: https://bugs.gentoo.org/872263
[amule-2.3.3:20220921-215952.log](https://github.com/amule-project/amule/files/9620945/amule-2.3.3.20220921-215952.log)
[config.log](https://github.com/amule-project/amule/files/9620946/config.log)
3 Likes
johna
September 11, 2023, 8:56pm
17
New version of the patches, thanks to Begasus
2 Likes
Begasus
September 12, 2023, 5:24am
18
If I could find a nice SVG icon to convert to rdef (or someone with skills to create an IOM one) I could add this to haikuports
EDIT If someone want to go ahead and create a PR for this we could guide you to get this integrated into haikuports, happy to help where we can
2 Likes
Lrrr
September 12, 2023, 5:29am
19
1 Like
Begasus
September 12, 2023, 6:32am
20
That worked, thanks!
EDIT: As it stands it builds OK, Iâm still strugling with cmake not doing the translations and installing them, using autotools doesnât seem to work when running it with haikuporter (in Terminal it works though).
EDIT2: Fixed building with autotools, translations are installed, but not picked up in the app.
1 Like