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

Potentially missing shebang #13

Open
garnetgrimm opened this issue Jun 25, 2021 · 4 comments
Open

Potentially missing shebang #13

garnetgrimm opened this issue Jun 25, 2021 · 4 comments

Comments

@garnetgrimm
Copy link

Hey everyone. I'm fairly new to docker, so this might be my fault, but I'm fairly certain that one of the scripts here is missing the shebang and thus causes a Exec format error.

docker run --rm -it -v /home/garnet/Desktop/vsthwhost/elk/:/workdir crops/extsdk-container --url https://github.com/elk-audio/elkpi-sdk/releases/download/v0.6/elk-glibc-x86_64-elk-sika-image-dev-cortexa7t2hf-neon-vfpv4-raspberrypi3-toolchain-1.0.sh
Unable to find image 'crops/extsdk-container:latest' locally
latest: Pulling from crops/extsdk-container
4007a89234b4: Pull complete 
c1de0f9cdfc1: Pull complete 
c8ee6ca703b8: Pull complete 
b39e2761d3d4: Pull complete 
4ab840498e9b: Pull complete 
9d203aa3ff90: Pull complete 
b98ad51bcd32: Pull complete 
38a1c1deb0a7: Pull complete 
8182654b9e69: Pull complete 
2a6699e53f28: Pull complete 
512473789bf9: Pull complete 
0d7bc3e4eea4: Pull complete 
a59db0fb903c: Pull complete 
Digest: sha256:62886c8e5a13f24d0bd511b774da2e22bae05389cf78c5922775994adf30e736
Status: Downloaded newer image for crops/extsdk-container:latest
Attempting to download https://github.com/elk-audio/elkpi-sdk/releases/download/v0.6/elk-glibc-x86_64-elk-sika-image-dev-cortexa7t2hf-neon-vfpv4-raspberrypi3-toolchain-1.0.sh
######################################################################## 100.0%
Traceback (most recent call last):
  File "/usr/bin/esdk-launch.py", line 103, in <module>
    setup_esdk(esdk_installer, args.workdir)
  File "/usr/bin/esdk-launch.py", line 47, in setup_esdk
    subprocess.check_call(cmd, stdout=sys.stdout, stderr=sys.stderr)
  File "/usr/lib/python3.5/subprocess.py", line 576, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.5/subprocess.py", line 557, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
@moto-timo
Copy link
Member

moto-timo commented Oct 22, 2021

@garnetgrimm is your host aarch64? Exec format error typically occurs when running a binary from a different architecture, such as trying to run an x86_64 container on a raspberry pi.

@valentinlageard
Copy link

Hi !
I have the same issue, with the new version of the same script. The host is a x86_64. The shebang is in the script. Could it be that the script has no execution file system permission ?

@valentinlageard
Copy link

When inspecting the esdk-installer.sh, I found that it is empty suggesting that the download failed silently. Also, weirdly, when I try to execute the curl command (curl -# -o "/workdir/test.sh" github.com/elk-audio/elkpi-sdk/releases/download/0.11.0/elk-glibc-x86_64-elkpi-audio-os-image-cortexa72-raspberrypi4-64-toolchain-0.11.0.sh) manually inside the container, it gives a "permission denied"...

P.S.: whoami gives usersetup.

@valentinlageard
Copy link

Ok I think I've found the "error".

First of all, I've successfully ran the container using a predownloaded image, putting it in the volume and passing the absolute path.

Also, I've discovered that the github link uses a redirection. Curl thinks that everything went fine and downloads 0 bytes... The solution would be to add -L when curl is called in the function download_esdk. It would automatically resolve any redirections.

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