friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
183 stars 10 forks source link

undefined reference to symbol 'WebPIDelete' #97

Closed Razzaline closed 7 months ago

Razzaline commented 7 months ago

This linker error seems to come from libwebp not being explicitly linked (only libwebpmux and libwebpdemux are). It's only happened since a few days ago, but I'm not sure what's changed.

I'm using Manjaro on Linux kernel 6.6.1, and compiling with the system libwebp library (1.3.2). I get the same linker error whether I use GCC (13.2.1) or Clang (16.0.6).

/usr/bin/ld: ~/.cache/yay/friction-git/src/friction/src/app/../skia/out/build/libskia.a(webp_decode.SkWebpCodec.o): undefined reference to symbol 'WebPIDelete'
/usr/bin/ld: /usr/lib/libwebp.so.7: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/app/CMakeFiles/friction.dir/build.make:2962: src/app/friction] Error 1
make[1]: *** [CMakeFiles/Makefile2:171: src/app/CMakeFiles/friction.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

I've made a small patch to fix this at least for me, but I don't know if this is just an edge case. cmakelists_app.txt

rodlie commented 7 months ago

Probably a change in some .pc files or something, I mostly do build tests on Ubuntu/CentOS and might not always catch issues like this. Your modifications looks good to me, will test a bit later today.

Razzaline commented 7 months ago

Oh, I'm glad I could help! I was going to make a pull request, but that works too.