Run/Debug with apolloX / imx6q / torizonCore

Hello community :slight_smile: ,

I have some issue for my project,

First one :
i follow this tutorial :

But in the finale i got this error : ‘LibGpiodDriver is only supported on Linux/Unix’.

So I installed apolloX under the remote explorer of visual studio code (wsl ubuntu), but when I want to Run/Debug with ‘Torizon ARM v7’ here is the result of the terminal:

 *  Executing task: dotnet build /home/fonky/ConnectHomeV2/ConnectHomeV2.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary -r linux-arm 

A fatal error occurred. The folder [/usr/share/dotnet/host/fxr] does not exist

 *  The terminal process "dotnet 'build', '/home/fonky/ConnectHomeV2/ConnectHomeV2.csproj', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary', '-r', 'linux-arm'" failed to launch (exit code: 131). 
 *  Terminal will be reused by tasks, press any key to close it. 

I have installed .net 6, 7 and .netcore 3.1 but the installation fails with this message :

fonky@Fonky:~/ConnectHomeV2$ sudo apt-get install dotnet-sdk-3.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dotnet-runtime-deps-3.1 : Depends: libssl1.0.0 but it is not installable or
                                    libssl1.0.2 but it is not installable or
                                    libssl1.1 but it is not installable
E: Unable to correct problems, you have held broken packages.

I am totally lost lol, if someone can help me :pray: :sweat_smile:

Greetings @Fonky,

I tried the tutorial and it worked okay for me. I used .NET 6 and an Apalis i.MX6. Perhaps you missed a step or your setup wasn’t fully configured correctly?

‘LibGpiodDriver is only supported on Linux/Unix’.

This error is strange since the code runs in a Linux container so it shouldn’t matter here. Did you get this error when attempting to debug and deploy? Did it specifically happen during the building stage?

As for your issues with ApolloX we’re still looking into it.

Best Regards,
Jeremias

Hello @jeremias.tx :slight_smile: ,

Concerning the run/debug under windows, I always have the same error

libgpiod driver is only supported on linux/unix

here is the version

fonky@Fonky:/mnt/c/Users/Elafi/OneDrive/Bureau/ConnectHome$ pkg-config --modversion libgpiod
1.6.3

Concerning the run/debug under wsl remote (vs code), I managed to unblock my problem by uninstalling and installing dotnet several times,
But now I have this error :

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
Get "http://localhost:5002/v2/": dial tcp [::1]:5002: connect: connection refused
fonky@Fonky:~$ sudo lsof -i :5002
fonky@Fonky:~$ sudo ufw allow 5002
Rules updated
Rules updated (v6)

I’ve been trying to make a led blink for a month, I get so many different errors all the time lol :sweat_smile:

Hi @Fonky ,

Concerning the run/debug under wsl remote (vs code), I managed to unblock my problem by uninstalling and installing dotnet several times,

Just giving more context to this problem in particular: I talked to the extension team about this issue and it looks like it is related to your local .NET installation. If you have installed both the .NET package directly from Microsoft and the one from the Ubuntu feeds they can conflict with one another for instance.

But now I have this error :

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
Get "http://localhost:5002/v2/": dial tcp [::1]:5002: connect: connection refused

Can you share some lines before the WARN message? In particular the last line that starts with Executing task: is crucial to see which task ApolloX was trying to run before failing.

You’re using Windows, right? Just to be sure, can you run task run-share-wsl-ports and click yes when prompted? You can run the task by clicking on it in the task runner, as shown in the image below:

Best regards,
Lucas Akira

Hello @lucas_a.tx :slightly_smiling_face: ,

I share you everything of my project (WSL ubuntu):

My setup =
-Ixora v1.1A,
-Apalis IMX6Q 2GB IT v1.1B
-Power = 12V (JP1 OFF)
-Mouse/keyboard USB
-Ethernet

Here my program.cs :

Here the result for ‘run-share-wsl-port’

Here the result of my run/debug Torizon V7 :

Here my setting.json :

Here the “Torizon ARMv7” form my launch.json :

-.-.-.-.-.-.-.-.
Concerning the windows side, here is the result of the run/debug output :

Edit ‘run-share-wsl-port’

solved with : sudo apt-get update && sudo apt-get install net-tools

Hi @Fonky ,

From this image I can see that V1 of the extension is trying to initialize, but failing to do so (see at the bottom: Torizon: Initializing...). This is probably the cause of the issue you’re having with V1 i.e. the LibGpiodDriver is only supported on Linux/Unix error.

I recommend always disabling one version when using the other.

One more thing to keep in mind is that ApolloX sets a variable in VSCode that makes V1 unable to initialize correctly. You need remove this line if you want to use V1.

So in summary:

If you’re trying to use V1 of the extension:

  • Disable/Uninstall ApolloX
  • Open the command palette with F1 then type ‘Preferences: Open User Settings (JSON)’. A file called settings.json will open
  • Comment/remove the line that starts with "DOCKER_HOST": ..., then save the file.
  • V1 should be able to initialize correctly.

If you’re trying to use V2/ApolloX:

  • Disable/Uninstall V1 of the extension

Also, keep in mind that when using ApolloX, VSCode has to be connected to WSL in order to function correctly.

solved with : sudo apt-get update && sudo apt-get install net-tools

After running run-share-wsl-ports, did you manage to run the ApolloX project successfully? Let me know.

Best regards,
Lucas Akira

Hello @Fonky ,

Were you able to solve your issue with the info provided by @lucas_a.tx ?
If so, could you please mark his answer as a solution?

Best regards,
Josep