Building fuzzer error libwebpmux.a', needed by 'advanced_api_fuzzer'. Stop

432 views
Skip to first unread message

Jonny Grant

unread,
Oct 19, 2023, 4:27:01 PM10/19/23
to WebP Discussion
Anyone know how to build libwebpmux.a with latest git?

The fuzzer is looking for a library not created:


$ make -C fuzzer -f makefile.unix
make: Entering directory '/home/jonny/code/webp_patch/libwebp/tests/fuzzer'
make: *** No rule to make target '../../src/mux/libwebpmux.a', needed by 'advanced_api_fuzzer'. Stop.


My build only makes 3 .a files for static linking
src/libwebp.a
sharpyuv/libsharpyuv.a
imageio/libimageenc.a


./configure shows that libwebpmux is enabled, but it doesn't get built when compiling. So then the fuzzer fails to link to it.

It seems libwebpmux is from the libwep/src/mux folder


If I clean it and build that folder

libwebp/src/mux$ make
  CC       anim_encode.lo
  CC       muxedit.lo
  CC       muxinternal.lo
  CC       muxread.lo
  CCLD     libwebpmux.la

so no static library.


WebP Configuration Summary
--------------------------

Shared libraries: yes
Static libraries: yes
Threading support: yes
libwebp: yes
libwebpdecoder: no
libwebpdemux: yes
libwebpmux: yes
libwebpextras: no

Tools:
cwebp : yes
  Input format support
  ====================
  JPEG : yes
  PNG  : yes
  TIFF : yes
  WIC  : no
dwebp : yes
  Output format support
  =====================
  PNG  : yes
  WIC  : no
GIF support : yes
anim_diff   : yes
gif2webp    : yes
img2webp    : yes
webpmux     : yes
vwebp       : yes
webpinfo    : yes
SDL support : no
vwebp_sdl   : no

Vincent Rabaud

unread,
Oct 19, 2023, 4:55:17 PM10/19/23
to webp-d...@webmproject.org
Hi,

at the root of your project, you need to build all targets: make -f
makefile.unix all
libwebpmux.a should now be in src/mux.
> --
> You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
> To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/74cbecd7-85b9-4c47-acc3-77b382e8e239n%40webmproject.org.

Jonny Grant

unread,
Oct 19, 2023, 6:56:04 PM10/19/23
to WebP Discussion, Vincent Rabaud
Thank you

Could this be added to doc/building.md ?
"Build with `make -f makefile.unix all` to get the static libraries the fuzzers need"

I remembered, I had tried that, ./configure detected no SDL, but it gives a build error.
Is there a way for the ./configure to really disable SDL1 ?

 SDL support : no

gcc -I. -Isrc/ -Wall -O3 -DNDEBUG -DWEBP_HAVE_PNG -DWEBP_HAVE_JPEG -DWEBP_HAVE_TIFF -I/usr/local/include -DWEBP_USE_THREAD -fvisibility=hidden -Wextra -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wshadow -Wformat-security -Wformat-nonliteral -DWEBP_HAVE_SDL  -c extras/vwebp_sdl.c -o extras/vwebp_sdl.o
extras/vwebp_sdl.c:33:10: fatal error: SDL/SDL.h: No such file or directory
   33 | #include <SDL/SDL.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [makefile.unix:397: extras/vwebp_sdl.o] Error 1

James Zern

unread,
Oct 19, 2023, 8:42:28 PM10/19/23
to webp-d...@webmproject.org
On Thu, Oct 19, 2023 at 3:56 PM Jonny Grant <jongr...@gmail.com> wrote:
Thank you

Could this be added to doc/building.md ?
"Build with `make -f makefile.unix all` to get the static libraries the fuzzers need"

tests/README.md has the build instructions for the fuzzers and mentions this step [1]. building.md is somewhat new, so maybe we should merge these two files.
 

I remembered, I had tried that, ./configure detected no SDL, but it gives a build error.
Is there a way for the ./configure to really disable SDL1 ?

configure and cmake can do this, but makefile.unix expects everything to be available. The fuzzer isn't configured into these systems so as a quick fix you can edit makefile.unix to remove vwebp_sdl from OTHER_EXAMPLES [2] or try `make -f makefile.unix ex src/mux/libwebpmux.a src/demux/libwebpdemux.a`.
 

 SDL support : no

gcc -I. -Isrc/ -Wall -O3 -DNDEBUG -DWEBP_HAVE_PNG -DWEBP_HAVE_JPEG -DWEBP_HAVE_TIFF -I/usr/local/include -DWEBP_USE_THREAD -fvisibility=hidden -Wextra -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wshadow -Wformat-security -Wformat-nonliteral -DWEBP_HAVE_SDL  -c extras/vwebp_sdl.c -o extras/vwebp_sdl.o
extras/vwebp_sdl.c:33:10: fatal error: SDL/SDL.h: No such file or directory
   33 | #include <SDL/SDL.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [makefile.unix:397: extras/vwebp_sdl.o] Error 1

  Follow the build instructions for libwebp, optionally adding build flags for various sanitizers (e.g., -fsanitize=address).
  fuzzer/makefile.unix can then be used to compile the fuzzer targets:

Jonny Grant

unread,
Oct 26, 2023, 5:01:32 PM10/26/23
to WebP Discussion, James Zern
On Friday, 20 October 2023 at 01:42:28 UTC+1 James Zern wrote:
On Thu, Oct 19, 2023 at 3:56 PM Jonny Grant <jongr...@gmail.com> wrote:
Thank you

Could this be added to doc/building.md ?
"Build with `make -f makefile.unix all` to get the static libraries the fuzzers need"

tests/README.md has the build instructions for the fuzzers and mentions this step [1]. building.md is somewhat new, so maybe we should merge these two files.

Ok, sounds good. Would be good if the ./configure && make    would build everything.

The fuzzer is running. The Contribution guide doesn't mention unit tests, are there any unit tests which compress and decompress I could run?

James Zern

unread,
Oct 30, 2023, 6:54:15 PM10/30/23
to WebP Discussion, jongr...@gmail.com
On Thu, Oct 26, 2023 at 2:01 PM Jonny Grant <jongr...@gmail.com> wrote:


On Friday, 20 October 2023 at 01:42:28 UTC+1 James Zern wrote:
On Thu, Oct 19, 2023 at 3:56 PM Jonny Grant <jongr...@gmail.com> wrote:
Thank you

Could this be added to doc/building.md ?
"Build with `make -f makefile.unix all` to get the static libraries the fuzzers need"

tests/README.md has the build instructions for the fuzzers and mentions this step [1]. building.md is somewhat new, so maybe we should merge these two files.

Ok, sounds good. Would be good if the ./configure && make    would build everything.

I agree, but this wasn't a high priority given the main use of the fuzzers is in different build systems like oss-fuzz, Chrome and Android.
 

The fuzzer is running. The Contribution guide doesn't mention unit tests, are there any unit tests which compress and decompress I could run?

We don't have many public tests aside from what is run on jenkins [2] and available in the libwebp-test-data repository [3].

Reply all
Reply to author
Forward
0 new messages