Skip to content

LTO: wild: error: Undefined symbol WebPFree, referenced by #1897

@marxin

Description

@marxin

Noticed while building the libwebp Gentoo package, could be reproduced locally with:

wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.6.0.tar.gz
tar xvzf libwebp-1.6.0.tar.gz
cd libwebp*
CFLAGS="-flto=auto -fuse-ld=wild" ./configure
make VERBOSE=1 V=1
...
make[1]: Entering directory '/tmp/libwebp-1.6.0/examples'
/bin/sh ../libtool  --tag=CC   --mode=link gcc -fvisibility=hidden -Wall -Wdeclaration-after-statement -Wextra -Wfloat-conversion -Wformat -Wformat-nonliteral -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wold-style-definition -Wshadow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused-but-set-variable -Wunused -Wvla -flto=auto -fuse-ld=wild    -o dwebp dwebp-dwebp.o libexample_util.la ../imageio/libimagedec.la ../imageio/libimageenc.la ../imageio/libimageio_util.la ../src/libwebp.la -L/usr/lib -lpng16 -ljpeg
libtool: link: gcc -fvisibility=hidden -Wall -Wdeclaration-after-statement -Wextra -Wfloat-conversion -Wformat -Wformat-nonliteral -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wold-style-definition -Wshadow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused-but-set-variable -Wunused -Wvla -flto=auto -fuse-ld=wild -o .libs/dwebp dwebp-dwebp.o  ./.libs/libexample_util.a ../imageio/.libs/libimagedec.a /tmp/libwebp-1.6.0/src/demux/.libs/libwebpdemux.so /tmp/libwebp-1.6.0/src/.libs/libwebp.so /tmp/libwebp-1.6.0/sharpyuv/.libs/libsharpyuv.so -lm ../imageio/.libs/libimageenc.a ../imageio/.libs/libimageio_util.a ../src/.libs/libwebp.so -L/usr/lib -lpng16 -ljpeg -Wl,-rpath -Wl,/usr/local/lib
wild: error: Undefined symbol WebPFree, referenced by
    /tmp/ccNZR24f.ltrans0.ltrans.o
collect2: error: ld returned 255 exit status

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions