Bug 270916

Summary: net/megacmd: Update to 1.6.1
Product: Ports & Packages Reporter: kikadf <kikadf.01>
Component: Individual Port(s)Assignee: Robert Clausecker <fuz>
Status: Closed FIXED    
Severity: Affects Only Me CC: eduardo, fuz, kikadf.01
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266866
Attachments:
Description Flags
patch_v1 none

Description kikadf 2023-04-18 16:22:07 UTC
Created attachment 241567 [details]
patch_v1

Update to 1.6.1, no specific changelog. Update megasdk version to 4.17.1a, not the latest, but current megacmd release uses this sdk version.

Fix the segmentation fault, what is reported in bug #269979

The fix: 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. 

From cryptopp-8.7.0 Makefile:

OPTIONS_DEFINE=		DEBUG DOCS FULL_DEBUG TOOLS
OPTIONS_DEFINE_amd64=	SIMD
OPTIONS_DEFINE_i386=	SIMD
...
OPTIONS_DEFAULT=	TOOLS
...
.if !${PORT_OPTIONS:MSIMD}
CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM
.endif

I think the fix should works on other cryptopp-8.7.0 relevant segmentation faults as well, like bug #266866 and bug #267216.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-04-20 13:36:20 UTC
A commit in branch main references this bug:

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

commit c72cc0314bc0e0fe56f220585c57fb09303aea1d
Author:     kikadf <kikadf.01@gmail.com>
AuthorDate: 2023-04-18 15:51:40 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-20 11:49:23 +0000

    net/megacmd: update to 1.6.1

     - update sdk to 4.17.1a
     - fix segmentation fault with cryptopp-8.7.0:
       add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64
     - adopt port

    PR:             269979, 270916

 net/megacmd/Makefile  | 13 +++++++++----
 net/megacmd/distinfo  | 10 +++++-----
 net/megacmd/pkg-plist |  4 ++--
 3 files changed, 16 insertions(+), 11 deletions(-)
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-04-20 13:38:28 UTC
Thank you for your contribution.