Bug 280850 - net-mgmt/ipfixcol2: mark this port as suitable only for few architectures
Summary: net-mgmt/ipfixcol2: mark this port as suitable only for few architectures
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-16 07:57 UTC by Marek Zarychta
Modified: 2024-08-18 15:52 UTC (History)
3 users (show)

See Also:


Attachments
patch with fix (1004 bytes, patch)
2024-08-16 08:01 UTC, Marek Zarychta
zarychtam: maintainer-approval+
Details | Diff
patch with fix (1.05 KB, patch)
2024-08-16 15:36 UTC, Marek Zarychta
no flags Details | Diff
v1: ONLY_FOR_ARCHS, pet portclippy and align lines (2.41 KB, patch)
2024-08-16 15:43 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff
portlinted patch (1.38 KB, patch)
2024-08-16 19:27 UTC, Marek Zarychta
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Zarychta 2024-08-16 07:57:13 UTC
When submitting this port for the initial commit, I overlooked that it can only be build and run on 64-bit x86.

IPFIXcol2 requires a processor that supports the SSE2 instruction set. So far this software hasn't been ported to any architectures other than 64-bit x86.
Comment 1 Marek Zarychta 2024-08-16 08:01:02 UTC
Created attachment 252806 [details]
patch with fix

Patch from the maintainer marking this port suitable only for amd64 architecture.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-16 12:29:36 UTC
i386 can use SSE2 too.
Comment 3 Marek Zarychta 2024-08-16 14:56:51 UTC
To be honest, this software was never tested on anything but 64-bit x86.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-16 15:18:37 UTC
Just for test I suggest:
ONLY_FOR_ARCHS=        aarch64 amd64 armv7
ONLY_FOR_ARCHS_REASON= Require SSE2 and 64 bit time_t
Comment 5 Marek Zarychta 2024-08-16 15:36:32 UTC
Created attachment 252827 [details]
patch with fix

Change the patch accordingly to Vladimir suggestions from comment #4
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-16 15:43:59 UTC
Created attachment 252828 [details]
v1: ONLY_FOR_ARCHS, pet portclippy and align lines
Comment 7 Marek Zarychta 2024-08-16 16:45:31 UTC
(In reply to Vladimir Druzenko from comment #6)
Thank you for petting the port. The patch looks reasonable. Please push it.
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-08-16 17:28:45 UTC
A commit in branch main references this bug:

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

commit f31a65e8b225b1e5665aaa7801fd6a31d2437157
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-08-16 17:23:19 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-16 17:23:19 +0000

    net-mgmt/ipfixcol2: mark this port as suitable only for few architectures, improve port

    Port require SSE2 and also 64bit time_t. It work on amd64 and possible
    on aarch64 and armv7 (not tested).

    Pet portclippy, align lines in Makefile, add substitution for %%USER%%
    in start script.

    PR:             280850
    Approved by:    Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> (maintainer)

 net-mgmt/ipfixcol2/Makefile           | 40 ++++++++++++++++++++---------------
 net-mgmt/ipfixcol2/files/ipfixcol2.in |  2 +-
 2 files changed, 24 insertions(+), 18 deletions(-)
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-16 17:29:56 UTC
Thanks.
Comment 10 Marek Zarychta 2024-08-16 19:04:44 UTC
It looks that after petting the port I get in poudrere waring which didn't appear before:
[00:00:31] Warning: (net-mgmt/ipfixcol2): Error: net-mgmt/ipfixcol2 has dependency on textproc/py-docutils with invalid empty FLAVOR; Please contact maintainer of the port to fix this.
Comment 11 Marek Zarychta 2024-08-16 19:13:27 UTC
Moreover, it creashes now poudreire-devel for me:
[00:00:07] Error: /usr/local/share/poudriere/bulk.sh:gather_port_vars:183:Fatal errors encountered gathering ports metadata
Comment 12 Marek Zarychta 2024-08-16 19:27:27 UTC
Created attachment 252831 [details]
portlinted patch

    net-mgmt/ipfixcol2: Fix port, partially revert f31a65e8b225b1e5665aaa7801fd6a31d2437157 (net-mgmt/ipfixcol2: mark this port as suitable only for few architectures, improve port)
    
Port build no more crashes poudrieire-devel. Some polishing should be reverted.
Port still looks fine to portlint(1).
Comment 13 Piotr Kubaj freebsd_committer freebsd_triage 2024-08-16 20:02:44 UTC
Neither aarch64 nor armv7 has SSE2.
Comment 14 Marek Zarychta 2024-08-16 20:20:03 UTC
(In reply to Piotr Kubaj from comment #13)
It was possible to build and run this software on ARM under Linux in the past, perhaps it will be feasible for the FreeBSD port too.
https://github.com/CESNET/ipfixcol2/issues/81
Comment 15 Marek Zarychta 2024-08-16 20:31:39 UTC
Fixed by antoine@FreeBSD.org in commit 926dc04893b6.
Comment 16 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-16 21:55:47 UTC
(In reply to Piotr Kubaj from comment #13)
> Neither aarch64 nor armv7 has SSE2.
Can you test build this port on aarch64 and/or armv7?
Comment 17 Robert Clausecker freebsd_committer freebsd_triage 2024-08-18 07:40:31 UTC
Build fails on armv7 and arm64 FreeBSD 14.0:

In file included from /wrkdirs/usr/ports/net-mgmt/ipfixcol2/work/ipfixcol2-2.6.0/src/tools/fdsdump/src/aggregator/hashT
able.cpp:9:                                                                                                            
/usr/lib/clang/16/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"  
#error "This header is only meant to be used on x86 and x64 architecture"                                              
 ^                                                                                                                     
In file included from /wrkdirs/usr/ports/net-mgmt/ipfixcol2/work/ipfixcol2-2.6.0/src/tools/fdsdump/src/aggregator/hashT
able.cpp:9:                                                                                                            
In file included from /usr/lib/clang/16/include/xmmintrin.h:17:                                                        
/usr/lib/clang/16/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"                                              
 ^
Comment 18 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-18 11:54:26 UTC
(In reply to Robert Clausecker from comment #17)
Thanks!
Comment 19 commit-hook freebsd_committer freebsd_triage 2024-08-18 12:09:48 UTC
A commit in branch main references this bug:

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

commit 3e1b3803660b5aba548c3820eded84705945aaf4
Author:     Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
AuthorDate: 2024-08-18 12:06:44 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-18 12:08:41 +0000

    net-mgmt/ipfixcol2: mark this port as suitable only for amd64

    PR:             280850
    Tested by:      fuz
    Fixes:          f31a65e8b225 (mark this port as suitable only for few architectures, improve port)

 net-mgmt/ipfixcol2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 20 Marek Zarychta 2024-08-18 15:52:28 UTC
(In reply to Robert Clausecker from comment #17)
Thank you for testing it. 
It's a new and rather niche port. If it gains interest, then building fdsdump for ARM can be disabled, thus people will still be able to run collector on AMR hardware, but without the ability to read dumps in place. Such a collector still might be useful, especially since for collecting IPFIX data net-mgmt/ipfixcol2 comes as 2nd choice in ports (port net-mgmt/nfdump is another versatile collector, and net-mgmt/flowd is 3rd, but this one can only process NetFlow).