danielgtaylor / danielgtaylor/jpeg-archive
Error "/opt/mozjpeg/lib/libjpeg.a: No such file or directory" on building jpeg-archive with Mozjpeg v4
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
I've tried to build a docker image on alpine with version 4 of mozjpeg and got an error from subject. This is part of my Dockerfile:
```
...
ENV MOZJPEG_VERSION=4.0.3 \
JPEGARCHIVE_VERSION=2.2.0
...
# mozjpeg
cd /tmp; \
curl -L -O https://github.com/mozilla/mozjpeg/archive/v$MOZJPEG_VERSION.tar.gz; \
tar zxf v$MOZJPEG_VERSION.tar.gz; \
cd mozjpeg-$MOZJPEG_VERSION; \
mkdir build; \
cd build; \
cmake -G"Unix Makefiles" -DWITH_JPEG8=1 -DENABLE_STATIC=FALSE -DPNG_SUPPORTED=TRUE ../; \
make; \
make install; \
# jpeg-archive
cd /tmp; \
curl -L -O https://github.com/danielgtaylor/jpeg-archive/archive/v$JPEGARCHIVE_VERSION.tar.gz; \
tar zxf v$JPEGARCHIVE_VERSION.tar.gz; \
cd jpeg-archive-$JPEGARCHIVE_VERSION; \
export CFLAGS="-fcommon"; \
make; \
make install; \
...
```
Generally, is it possible to build jpeg-archive with verison 4 of mozjpeg at this moment?
I've also tried to build mozjpeg with
`-DCMAKE_INSTALL_LIBDIR=/opt/mozjpeg/lib/`
and
`ln -s /opt/mozjpeg/lib64/ /opt/mozjpeg/lib;` but unsuccessfully.
And jpeg-archive successfully builds with 3.3.1 version of mozjpeg.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the Alpine Dockerfile build using mozjpeg 4.0.3 and jpeg-archive 2.2.0, then inspect the mozjpeg install output and jpeg-archive's make invocation around the missing /opt/mozjpeg/lib/libjpeg.a path. Done means jpeg-archive builds and installs successfully with mozjpeg 4, while the existing mozjpeg 3.3.1 build remains understood.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake, docker
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100