Bug 266774 - comms/hackrf: Update 2017.01.1 -> 2021.03.1.
Summary: comms/hackrf: Update 2017.01.1 -> 2021.03.1.
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: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-02 19:51 UTC by Tomasz "CeDeROM" CEDRO
Modified: 2022-10-05 01:50 UTC (History)
3 users (show)

See Also:


Attachments
HackRF update patch 2017.02.1 -> 2021.03.1. (3.06 KB, patch)
2022-10-02 19:51 UTC, Tomasz "CeDeROM" CEDRO
no flags Details | Diff
LIB_DEPENDS += libfftw3f. (347 bytes, patch)
2022-10-03 23:03 UTC, Tomasz "CeDeROM" CEDRO
no flags Details | Diff
libfftw3f - std=gnu90 patch. (1.75 KB, patch)
2022-10-04 15:17 UTC, Tomasz "CeDeROM" CEDRO
no flags Details | Diff
libfftw3f + std + portrevision. (1.91 KB, patch)
2022-10-04 15:40 UTC, Tomasz "CeDeROM" CEDRO
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz "CeDeROM" CEDRO 2022-10-02 19:51:36 UTC
Created attachment 237026 [details]
HackRF update patch 2017.02.1 -> 2021.03.1.

Here goes the update for comms/hackrf from 2017.02.1 to 2021.03.1.

As 2022.09.1 release is out we need to update the port. However version 2022.09.1 uses LibUSB call that was not yet in the base, so we can for now only update to 2021.03.1.

HPS created patch to LibUSB today:
https://cgit.freebsd.org/src/commit/?id=aa87aa52326be7b726664dba65e91ec3d8160f48

When LibUSB lands into a RELEASE we will be able to update port to 2022.09.1 :-)
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2022-10-02 19:51:36 UTC
Maintainer informed via mail
Comment 2 Tomasz "CeDeROM" CEDRO 2022-10-02 20:00:09 UTC
GitHub Pull Request: https://github.com/freebsd/freebsd-ports/pull/132
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2022-10-02 20:51:38 UTC
(In reply to Tomasz "CeDeROM" CEDRO from comment #2)
It needs

LIB_DEPENDS=    libfftw3.so:math/fftw3 \
                libfftw3f.so:math/fftw3-float

to build with poudriere.
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2022-10-02 20:59:11 UTC
Committed, thanks!
Comment 5 Tomasz "CeDeROM" CEDRO 2022-10-02 21:55:11 UTC
TANK U SIR! :-)

I need to learn that Poudriere stuff :-)
Comment 6 Craig Leres freebsd_committer freebsd_triage 2022-10-03 22:20:00 UTC
(In reply to Kurt Jaeger from comment #3)
I don't see:

    libfftw3f.so:math/fftw3-float

in the port (b3d5add222) and it fails to link for me:

FAILED: hackrf-tools/src/hackrf_operacake 
: && /usr/local/libexec/ccache/cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -std=gnu90 -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong hackrf-tools/src/CMakeFiles/hackrf_operacake.dir/hackrf_operacake.c.o -o hackrf-tools/src/hackrf_operacake -L/usr/local/lib -Wl,-rpath,/usr/local/lib:/wrkdirs/usr/ports/comms/hackrf/work/.build/libhackrf/src:  -lm  -lfftw3f  libhackrf/src/libhackrf.so.0.6.0  -lusb  -pthread && :
ld: error: unable to find library -lfftw3f
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Comment 7 Tomasz "CeDeROM" CEDRO 2022-10-03 23:03:35 UTC
Created attachment 237061 [details]
LIB_DEPENDS += libfftw3f.

Here you go Sir! :-)
Comment 8 Tomasz "CeDeROM" CEDRO 2022-10-04 15:17:42 UTC
Created attachment 237070 [details]
libfftw3f - std=gnu90 patch.

Reopening as some fixes needs to be added, sorry :-)

This should fix:
1. Missing libfftw3f.
2. Build issue reported by pkg-fallout on i386: http://beefy15.nyi.freebsd.org/data/131i386-default/73caab237543/logs/hackrf-2021.03.1.log. I have removed files that were patching "-std=gnu90" part, lets bring them back and see how it works on i386.

