Skip to content

Commit

Permalink
fix link failure with libtiff (#3050)
Browse files Browse the repository at this point in the history
* fix link failure with libtiff

The fuzz targets were failing to link with:

```
Step #4: /work/lib/libtiff.a(tif_lzma.o): In function `TIFFInitLZMA':
Step #4: /src/libtiff/libtiff/tif_lzma.c:465: undefined reference to
`lzma_lzma_preset'
```

It looks like it's become necessary to explicitly link -llzma, see:

https://gitlab.com/libtiff/libtiff/commit/4159bda6db2f8cf8e848d8095b5d37d49ba67a10

oss-fuzz issue:

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18928#c4

Thanks to @lovell.

* pin libtiff to 4.1.0

It seems there's an issue with git master libtiff -- it fails to link on
systems without lzma installed.

For now, pin to 4.1.0, the current stable version.

* explicitly disable lzma

lzma detection in libtiff seems to be broken as of 20 nov. Disable
explicitly.
  • Loading branch information
jcupitt authored and jonathanmetzman committed Nov 20, 2019
1 parent 78e191e commit 95548b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/libvips/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ RUN git clone --depth 1 https:/libjpeg-turbo/libjpeg-turbo
RUN git clone --depth 1 https:/glennrp/libpng.git
RUN git clone --depth 1 https://git.code.sf.net/p/giflib/code libgif
RUN git clone --depth 1 https://chromium.googlesource.com/webm/libwebp
RUN git clone --depth 1 https://gitlab.com/libtiff/libtiff
RUN git clone --depth 1 https://gitlab.com/libtiff/libtiff
WORKDIR libvips
COPY build.sh $SRC/
4 changes: 3 additions & 1 deletion projects/libvips/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ make -j$(nproc)
make install
popd

# libtiff
# libtiff ... a bug in libtiff master as of 20 Nov 2019 means we have to
# explicitly disable lzma
pushd $SRC/libtiff
autoreconf -fi
./configure \
--disable-lzma \
--disable-shared \
--disable-dependency-tracking \
--prefix=$WORK
Expand Down

0 comments on commit 95548b2

Please sign in to comment.