Getting started for Torizon and Apalis iMX6 fails to build container

Hello,

I’m trying to follow the getting started guide for Apalis iMX6: Build and Run your First C Application

In step 9, I can’t build the docker container. The build output from VS19 says

1>------ Build started: Project: iMX6_HelloWorld, Configuration: Debug_Debian_Buster_slim x64 ------
1>Building application container...
1>EXEC : API error : Docker exception: The command '/bin/sh -c apt-get -q -y update && apt-get -q -y install openssh-server rsync $EXTRAPACKAGES' returned a non-zero code: 2
1>Description: Local docker exception.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(520,5): error MSB3073: The command ""c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\ucjiwbc2.cbr\TorizonBuildContainer.exe" "C:\Users\m.sauer\source\repos\iMX6_HelloWorld\iMX6_HelloWorld\appconfig_0" "debug" -sdk
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(520,5): error MSB3073: :VCEnd" exited with code 530.
1>Done building project "iMX6_HelloWorld.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any idea what’s going wrong here?

Best Regards,
matt

Greetings @m.sauer

I’m going to need a little more information to help you.

In the appconfig_0 folder there should be a file named Dockerfile.debug. If you could open a command prompt, then cd into the appconfig_0 folder and run docker build -f Dockerfile.debug this may give us some more information about what went wrong.

Best Regards,
Jeremias

Hello @jeremias.tx

I’ve tried to do this, but the command docker build -f Dockerfile.debugdoesn’t work for me:

C:\Users\m.sauer\source\repos\iMX6_HelloWorld\iMX6_HelloWorld\appconfig_0>docker build -f Dockerfile.debug
"docker build" requires exactly 1 argument.
See 'docker build --help'.

Usage:  docker build [OPTIONS] PATH | URL | -

Instead I had to use C:\Users\m.sauer\source\repos\iMX6_HelloWorld\iMX6_HelloWorld\appconfig_0>docker build . -f Dockerfile

I attached the output as textfile.

Dear @jeremias.tx ,

I also tried to follow the getting started guide on an iMX8 module, and I get exactly the same error. I’ve attached the Dockerfile.debug generated by the iMX8 project. Is it correct, that the first line states FROM arm32v7/debian:buster-slim?

I’m also wondering if there’s some missing configuration step in the guide because the build output says 1>------ Build started: Project: TorizonApp1, Configuration: Debug_Debian_Buster_slim x64 ------ no matter if I’m building for an ARM64 (iMX8) oder ARM32 (iMX6) architecture?

The newer version of the extension which is slated for release during Q1 this year will support proper arm64 containers. However compatibility wise our arm64 modules should be able to execute arm32 binaries.

As for the main issue I can only assume that you may have inadvertently changed the project configuration such that $EXTRAPACKAGES is some non standard value that causes the docker build to break.

One thing that would help clarify this is if you could share the content of the following files: Dockerfile and config.json. These files should be found in the same folder as Dockerfile.debug.

Best Regards,
Jeremias

Dear @jeremias.tx,

please find attached the files requested

Unfortunately we haven’t been able to recreate your error here with what you given us. May I suggest clearing the entire Visual Studio project and start it again from scratch.

If you’re able to recreate this same error then it would point to a consistent issue that we might be able to find.

Best Regards,
Jeremias

Dear @jeremias.tx,

I just started over and can’t even get to step 9 anymore. After adding the device connection in step 3, the board restarts but afterwards VS 2019 can’t connect to it anymore. Instead it says "2051-2020-02-03-14-32-37-window.png

I don’t know what I’m supposed to start, could you elaborate please? I can ping the board and SSH into the iMX6 just fine.

PS: Just before this occured for the first time, I updated from 16.4.3 to 16.4.4. Could this be the issue? I also detailed the information about the docker version I’m using in the first post.

In the current iteration of the extension there have been known issues with device connection. The current work-around/fix is a combination of update/refresh until it connects.

Apologies for the issues you’re having with the extension. The current public version is quite dated at this point and we hope to alleviate many of these issues with the next major release.

Dear @jeremias.tx,

thanks for the tip, but it just won’t connect anymore. Is there any way to start the server mentioned in the screenshot above? I do have access via SSH…

When can we expect the release of the VS19 extension? Frankly speaking, I don’t think you should make something the default “getting started” way of doing things if it’s still that unstable.

Apologies for the issues, this case has been elevated to our development team who are working on sorting the issues out with the extension. Thank you for reporting these issues however as your feedback is important.

In truth the extension spun out of a project from our innovation team and hasn’t been iterated/tested upon as much as it should have.

At the moment I can not give a definite timeline on when the extension will be fixed. But I will update this thread when I get any more information

Best Regards,
Jeremias

@jeremias.tx

Thanks for keeping us updated!

Greetings @m.sauer

Just wanted to inform you that new releases of both Torizon and our Visual Studio extension have been released. I hope these new releases resolve any errors/issues you may have had with past versions.

Best Regards,
Jeremias