Solved Amule won't run on FreeBSD-13.1-RELEASE because "segmentation fault" error.

- If this is the first time you install mldonkey,please go to the mldonkey-gui ports dir as a user and enter:

make install-user

this will set up your user config.

OK.

Code:
mario@marietto:/usr/ports/net-p2p/mldonkey-gui # sudo make install-user
===>  License GPLv2 accepted by the user
===>   mldonkey-gui-3.1.5_4 depends on file: /usr/local/sbin/pkg - found
=> mldonkey-3.1.5.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://downloads.sourceforge.net/project/mldonkey/mldonkey/3.1.5/mldonkey-3.
1.5.tar.bz2
mldonkey-3.1.5.tar.bz2                                2780 kB  164 kBps    17s
===> Fetching all distfiles required by mldonkey-gui-3.1.5_4 for building
===>  Extracting for mldonkey-gui-3.1.5_4
=> SHA256 Checksum OK for mldonkey-3.1.5.tar.bz2.
===>   mldonkey-gui-3.1.5_4 depends on file: /usr/local/bin/ocamlc - found
cp: /usr/ports/net-p2p/mldonkey-gui/work/mldonkey-3.1.5/distrib/i18n/gui_messages.ini.: No such file
 or directory
*** Error code 1
 
try to build cryptopp with SIMD support
it seems thats why it worked for me

Code:
# make DISABLE_VULNERABILITIES=yes

......
install-info --info-dir='/usr/ports/devel/gmake/work/stage/usr/local/share/info' '/usr/ports/devel/
gmake/work/stage/usr/local/share/info/make.info'
 /bin/mkdir -p '/usr/ports/devel/gmake/work/stage/usr/local/bin'
  install  -s -m 555 make '/usr/ports/devel/gmake/work/stage/usr/local/bin/./gmake'
 /bin/mkdir -p '/usr/ports/devel/gmake/work/stage/usr/local/include'
 install  -m 0644 src/gnumake.h '/usr/ports/devel/gmake/work/stage/usr/local/include'
 /bin/mkdir -p '/usr/ports/devel/gmake/work/stage/usr/local/man/man1'
 install  -m 0644 'doc/make.1' '/usr/ports/devel/gmake/work/stage/usr/local/man/man1/gmake.1'
====> Compressing man pages (compress-man)
===>  Installing for gmake-4.3_2
===>  Checking if gmake is already installed
ld-elf.so.1: /usr/local/lib/pkg//provides.so: Undefined symbol "pkg_plugin_set"
*** Error code 1
 
There is a bug report here :


but I don't understand what to do. He says : "... and same as for the original reporter, a temporary workaround is to comment out the provides plugin to pkg in /usr/local/etc/pkg.conf"

what it means ? which line should I comment inside the file "/usr/local/etc/pkg.conf" ? These are the relevant lines that I have there :

Code:
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [ provides ];

or maybe I've understood. I should comment this line : PLUGINS [ provides ] ; let's try.
 
ok men. I've been able to compile succesfully cryptopp with SIMD support and then amule,everything without errors,but then when I've ran amule,I've got the same error as before : "Segmentation fault (core dumped)". Can you confirm that it worked for you ?
 
- If this is the first time you install mldonkey,please go to the mldonkey-gui ports dir as a user and enter:

make install-user

this will set up your user config.

OK.
You read all that, even copy/pasted it here. Then you do:
Code:
mario@marietto:/usr/ports/net-p2p/mldonkey-gui # sudo make install-user 
===> License GPLv2 accepted by the user
{...}
As root (judging by the # prompt) you enter sudo make install-user. That's not what the instructions told you to do. Slow down, don't simply scan whatever you're looking at. Actually take the time to read what it says. Let it register in your brain. Then look back at what you actually did and why you didn't get the result you were expecting.
 
You read all that, even copy/pasted it here. Then you do:

As root (judging by the # prompt) you enter sudo make install-user. That's not what the instructions told you to do. Slow down, don't simply scan whatever you're looking at. Actually take the time to read what it says. Let it register in your brain. Then look back at what you actually did and why you didn't get the result you were expecting.

Code:
[marietto@marietto /usr/ports/net-p2p/mldonkey-gui]$ make install-user

cp: /usr/ports/net-p2p/mldonkey-gui/work/mldonkey-3.1.5/distrib/i18n/gui_messages.ini.: No such file or directory
*** Error code 1
 
Or give the following a try,

transmission is for torrents,emule / edonkey is different.
 
try to build cryptopp with SIMD support
it seems thats why it worked for me

Nice one! I can confirm this worked for me as well. :)

Everything else was installed via "latest" packages from FreshPorts, while the only compiled package from the Ports Collection is now cryptopp (with the SIMD support enabled).

FreeBSD: 13.1-RELEASE-p6
aMule: 2.3.3_4 (from FreshPorts)
cryptopp: 8.7.0 (compiled from Ports Collection with SIMD enabled)
 
Nice one! I can confirm this worked for me as well. :)

Everything else was installed via "latest" packages from FreshPorts, while the only compiled package from the Ports Collection is now cryptopp (with the SIMD support enabled).

FreeBSD: 13.1-RELEASE-p6
aMule: 2.3.3_4 (from FreshPorts)
cryptopp: 8.7.0 (compiled from Ports Collection with SIMD enabled)

Have you been able to run Amule ? It does not work for me. Can you explain how ?
 
I simply followed the instructions as laid out by covacat in post #25.
  1. Cloned the (HEAD) Ports Collection with git
  2. cd'd into /usr/ports/security/cryptopp/
  3. Ran make config
  4. Enabled SIMD
  5. Compiled and installed with make install clean
  6. Locked the package in the meantime to prevent an override with pkg lock cryptopp
 
I've been able to compile cryptopp with SIMD such as amule as well as you. But amule does not want to run. Please elaborate more points 5 and 6. On point 5 you said : "Compiled and installed with make install clean" ; ok,what are you talking about ? about cryptopp or amule ? Regarding point 6 : "What's the command that you have issued ? " thanks. In my specific case,amule is compiled correctly,but when I run it,I get the error "Segmentation fault (core dumped)".
 
You might have to first remove your existing installation of cryptopp.

Before step 3, run make deinstall



ok,what are you talking about ? about cryptopp or amule ?
cryptopp

I'm still using amule (2.3.3_4) as was installed via "pkg" from FreshPorts.



Regarding point 6 : "What's the command that you have issued ?
I highlighted it in bold: pkg lock cryptopp



To start over again, I suggest you try this:

Install/reinstall amule with pkg install amule

Repeat the steps for cryptopp, with an extra step before step #3: make deinstall
 
ok. these steps are correct. It's working now :

1. cd /usr/ports/security/cryptopp/
2. make deinstall
3. cd
/usr/ports/net-p2p/amule
4. make deinstall
5. make config + enable SIMD
6. make install clean
7. pkg lock cryptopp
8. pkg install amule

very thanks bro'.
 
Something is wrong with aMule. While the file shows a steady download rate, the speed tends to 0 on the bottom bar. It also showed high CPU usage in "standby". Could you confirm it?
 
Something is wrong with aMule. While the file shows a steady download rate, the speed tends to 0 on the bottom bar. It also showed high CPU usage in "standby". Could you confirm it?

nope. it is working great here. Try to add new and fresh servers.
 
Rebuilding cryptpp with SIMD fixes the segmentation fault, but it then reintroduces this problem:

https://forums.freebsd.org/threads/amule-2-3-3-gui-freezes.85175/

That problem was previously fixed by switching to amule-devel. When the devel port disappeared I assumed it had become the new amule, but that doesn't seem to be the case. It looks like it was obsolete port and it's just been removed.

My experience is that amule superficially appears to work if it's allowed to start from scratch, but it very easily fails once it has a few shared or downloading files. It's the same as before: it uses 100% of a CPU core, the GUI locks-up and the memory use increases until it's killed by the kernel.
 
on FreeBSD 13.2-CURRENT amule stopped working :

Code:
marietto@marietto /usr/ports/security/cryptopp]$ amule
 2023-05-06 18:19:31: Initialising aMule 2.3.3 compiled with wxGTK2 v3.0.5
2023-05-06 18:19:31: Checking if there is an instance already running...
2023-05-06 18:19:31: No other instances are running.

--------------------------------------------------------------------------------
A fatal error has occurred and aMule has crashed.
Please assist us in fixing this problem by posting the backtrace below in our
'aMule Crashes' forum and include as much information as possible regarding the
circumstances of this crash. The forum is located here:
http://forum.amule.org/index.php?board=67.0
If possible, please try to generate a real backtrace of this crash:
http://wiki.amule.org/wiki/Backtraces

----------------------------=| BACKTRACE FOLLOWS: |=----------------------------
Current version is: aMule 2.3.3 compiled with wxGTK2 v3.0.5
Running on: FreeBSD 13.2-RELEASE amd64

--== no BACKTRACE for your platform ==--


--------------------------------------------------------------------------------
Abort trap
 
This is the reply of the package mainteiner :

Hello,

By default criptopp builds with SIMD disable on i386 and amd64 and amule segfault was fixed in

---
commit 4baf754027807e1ad7966055d40a4c4eb75a5717
Author: Nuno Teixeira <eduardo@FreeBSD.org>
Date: Thu Apr 20 10:44:49 2023 +0100

net-p2p/amule: Adopt/Fix segmentation fault

- Add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64, as
cryptopp-8.7.0 build with this option by default on i386 and amd64.
(5a19c08: security/cryptopp: Update to 8.7.0)
---

The woraround to enable criptopp SIMD and comment out amule:

# Fix segmentation fault, PR 266866
# see also 5a19c08: security/cryptopp: Update to 8.7.0
.if ${ARCH} == i386 || ${ARCH} == amd64
CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM
.endif

Cheers,

Unfortunately I dind't understand how to fix it.

My /usr/ports/security/cryptopp/Makefile file does not have :

Code:
.if ${ARCH} == i386 || ${ARCH} == amd64
CXXFLAGS+=     -DCRYPTOPP_DISABLE_ASM
.endif

but :

Code:
.if !${PORT_OPTIONS:MSIMD}
CXXFLAGS+=      -DCRYPTOPP_DISABLE_ASM
.endif

I didn't understand how to enable SIMD (When I try to make config the amule package,I don't see the SIMD option and I can't enable it).

Furthermore,at the moment I keep the package cryptopp locked :

Code:
marietto@marietto:/usr/ports/security/cryptopp # sudo pkg unlock cryptopp
cryptopp-8.7.0: unlock this package? [y/N]:

should I unlock it ?

thanks.
 
When you say that amule is working, is this with the ordinary standalone amule or using separate daemon and gui processes?
 
Back
Top