Page MenuHomeFreeBSD

devel/volk: update to 2.5.0
Needs ReviewPublic

Authored by vishwin on Jun 9 2021, 4:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 27, 4:32 PM
Unknown Object (File)
Sun, Jan 26, 6:13 PM
Unknown Object (File)
Sun, Jan 26, 5:52 PM
Unknown Object (File)
Sat, Jan 25, 7:18 PM
Unknown Object (File)
Sat, Jan 25, 7:15 PM
Unknown Object (File)
Sat, Jan 25, 3:00 PM
Unknown Object (File)
Wed, Jan 15, 7:25 PM
Unknown Object (File)
Sun, Jan 12, 10:26 AM
Subscribers

Details

Summary

This is intended to be used with comms/gnuradio 3.9, which I have WIP (almost ready for review/test) which I will most likely present during the WIP session at devsummit.

cpu_features is disabled because that upstream doesn't have code to support us (yet).

Test Plan

Passes testport, however the real test is with new comms/gnuradio. A wider call for testing will follow for that. This will only have a chance at landing when that port is ready.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Changes look fine. Did not build/run test this, though.

This revision is now accepted and ready to land.Jun 9 2021, 5:35 AM

LGTM. Also, we need a new gnuradio asap for boost 1.76 landing :)

devel/volk/Makefile
15–16

LICENSE_FILE= should be defined

18–19

cpu_features seems to be https://www.freshports.org/devel/cpu_features/ but that doesn't work?

21–25

Should say python:3.6+ (we don't have 3.5 in tree anymore)

36–37

https://github.com/gnuradio/volk/releases/tag/v2.5.0 --> https://github.com/gnuradio/volk/releases/download/v2.5.0/volk-2.5.0.tar.xz
https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-categories --> 5.4.3
"If the distribution file comes from a specific commit or tag on GitHub for which there is no officially released file..." (use MASTER_SITES rather than USE_GITHUB)

devel/volk/Makefile
18–19

Ahh, https://github.com/google/cpu_features/issues/158
We should still try to use the port if possible though... ;-)

devel/volk/Makefile
18–19

No, they don't allow dynamically linking to it, plus the version required is newer than in ports.

18–19

No, they submoduled cpu_features for a reason. Not only is dynamic linking not allowed, but our port is too old.

18–19

It is not merged, plus looks like a no-op anyway.

36–37

They use github for their official distribution (and issue tracking and whatnot) now, especially when fetching source code, despite having their own cgit.

devel/volk/Makefile
36–37

My point was that you should use the tar.xz or tar.gz file (which are official release archives) instead of USE_GITHUB as that doesn't fetch assets.

devel/volk/Makefile
36–37

Misplaced

Please have a look at this one: https://projects.pyret.net/files/public/freebsd/volk-prop.patch

  • Fixes Makefile ordering
  • Use upstream tar.xz archive
  • Update python:3.5+ to python:3.6+
  • Define LICENSE_FILE, TEST_TARGET
  • Import patch from openSUSE and follow their port

Ref: https://build.opensuse.org/package/show/openSUSE:Factory/volk

  • Import FreeBSD support from upstream pull request

Ref: https://github.com/google/cpu_features/pull/159

Compile and tested on 13.0-STABLE #0 stable/13-n245227-5ec4eb443e8 (amd64) (make, make check-plist, make test)

Looking further at that cpu_features upstream pull request, those sysctl values are probably wrong, and commented upstream to that effect.

And again, the real test is runtime with comms/gnuradio.

I just tried to rip out cpu_features (disabled) and make test fails

"23% tests passed, 104 tests failed out of 135"

Doesn't seem that promising :-/

Clean up the Makefile a bit, including using the release tarball

So far with some rudimentary dogfooding with GNU Radio, seems to behave itself. Need to further test runtime (look out for that CFT)

Proper cpu_features support is being worked on: https://github.com/google/cpu_features/pull/163

This revision now requires review to proceed.Jun 26 2021, 5:35 AM

Note regarding broken unit tests/unsupported (actual) CPU features causing SIGILLs: we will simply have to Deal With It.

Please report any SIGILLs et al only when running consumers in this configuration.

update to newer cpu_features snapshot and re-enable. Builds and tests successfully now on amd64

The patch needs to be updated because 2.5.0 update was committed from Bugzilla bug#261245

lib/libcpu_features.a, lib/cmake/CpuFeatures, include/cpu_features would conflict with devel/cpu_features. devel/cpu_features dependency should be used instead.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 16 2022, 5:01 PM
This revision was automatically updated to reflect the committed changes.

What this patch became is now completely wrong. See bugzilla.

re-up correct patch, rebase on committed

devel/volk/pkg-plist
162 ↗(On Diff #101507)

This would conflict with devel/cpu_features, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261252

168 ↗(On Diff #101507)

lib/libcpu_features.a would cause conflicts.

IMO the upstream should fix the cpu_features dependency. The way how it is now is just broken. The whole plist part of the patch is wrong.

Conflicting lib/cmake/CpuFeatures and lib/libcpu_features.a are installed.

remove installed cpu_features files

devel/volk/pkg-plist
41 ↗(On Diff #101509)

This is an unnecessary change breaking sortedness.

devel/volk/pkg-plist
41 ↗(On Diff #101509)

The auto-sort (ie .PLIST.mktmp) has it like that, as f comes before _.