Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#63112 closed defect (fixed)

bladeRF build failure due to incorrect C standard specified by cmake portgroup

Reported by: warnes (Gregory R. Warnes) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: bladeRF

Description

It looks like someone forgot to upload the source file bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 to MacPorts:

:debug:main Starting logging for bladeRF @20210505-ded573bc_0+docs
:debug:sysinfo macOS 11.4 (darwin/20.5.0) arch i386
:debug:sysinfo MacPorts 2.7.1
:debug:sysinfo Xcode 12.5
:debug:sysinfo SDK 11
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 11.0
:debug:main epoch: in tree: 0 installed: 0
:debug:main cmake 3.19.8_0 exists in the ports tree
:debug:main cmake 3.15.4_0  is the latest installed
:debug:main cmake 3.15.4_0  is active
:debug:main Merging existing requested variants '' into variants
:debug:main new fully merged portvariants:

...

:info:archivefetch --->  bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
:msg:archivefetch --->  Attempting to fetch bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 from https://packages.macports.org/bladeRF
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404
:msg:archivefetch --->  Attempting to fetch bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/bladeRF
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404 Not Found
:msg:archivefetch --->  Attempting to fetch bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 from https://mse.uk.packages.macports.org/bladeRF
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404 Not Found

Change History (7)

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Keywords: bladerRF removed
Owner: set to michaelld
Port: bladeRF added
Priority: HighNormal
Status: newassigned

That's a binary archive, not a source file. It's normal for those not to exist sometimes and MacPorts will fall back to building from source in that case. Are you seeing an error after what you quoted? If so, please attach the main.log.

comment:2 Changed 3 years ago by warnes (Gregory R. Warnes)

@jmroot. Thanks.

There are compilation errors further down in the log:

:info:build /opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build/host/common/thirdparty/ad936x/ad9361_api.c:129:7: warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
:info:build         for (size_t i = 0; i < NUM_AD9361_CLKS; ++i) {
:info:build              ^
:info:build [  6%] Built target bladeRF-fsk_test_crc32
:info:build /opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build/host/common/thirdparty/ad936x/ad9361_api.c:129:14: error: redefinition of 'i' with a different type: 'size_t' (aka 'unsigned long') vs 'int32_t' (aka 'int')
:info:build         for (size_t i = 0; i < NUM_AD9361_CLKS; ++i) {
:info:build                     ^
:info:build /opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build/host/common/thirdparty/ad936x/ad9361_api.c:85:10: note: previous definition is here
:info:build         int32_t i   = 0;
:info:build                 ^
:info:build /usr/bin/clang -pipe -Os -DNDEBUG -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -O3 -DNDEBUG -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -mmacosx-version-min=11.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk CMakeFiles/bladeRF-fsk_test_correlator.dir/src/correlator.c.o CMakeFiles/bladeRF-fsk_test_correlator.dir/src/utils.c.o CMakeFiles/bladeRF-fsk_test_correlator.dir/src/fsk.c.o CMakeFiles/bladeRF-fsk_test_correlator.dir/__/__/__/common/src/osx/clock_gettime.c.o -o ../../../output/bladeRF-fsk_test_correlator  -lm
:info:build [  6%] Built target bladeRF-fsk_test_prng
:info:build /opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build/host/common/thirdparty/ad936x/ad9361_api.c:531:7: warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
:info:build         for (size_t i = 0; i < NUM_AD9361_CLKS; ++i) {
:info:build              ^
:info:build /opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build/host/common/thirdparty/ad936x/ad9361_api.c:531:14: error: redefinition of 'i' with a different type: 'size_t' (aka 'unsigned long') vs 'int32_t' (aka 'int')
:info:build         for (size_t i = 0; i < NUM_AD9361_CLKS; ++i) {
:info:build                     ^
:info:build /opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build/host/common/thirdparty/ad936x/ad9361_api.c:85:10: note: previous definition is here
:info:build         int32_t i   = 0;
:info:build                 ^
:info:build /opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build/host/common/thirdparty/ad936x/ad9361_api.c:568:8: warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
:info:build                 for (size_t i = 0; i < NUM_AD9361_CLKS; ++i) {
:info:build                      ^
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_Users_warnes_src_macports-ports_science_bladeRF/bladeRF/work/build'
:info:build 3 warnings and 2 errors generated.

Do I need to select a different compiler?

Last edited 3 years ago by jmroot (Joshua Root) (previous) (diff)

comment:3 Changed 3 years ago by jmroot (Joshua Root)

Summary: URL not found when building bladeRFbladeRF build failure due to incorrect C standard specified by cmake portgroup

comment:4 Changed 3 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In 43e74dda14903b8bc24afeefc35830f0354d37b5/macports-ports (master):

cmake 1.1 pg: default cmake.set_{c,cxx}_standard to no

Fixes: #63112

comment:5 Changed 3 years ago by warnes (Gregory R. Warnes)

Hmm. What do I need to do to apply that change? port selfupdate doesn't seem to have done the trick:

sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.7.1 installed,
MacPorts base version 2.7.1 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
warnes@GRW-MacBookPro group % sudo port upgrade outdated
--->  Computing dependencies for bladeRF
--->  Fetching archive for bladeRF
--->  Attempting to fetch bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 from https://packages.macports.org/bladeRF
--->  Attempting to fetch bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/bladeRF
--->  Attempting to fetch bladeRF-20210505-ded573bc_0+docs.darwin_20.x86_64.tbz2 from https://mse.uk.packages.macports.org/bladeRF
--->  Building bladeRF
Error: Failed to build bladeRF: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_bladeRF/bladeRF/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
warnes@GRW-MacBookPro group % pwd

comment:6 Changed 3 years ago by jmroot (Joshua Root)

It can take a while for changes to get from git to rsync. Give it an hour and try again. Also run sudo port clean bladeRF to clean up the previous build attempt.

Last edited 3 years ago by jmroot (Joshua Root) (previous) (diff)

comment:7 Changed 3 years ago by warnes (Gregory R. Warnes)

sudo port install bladerf now succeeds.

Thanks for the help!

Note: See TracTickets for help on using tickets.