i386 build problem:
[  4% 2/21] /usr/bin/cc -DLIBRARY_RELEASE=\"unknown\" -DLIBRARY_VERSION=\"0.6\" -Dhackrf_EXPORTS  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -std=gnu90 -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -fPIC   -Wall -MD -MT libhackrf/src/CMakeFiles/hackrf.dir/hackrf.c.o -MF libhackrf/src/CMakeFiles/hackrf.dir/hackrf.c.o.d -o libhackrf/src/CMakeFiles/hackrf.dir/hackrf.c.o -c /wrkdirs/usr/ports/comms/hackrf/work/hackrf-e6eb4ba/host/libhackrf/src/hackrf.c
/wrkdirs/usr/ports/comms/hackrf/work/hackrf-e6eb4ba/host/libhackrf/src/hackrf.c:1227:19: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat]
        if (if_freq_hz < 2150000000 || if_freq_hz > 2750000000) {
                         ^
/wrkdirs/usr/ports/comms/hackrf/work/hackrf-e6eb4ba/host/libhackrf/src/hackrf.c:1227:46: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat]
        if (if_freq_hz < 2150000000 || if_freq_hz > 2750000000) {
                                                    ^
2 warnings generated.
[  9% 3/21] : && /usr/bin/cc -fPIC -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -std=gnu90 -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -fstack-protector-strong -shared -Wl,-soname,libhackrf.so.0 -o libhackrf/src/libhackrf.so.0.6.0 libhackrf/src/CMakeFiles/hackrf.dir/hackrf.c.o  -lusb  -pthread && :
[ 14% 4/21] /usr/local/bin/cmake -E cmake_symlink_library libhackrf/src/libhackrf.so.0.6.0  libhackrf/src/libhackrf.so.0 libhackrf/src/libhackrf.so && :
[ 19% 5/21] /usr/bin/cc -DLIBRARY_RELEASE=\"unknown\" -DLIBRARY_VERSION=\"0.6\"  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -std=gnu90 -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing   -Wall -MD -MT libhackrf/src/CMakeFiles/hackrf-static.dir/hackrf.c.o -MF libhackrf/src/CMakeFiles/hackrf-static.dir/hackrf.c.o.d -o libhackrf/src/CMakeFiles/hackrf-static.dir/hackrf.c.o -c /wrkdirs/usr/ports/comms/hackrf/work/hackrf-e6eb4ba/host/libhackrf/src/hackrf.c
/wrkdirs/usr/ports/comms/hackrf/work/hackrf-e6eb4ba/host/libhackrf/src/hackrf.c:1227:19: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat]
        if (if_freq_hz < 2150000000 || if_freq_hz > 2750000000) {
                         ^
/wrkdirs/usr/ports/comms/hackrf/work/hackrf-e6eb4ba/host/libhackrf/src/hackrf.c:1227:46: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat]
        if (if_freq_hz < 2150000000 || if_freq_hz > 2750000000) {
                                                    ^
2 warnings generated.
[ 23% 6/21] : && /usr/local/bin/cmake -E rm -f libhackrf/src/libhackrf.a && /usr/bin/llvm-ar qc libhackrf/src/libhackrf.a  libhackrf/src/CMakeFiles/hackrf-static.dir/hackrf.c.o && /usr/bin/llvm-ranlib libhackrf/src/libhackrf.a && :
Comment 9 Tomasz "CeDeROM" CEDRO 2022-10-04 15:18:49 UTC
Provided patch is to be applied already on top of current 2021.03.1 port in the source tree.
Comment 10 Tomasz "CeDeROM" CEDRO 2022-10-04 15:40:21 UTC
Created attachment 237072 [details]
libfftw3f + std + portrevision.

We are updating existing port version so added PORTREVISION=1.
Comment 11 Tomasz "CeDeROM" CEDRO 2022-10-05 01:50:57 UTC
1. fftw3f added.
2. portrevision bumped.
3. no need to change std.
4. updates port in the source tree already.

thank you :-)