NanoVNA-QT
NanoVNA-QT copied to clipboard
MacOS macports build fails on Big Sur 11.1 (eigen3 build failure)
Using
sudo port install NanoVNA-QT
build fails with error
Error: Failed to configure eigen3: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_eigen3/eigen3/main.log for details.
which in result points to:
clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.1'
in main.log
can you open a ticket to trac.macports.org with the same information? thank you
Any updates on this?
We did an update from May 1. Do you receive the same error?
@ra1nb0w I ran sudo port install NanoVNA-QT and it throws a checksum error.
Can you post the error and the main.log? thank you
or you can re-try to build NanoVNA-QT since I committed a fix
Coto@cotos-mbp ~ % sudo port install NanoVNA-QT
---> Computing dependencies for NanoVNA-QT
---> Fetching archive for NanoVNA-QT
---> Attempting to fetch NanoVNA-QT-20200507_0.darwin_19.x86_64.tbz2 from https://fra.de.packages.macports.org/NanoVNA-QT
---> Attempting to fetch NanoVNA-QT-20200507_0.darwin_19.x86_64.tbz2 from https://packages.macports.org/NanoVNA-QT
---> Attempting to fetch NanoVNA-QT-20200507_0.darwin_19.x86_64.tbz2 from https://mse.uk.packages.macports.org/NanoVNA-QT
---> Building NanoVNA-QT
Error: Failed to build NanoVNA-QT: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_NanoVNA-QT/NanoVNA-QT/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port NanoVNA-QT failed
I've attached main.log
:
@ra1nb0w I also tried to build, but again no .app
is created and the .dmg
is empty. What I ran/output:
build_attempt.txt
EDIT: Also, the brew installation seems OK as well:
Coto@cotos-mbp NetworkOptimizer % brew install automake libtool make eigen fftw
Warning: automake 1.16.4 is already installed and up-to-date.
To reinstall 1.16.4, run:
brew reinstall automake
Warning: libtool 2.4.6_4 is already installed and up-to-date.
To reinstall 2.4.6_4, run:
brew reinstall libtool
Warning: make 4.3 is already installed and up-to-date.
To reinstall 4.3, run:
brew reinstall make
Warning: eigen 3.4.0_1 is already installed and up-to-date.
To reinstall 3.4.0_1, run:
brew reinstall eigen
Warning: fftw 3.3.10 is already installed and up-to-date.
To reinstall 3.3.10, run:
brew reinstall fftw
you need to
sudo port sync
sudo port install nanovna-qt
if you have homebrew installed into /usr/local
you can have trouble to build software correctly.
@ra1nb0w Thanks for your response, but it still fails:
Coto@cotos-mbp ~ % sudo port sync
Password:
---> Updating the ports tree
Coto@cotos-mbp ~ % sudo port install nanovna-qt
Password:
Portfile changed since last build; discarding previous state.
Warning: cltversion: The Command Line Tools are installed, but MacPorts cannot determine the version.
Warning: cltversion: For a possible fix, please see: https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
Warning: cltversion: The Command Line Tools are installed, but MacPorts cannot determine the version.
Warning: cltversion: For a possible fix, please see: https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
---> Computing dependencies for libxavna
---> Fetching archive for libxavna
---> Attempting to fetch libxavna-20200507_1.darwin_19.x86_64.tbz2 from https://fra.de.packages.macports.org/libxavna
---> Attempting to fetch libxavna-20200507_1.darwin_19.x86_64.tbz2 from https://packages.macports.org/libxavna
---> Attempting to fetch libxavna-20200507_1.darwin_19.x86_64.tbz2 from https://mse.uk.packages.macports.org/libxavna
---> Fetching distfiles for libxavna
---> Verifying checksums for libxavna
Error: Checksum (rmd160) mismatch for NanoVNA-QT-20200507.tar.gz
Error: Checksum (sha256) mismatch for NanoVNA-QT-20200507.tar.gz
Error: Checksum (size) mismatch for NanoVNA-QT-20200507.tar.gz
Error: Failed to checksum libxavna: Unable to verify file checksums
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_NanoVNA-QT/libxavna/main.log for details.
Error: Unable to execute port: upgrade libxavna failed
As for where it is installed:
Coto@cotos-mbp ~ % which brew
/usr/local/bin/brew
Seems a stealth update from upstream. try with
sudo port clean --dist
sudo port sync
sudo port install nanovna-qt
now should be correctly in sync the checksum.
thank you for testing
It finally worked, thank you very much for your help! :)
good! @m-stefanski still fail to build?
@ra1nb0w While I'm on it, is it possible to interface with NanoVNA-QT through the command line or with some sort of scripting? My goal is to automate the capture of s2p
data every few seconds.
(Also: is it possible to get NanoVNA-QT working on a Raspberry Pi? I don't think they can run AppImages...)
to access nanovna v2 from command line you need to write code in c/c++, see https://github.com/nanovna-v2/NanoVNA-QT/tree/master/libxavna
raspberry: yes, you can compile and install nanovna-qt in the same way or use appimages
I get this when running make
on the C++ code shown in the readme:
fatal error: 'xavna/xavna_cpp.H' file not found
#include <xavna/xavna_cpp.H>
^~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [testt] Error 1
Where exactly is this xavna
directory located containing the xavna_cpp.H
file?
Edit: I found it's in the include
folder, but I'm a bit confused (as a C/C++ non-expert) how I could execute the example(?) code shown in the readme. :)
Essentially my goal is to:
- Connect to the NanoVNA device
- Set the frequency range (start frequency, step frequency, number of points)
- Read data (ideally export to
sNp
) - Disconnect from device
Hopefully this isn't super hard to achieve with the API? (apologies for the likely dumb questions - I'm clearly a beginner 😅 )
- use lover
.h
to avoid problem with case-sensitive file system - you need to include the header/library paths
cc -l/opt/local/include -L/opt/local/lib your_test.c
I replaced the first line of the .c
code snippet given in the readme with #include "include/xavna.h"
and ran cc -l/opt/local/include -L/opt/local/lib test_api.c
:
Coto@cotos-mbp libxavna % cc -l/opt/local/include -L/opt/local/lib test_api.c
In file included from test_api.c:1:
./include/xavna.h:3:8: error: expected identifier or '('
extern "C" {
^
test_api.c:8:2: error: unknown type name 'bool'
bool xavna_is_tr(void* dev);
^
test_api.c:16:78: error: C does not support default arguments
int xavna_set_params(void* dev, int freq_khz, int atten, int port, int nWait=20);
^~~
3 errors generated.
Thanks for your patience
xavna.h
is not a valid C header for many reasons:
-
extern "C"
is only valid on C++ - bool doesn't exist in C until C99 with
stdbool.h
- C does not support default arguments
- must use 'struct' tag to refer to type 'autoSweepDataPoint'
you probably need to use C++ as the entire nanovna-qt interface.
anyway, to get the entire header files install the update available in macports.
another way to comunicate with nanovna2 is to use python, see https://github.com/nanovna-v2/NanoVNA2-firmware/tree/master/python https://github.com/nanovna-v2/NanoVNA2-firmware/pull/75
@ra1nb0w Wow, I had no idea this existed. The only one I had spotted is this (https://github.com/ttrftech/NanoVNA/tree/master/python), which is very similar but does not support the V2 model. But your link did the trick!
I've managed to completely wrap all my utilities around this now and everything works well, thank you very very much! 😃
@ra1nb0w One more thing in case you've got any ideas: I've managed to get everything working and I'm able to output touchstone files, plot them etc., but I see that the |S21| values disagree between the NanoVNA alone (i.e. not connected to python/a computer) and the ones the python script is measuring.
My understanding is that once I calibrate the device (SOLT) and connect it to the computer, the python interface does not seem to pick up the latest calibration on file. Is there a simple way to either load the latest calibration on file or manually re-run the SOLT calibration again through python, or do I write something up and save each state (OPEN, SHORT, LOAD, THRU) as a separate sNp file and apply the calibration locally?
I don't know since I always calibrate the range that I need before measure any values or at least I save the calibration data in a file and I will recall it when I need it. I think that the python library should have something that you can take and use in your code.