Building OpenTAP from source on RaspberryPi - dotnet runtime detection

I am trying to build OpenTAP for various ARM64 host machines as part of a larger project.

So far I have attempted to build on

  1. Ubuntu 20.04 running in a Parallels VM on a MacBook Pro M1
  2. RaspianPi OS for ARM64 running on a Raspberry Pi 4 Model B

The ARM Ubuntu system behaves 99% like its Intel Architecture equivalent: I can download and install .NET 6 and use it to build and test tap w/o problems.

On RaspianPi OS, there does not appear to be a apt-get-based installation for .NET, but several alternate installation scripts exist, e.g.,

curl -sSL | bash
wget -O - | sudo bash

Both deliver working instances of dotnet, and the dotnet itself reports the presence of SDKs and runtimes. However, the dotnet executable (and presumably other key files) appear in a different location than under Ubuntu: /usr/local/bin/ vs. /usr/bin/

Building opentap doesn’t seem to like this difference: the build fails with

error MSB3073: The command "/home/bilzinho/opentap/opentap-main/bin/Release/tap package create ../../package.xml -o /home/bilzinho/opentap/opentap-main/bin/Release/OpenTap.Debug.TapPackage --install" exited with code 131.

This error actually comes from the build attempting to test opentap. Invoking tap directly reports that it cannot locate the dotnet runtime (even if dotnet itself reports it being installed) and makes (mostly useless) suggestions on how to install the runtime.

I tried variously to convince the system that the .NET runtime was indeed present, e.g., I added files install_location and install_location_arm64 under /etc/dotnet with corrected paths to dotnet executables and created a link under /usr/bin, to no avail.

Any advice on a better installation procedure or a hack to fix .NET installation detection by the tap runtime?


Bill W.

I attempted yet another download and install procedure for .NET and this time I was able to build OpenTAP without problems.

See Setup .NET Runtime and SDK on Raspberry Pi 4 - Edi Wang

1 Like

That looks like the dotnet install I used with rPi as well. You may have to install gitversion and add a link to it as well for the buildscripts to run properly. Also System.IO.Ports has issues with loading the correct one for serial IO. The biggest headache I’ve had in Linux to date is the inability to select serial ports based upon symlinks which I created to make them more meaningful. Visa will require a little work via pyVisa and a package released by Keysight since NI doesn’t support ARM. Of course there are also some devices which lack driver support for non-windows platforms as well.