Azure / iotedgedev

The Azure IoT Edge Dev Tool greatly simplifies your Azure IoT Edge development process. It has everything you need to get started and helps with your day-to-day Edge development.
https://aka.ms/iotedgedev
Other
160 stars 70 forks source link

Devcontainer not running on Arm machine #513

Closed eavanvalkenburg closed 2 years ago

eavanvalkenburg commented 2 years ago

Steps to Reproduce:

  1. run the devcontainer as defined in this repo on a arm machine (in my case M1 Mac mini)
  2. crashes during starting with error: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

The same exact config does run on Codespaces.

marianan commented 2 years ago

@eavanvalkenburg thanks for reporting this issue. We are tracking a similar issue at #484 - could you check if the symptoms appear the same?

konichi3 commented 2 years ago

@eavanvalkenburg Happy new year. We are wondering if you had a chance to see if the issue (#484) above is the same issue you are experiencing?

eavanvalkenburg commented 2 years ago

Doesn't look like it, just tried again and got this while trying to start/initialize the devcontainer:

#9 3.440 Get:7 https://packages.microsoft.com/repos/azure-cli buster/main amd64 Packages [10.5 kB]
#9 3.450 Fetched 470 kB in 0s (1000 kB/s)
#9 3.450 Reading package lists...
#9 3.822 Reading package lists...
#9 4.206 Building dependency tree...
#9 4.282 Reading state information...
#9 4.384 The following NEW packages will be installed:
#9 4.385   azure-cli
#9 4.502 0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
#9 4.502 Need to get 63.4 MB of archives.
#9 4.502 After this operation, 918 MB of additional disk space will be used.
#9 4.502 Get:1 https://packages.microsoft.com/repos/azure-cli buster/main amd64 azure-cli all 2.24.0-1~buster [63.4 MB]
#9 7.671 debconf: delaying package configuration, since apt-utils is not installed
#9 7.688 Fetched 63.4 MB in 3s (19.9 MB/s)
#9 7.810 Selecting previously unselected package azure-cli.
(Reading database ... 24617 files and directories currently installed.)
#9 7.820 Preparing to unpack .../azure-cli_2.24.0-1~buster_all.deb ...
#9 7.847 Unpacking azure-cli (2.24.0-1~buster) ...
#9 17.79 Setting up azure-cli (2.24.0-1~buster) ...
#9 17.89 qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
------
executor failed running [/bin/sh -c apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg &&     curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null &&     echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/azure-cli.list &&     apt-get update && apt-get install -y azure-cli=${AZURE_CLI_VERSION} &&     az extension add --name azure-iot --system &&     az extension update --name azure-iot &&     apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common lsb-release &&     curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null &&     add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" &&     apt-get update &&     apt-get install -y docker-ce-cli &&     curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - &&     apt-get install -y nodejs &&     npm install -g yo &&     npm i -g yo generator-azure-iot-edge-module &&     cd ~ &&     wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     rm packages-microsoft-prod.deb &&     apt-get update && apt-get install -y apt-transport-https &&     apt-get update && apt-get install -y dotnet-sdk-${DOTNET_VERSION} &&     apt-get install -y default-jdk=${JDK_VERSION} &&     apt-get install -y maven=${MAVEN_VERSION} &&     apt-get autoremove -y &&     apt-get clean -y &&     rm -rf /tmp/* &&     rm -rf /var/lib/apt/lists/*]: exit code: 255
[22292 ms] Command failed: docker build -f /Users/edvan/Work/dev/iotedge/.devcontainer/Dockerfile -t vsc-iotedge-24ece70f472af839e8a3f48464841aad /Users/edvan/Work/dev/iotedge
konichi3 commented 2 years ago

@eavanvalkenburg Thanks for the response and confirming it is different issue. We will try to reproduce in house and get back to you

marianan commented 2 years ago

@eavanvalkenburg this post has a possible root cause for the issue that you are observing - https://stackoverflow.com/questions/68630526/lib64-ld-linux-x86-64-so-2-no-such-file-or-directory-error Could you retry to run the container using emulated x86_64 environment? I don't have an M1 device to test it but it should look like this - mkdir ~/iotedge docker run --platform linux/x86_64 -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/iotedge:/home/iotedge mcr.microsoft.com/iotedge/iotedgedev

konichi3 commented 2 years ago

@eavanvalkenburg We are closing due to inactivity but feel free to create a new or reopen.