Comments (7)
Stupid things like
root@c0bf955fee2a:/tmp# ln -s /lib/ld-linux-aarch64.so.1 /lib64/ld-linux-x86-64.so.2
root@c0bf955fee2a:/tmp# oxipng -v
qemu-x86_64: /lib64/ld-linux-x86-64.so.2: Invalid ELF image for this architecture
give nothing
from image_optim_pack.
I think building everything using make docker-build
should work, did you try it?
from image_optim_pack.
@toy No I didn't try. I do not know what exactly you mean.
from image_optim_pack.
Looks like you mean makefile from your project. Now I see it.
Looks like I need to have docker in a target container to and to run your Makefile.
I will try
from image_optim_pack.
Btw, I even tried install oxipng
via brew and to copy it to Debian arm64
container.
Of course it didn't work :D But I was very curious about it
from image_optim_pack.
Ok. jpeg-recompress
works if fully compile it under arm64
oxipng
is next to check
#
# docker build -t jpeg-recompress -f Dockerfile --build-arg BUILDPLATFORM="linux/arm64" .
# docker -ti run jpeg-recompress bash
FROM --platform=$BUILDPLATFORM debian:bullseye
ARG BUILDPLATFORM
ENV LD_LIBRARY_PATH=/usr/local/lib
WORKDIR /tmp
RUN apt-get update && apt-get install -y build-essential cmake nasm bash findutils
RUN apt-get install -y wget
COPY extract ./
ENV CPATH=/usr/local/include
# libmozjpeg
RUN wget https://github.com/mozilla/mozjpeg/archive/v4.1.1.tar.gz
RUN mv v4.1.1.tar.gz libmozjpeg-4.1.1.tar.gz
RUN mkdir -p build/libmozjpeg
RUN tar -C build/libmozjpeg --strip-components=1 -xzf libmozjpeg-4.1.1.tar.gz
RUN cd build/libmozjpeg && cmake -DPNG_SUPPORTED=0 . && make install
# jpegarchive
RUN wget https://github.com/danielgtaylor/jpeg-archive/archive/v2.2.0.tar.gz
RUN mv v2.2.0.tar.gz jpegarchive-2.2.0.tar.gz
RUN mkdir -p build/jpegarchive
RUN tar -C build/jpegarchive --strip-components=1 -xzf jpegarchive-2.2.0.tar.gz
RUN cd build/jpegarchive && CFLAGS=-fcommon make install
# cat /etc/os-release
# PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
# NAME="Debian GNU/Linux"
# VERSION_ID="11"
# VERSION="11 (bullseye)"
# VERSION_CODENAME=bullseye
# ID=debian
# HOME_URL="https://www.debian.org/"
# SUPPORT_URL="https://www.debian.org/support"
# BUG_REPORT_URL="https://bugs.debian.org/"
# uname -m
# aarch64
from image_optim_pack.
Ok. After I recompiled everything manually with BUILDPLATFORM="linux/arm64" .
and moved compiled files to a tagert container with linux/arm64
- I found that it started to work.
Now I'm going to cleanup my project's Dockerfile and have flash royal for Debian amd/arm
my Dockerfile
for experiments.
#
# docker build -t image_processors -f Dockerfile --build-arg BUILDPLATFORM="linux/arm64" .
# docker -ti run image_processors bash
FROM --platform=$BUILDPLATFORM debian:bullseye
ARG BUILDPLATFORM
ENV LD_LIBRARY_PATH=/usr/local/lib
WORKDIR /tmp
RUN apt-get update && apt-get install -y build-essential cmake nasm bash findutils
RUN apt-get install -y wget
COPY extract ./
ENV CPATH=/usr/local/include
# libmozjpeg
RUN wget https://github.com/mozilla/mozjpeg/archive/v4.1.1.tar.gz
RUN mv v4.1.1.tar.gz libmozjpeg-4.1.1.tar.gz
RUN mkdir -p build/libmozjpeg
RUN tar -C build/libmozjpeg --strip-components=1 -xzf libmozjpeg-4.1.1.tar.gz
RUN cd build/libmozjpeg && cmake -DPNG_SUPPORTED=0 . && make install
# jpegarchive
RUN wget https://github.com/danielgtaylor/jpeg-archive/archive/v2.2.0.tar.gz
RUN mv v2.2.0.tar.gz jpegarchive-2.2.0.tar.gz
RUN mkdir -p build/jpegarchive
RUN tar -C build/jpegarchive --strip-components=1 -xzf jpegarchive-2.2.0.tar.gz
RUN cd build/jpegarchive && CFLAGS=-fcommon make install
# oxipng
FROM rust:1 as oxipng
RUN apt-get update && apt-get install -y build-essential
RUN wget https://github.com/shssoichiro/oxipng/archive/refs/tags/v8.0.0.tar.gz
RUN mv v8.0.0.tar.gz oxipng-v8.0.0.tar.gz
RUN mkdir -p build/oxipng
RUN tar -C build/oxipng --strip-components=1 -xzf oxipng-v8.0.0.tar.gz
RUN cd build/oxipng && cargo build --release && install -c target/release/oxipng /usr/local/bin
# cargo --version
# cargo 1.67.0 (8ecd4f20a 2023-01-10)
from image_optim_pack.
Related Issues (20)
- Add archive checksum verification
- Error: uninitialized constant EXIFR::JPEG HOT 1
- Missing binaries error in production HOT 20
- Windows support HOT 4
- image_optim_pack-0.5.0.20171208: uninitialized constant ImageOptim::BinResolver::Bin::Date HOT 3
- Doesn't build on OS X HOT 9
- Remove (nearly-)unused platforms
- Request for help with imagemagick with heic support 😬 HOT 1
- Optimized version guetzli with CUDA & OpenCL
- pngout and svgo not found (with default options) HOT 2
- Unable to use the platform-specific (x86_64-linux) version of image_optim_pack HOT 11
- pngcrush worker: `pngcrush` not found; please provide proper binary or disable this worker HOT 2
- jpegtran from mozjpeg made slightly small files HOT 3
- pngout licence changed? Maybe can be packaged now? HOT 2
- Docker. Debian. Some additional libs are required HOT 3
- switch to rust version of pngquant
- webp binaries HOT 2
- Add Google Guetzli optimizer HOT 1
- Create task/script to check shared libraries of build binaries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image_optim_pack.