Bug 260027 - net-p2p/amule: aMule 2.3.3 won't build if MONOLITHIC option unset
Summary: net-p2p/amule: aMule 2.3.3 won't build if MONOLITHIC option unset
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Barbara Guida
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-24 17:39 UTC by echoxxzz
Modified: 2022-09-04 18:01 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (bar)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description echoxxzz 2021-11-24 17:39:31 UTC
If the MONOLITHIC option is unset aMule won't build and gives the following errors during the package build stage:

===>  Building package for amule-2.3.3
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/Mac_Gray.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/gnome.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/kde4.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/papirus.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/priscilla.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/tango.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/xfce.zip:No such file or directory
*** Error code 1
Comment 1 echoxxzz 2021-11-24 17:43:17 UTC
I found those zip file but they're in the /usr/ports/net-p2p/amule/work/aMule-2.3.3/src/skins folder.

Also if I run "make config" again and re-enable the "Monolithic" option and then run "make" it does nothing until I purge the work folder. Usually when I change an option and run make it will rebuild the port. The good news at least it build this time.
Comment 2 Barbara Guida freebsd_committer freebsd_triage 2021-11-24 17:49:04 UTC
Can you try after updating your ports tree?
I've committed a fix about an hour ago.
Comment 3 echoxxzz 2021-11-25 02:30:41 UTC
It only seems to include the skin zip files if you select MONOLITHIC but I think it should also include the skins even if you just select AMULEGUI as it too would be skinable.

My fix was to add this to the Makefile:

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MAMULEGUI} || ${PORT_OPTIONS:MMONOLITHIC}
PLIST_SUB+=     AMULESKIN=""
.else
PLIST_SUB+=     AMULESKIN="@comment "
.endif


and I changed the PKG-PLIST and edit the lines for the skins to this:

%%AMULESKIN%%%%DATADIR%%/skins/Mac_Gray.zip
%%AMULESKIN%%%%DATADIR%%/skins/gnome.zip
%%AMULESKIN%%%%DATADIR%%/skins/kde4.zip
%%AMULESKIN%%%%DATADIR%%/skins/papirus.zip
%%AMULESKIN%%%%DATADIR%%/skins/priscilla.zip
%%AMULESKIN%%%%DATADIR%%/skins/tango.zip
%%AMULESKIN%%%%DATADIR%%/skins/xfce.zip

and now it includes the zip files in the pkg file if I select just MONOLITHIC or just AMULEGUI.
Comment 4 echoxxzz 2021-11-28 04:07:53 UTC
I found another bug in the Makefile. 

Even though the DEBUG option is unset it still compiles with debugging output.

The default ./configuration option is to compile with debugging support enabled you need to explicitly disable it.

In the Makefile:

DEBUG_CONFIGURE_ON=    --enable-debug

needs to change to,

DEBUG_CONFIGURE_OFF=    --disable-debug

then it works as expected.
Comment 5 echoxxzz 2021-11-28 04:53:03 UTC
The only downside to actually getting the amuled deamon to run without debugging is it randomly core dumps on me. If I use amuled with debugging enabled it never core dumps. Since debugging was always enabled (even though it said it was unset) I never got this problem until now. I'm running it in a Freebsd 13-P4 jail.
Comment 6 Barbara Guida freebsd_committer freebsd_triage 2021-12-02 14:34:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=927ad383075a183f711afb4b00d6c9539015ea41

commit 927ad383075a183f711afb4b00d6c9539015ea41
Author:     Barbara Guida <bar@FreeBSD.org>
AuthorDate: 2021-11-26 06:59:49 +0000
Commit:     Barbara Guida <bar@FreeBSD.org>
CommitDate: 2021-11-26 06:59:49 +0000

    net-p2p/amule: fix pkg-plist for AMULEGUI as well.

    While here, update WX from 2.8 to 3.0 because amulegui seems to not always work correctly with 2.8.

    PR:     26002
    Reported by:    echoxxzz@gmail.com

 net-p2p/amule/Makefile  | 10 ++++++++--
 net-p2p/amule/pkg-plist | 14 +++++++-------
 2 files changed, 15 insertions(+), 9 deletions(-)


A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=27392cf64d50cd1898f83624a588bc5c1b5f27d0

commit 27392cf64d50cd1898f83624a588bc5c1b5f27d0
Author:     Barbara Guida <bar@FreeBSD.org>
AuthorDate: 2021-12-01 08:04:39 +0000
Commit:     Barbara Guida <bar@FreeBSD.org>
CommitDate: 2021-12-01 08:04:39 +0000

    net-p2p/amule: correct the inverted logic for DEBUG option.

    PR:     26002
    Reported by:    echoxxzz@gmail.com

 net-p2p/amule/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Comment 7 echoxxzz 2022-06-22 02:06:33 UTC
I don't know why but I cannot build amuled without it core dumping on me.
As soon as the daemon loads and KAD is connected ok I get this error message if there are any parts waiting in the TEMP folder:

!2022-06-21 21:56:06: amule.cpp(1915): Connected to Kad (ok)
Assertion failed: ./src/common/fdiodispatcher.cpp:ModifyFD:113: Assertion 'i != m_handlers.end()' failed. modifying unregistered handler?
Backtrace follows:
--== no BACKTRACE for your platform ==--


./src/common/fdiodispatcher.cpp(113): assert "i != m_handlers.end()" failed in ModifyFD(): modifying unregistered handler?
Collecting stack trace information, please wait...

Call stack:
[00] 0x800f97600
[01] 0x800f98610
[02] 0x800f9da83
[03] 0x80063f84f
[04] 0x80064009c
[05] 0x800639dd6
[06] 0x43649e
[07] 0x506fbf
[08] 0x42030b
[09] 0x41de20
[10] 0x800fd3043
[11] 0x800fd477d
[12] 0x800fd4600
[13] 0x800fd42f3
[14] 0x800e8a64f
[15] 0x800ec97b9
[16] 0x800ec9496
[17] 0x800e89b86
[18] 0x800f1194a


I get hundreds of this same error message before the amuled core dumps.

I running on the latest build of Freebsd 13.
Comment 8 Iade Gesso, PhD 2022-09-04 18:00:43 UTC
(In reply to Jeffery Telford from comment #7)

Here to... I've the same behaviour running amule as a daemon into a TrueNAS 13U2 jail (based on FreeBSD 13.1).
After a random amount of time the daemon crashes, returning me the same error message.


Iade
Comment 9 Iade Gesso, PhD 2022-09-04 18:01:44 UTC
(In reply to Iade Gesso, PhD from comment #8)

PS: I installed amule directly from binaries using pkg, not from the ports repository.


Iade