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

the 0.33.8 release the comics-downloader binary may be in the wrong format (arm64). #144

Closed
bashfulrobot opened this issue Feb 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bashfulrobot
Copy link

Describe the bug
A clear and concise description of what the bug is.

Seems like in the 0.33.8 release the comics-downloader binary may be in the wrong format. It seems to be arm vs amd.

To Reproduce
Steps to reproduce the behavior:

❯ wget https://github.com/Girbons/comics-downloader/releases/download/v0.33.
8/comics-downloader
❯ ls
0644 .rw-r--r-- 11M dustin  5 Jan 07:17  comics-downloader
0644 .rw-r--r-- 410 dustin 11 Feb 11:04  Dockerfile
❯ file comics-downloader
comics-downloader: ELF executable, 64-bit LSB arm64, static, not stripped

Expected behavior
A clear and concise description of what you expected to happen.

I would expect the file command the reflect x64.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux (NixOS)
  • Version 23.11
  • Type Gui - Gnome
@bashfulrobot bashfulrobot changed the title the 0.33.8 release the comics-downloader binary may be in the wrong format. the 0.33.8 release the comics-downloader binary may be in the wrong format (arm64). Feb 11, 2024
@bashfulrobot
Copy link
Author

As a further test to rule out my nixos system, I quickly put together a docker container.

# Use the latest version of Ubuntu
FROM ubuntu:latest

# Update the system and install necessary packages
RUN apt-get update && apt-get install -y \
    wget

# Download the latest version of comics-downloader
RUN wget https://github.com/Girbons/comics-downloader/releases/download/v0.33.8/comics-downloader

# Make the binary executable
RUN chmod +x comics-downloader

# Create the /app directory
RUN mkdir /app
RUN mkdir /app/mount

# Move the binary to the /app directory
RUN mv comics-downloader /app

# Set the working directory
WORKDIR /app

Then I run it with:

docker run -it -v "$(pwd):/app/mount" {{image}} /bin/bash

And get:

root@ec7044cfdaca:/app# ./comics-downloader --help
bash: ./comics-downloader: cannot execute binary file: Exec format error

@bashfulrobot
Copy link
Author

And this dockerfile will work.

# First stage: Build the application
FROM golang:1.22 as builder

WORKDIR /src

# Install unzip and wget
RUN apt-get update && apt-get install -y \
    wget \
    unzip

# Download the source code
RUN wget https://github.com/Girbons/comics-downloader/archive/refs/tags/v0.33.8.zip

# Unzip the source code
RUN unzip v0.33.8.zip && rm v0.33.8.zip

# Move to the source code directory
WORKDIR /src/comics-downloader-0.33.8

# Build the application
RUN GOOS=linux go build -o /app/comics-downloader ./cmd/downloader

# Second stage: Create the final image
FROM ubuntu:latest

RUN mkdir /app && mkdir /app/mount
WORKDIR /app

# Copy the binary from the builder stage
COPY --from=builder /app/comics-downloader /app

# Make the binary executable
RUN chmod +x /app/comics-downloader

@Girbons Girbons added the bug Something isn't working label Feb 18, 2024
@bashfulrobot
Copy link
Author

Seems to be fixed in the alpha release.

@Girbons Girbons closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants