Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS macports build fails on Big Sur 11.1 (eigen3 build failure) #23

Open
m-stefanski opened this issue Jan 10, 2021 · 23 comments
Open

Comments

@m-stefanski
Copy link

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

macports_log.txt
main.log

@ra1nb0w
Copy link
Contributor

ra1nb0w commented May 1, 2021

can you open a ticket to trac.macports.org with the same information? thank you

@0xCoto
Copy link

0xCoto commented Sep 27, 2021

Any updates on this?

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Sep 27, 2021

We did an update from May 1. Do you receive the same error?

@0xCoto
Copy link

0xCoto commented Sep 27, 2021

@ra1nb0w I ran sudo port install NanoVNA-QT and it throws a checksum error.

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Sep 28, 2021

Can you post the error and the main.log? thank you

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Sep 28, 2021

or you can re-try to build NanoVNA-QT since I committed a fix

@0xCoto
Copy link

0xCoto commented Sep 28, 2021

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:

main.log

@0xCoto
Copy link

0xCoto commented Sep 28, 2021

@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

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Sep 29, 2021

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.

@0xCoto
Copy link

0xCoto commented Oct 6, 2021

@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

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Oct 6, 2021

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

@0xCoto
Copy link

0xCoto commented Oct 6, 2021

It finally worked, thank you very much for your help! :)

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Oct 7, 2021

good!
@m-stefanski still fail to build?

@0xCoto
Copy link

0xCoto commented Oct 8, 2021

@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...)

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Oct 9, 2021

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

@0xCoto
Copy link

0xCoto commented Oct 10, 2021

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:

  1. Connect to the NanoVNA device
  2. Set the frequency range (start frequency, step frequency, number of points)
  3. Read data (ideally export to sNp)
  4. 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 😅 )

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Oct 11, 2021

  • 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

@0xCoto
Copy link

0xCoto commented Oct 11, 2021

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

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Oct 11, 2021

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.

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Oct 11, 2021

another way to comunicate with nanovna2 is to use python, see
https://github.com/nanovna-v2/NanoVNA2-firmware/tree/master/python
nanovna-v2/NanoVNA2-firmware#75

@0xCoto
Copy link

0xCoto commented Oct 12, 2021

@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! 😃

@0xCoto
Copy link

0xCoto commented Dec 18, 2021

@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?

@ra1nb0w
Copy link
Contributor

ra1nb0w commented Dec 18, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants