Issue 1736 in webm: Build fails with LTO enabled (GCC 11)

28 views
Skip to first unread message

sergi… via monorail

unread,
Aug 12, 2021, 10:59:00 AM8/12/21
to webm-d...@webmproject.org
Status: Untriaged
Owner: ----
Labels: Type-Bug Pri-2
Components: libvpx

New issue 1736 by sergi...@canonical.com: Build fails with LTO enabled (GCC 11)
https://bugs.chromium.org/p/webm/issues/detail?id=1736

Ubuntu has performed a full rebuild of the archive using GCC 11, and libvpx is FTBFS'ing:

https://launchpadlibrarian.net/552670245/buildlog_ubuntu-impish-amd64.libvpx_1.9.0-1_BUILDING.txt.gz

...
g++ -Wl,-Bsymbolic-functions -flto=auto -Wl,-z,relro -Wl,-z,now -m64 -o test_libvpx ivfenc.c.o md5_utils.c.o test/active_map_refresh_test.cc.o test/active_map_test.cc.o test/alt_ref_aq_segment_test.cc.o test/altref_test.cc.o test/aq_segment_test.cc.o test/bench.cc.o test/borders_test.cc.o test/byte_alignment_test.cc.o test/config_test.cc.o test/cpu_speed_test.cc.o test/cq_test.cc.o test/decode_api_test.cc.o test/decode_corrupted.cc.o test/decode_svc_test.cc.o test/decode_test_driver.cc.o test/encode_api_test.cc.o test/encode_test_driver.cc.o test/error_resilience_test.cc.o test/external_frame_buffer_test.cc.o test/frame_size_tests.cc.o test/invalid_file_test.cc.o test/keyframe_test.cc.o test/level_test.cc.o test/realtime_test.cc.o test/resize_test.cc.o test/svc_datarate_test.cc.o test/svc_end_to_end_test.cc.o test/svc_test.cc.o test/test_libvpx.cc.o test/test_vector_test.cc.o test/test_vectors.cc.o test/timestamp_test.cc.o test/user_priv_test.cc.o test/vp8_datarate_test.cc.o test/vp9_datarate_test.cc.o test/vp9_end_to_end_test.cc.o test/vp9_ethread_test.cc.o test/vp9_lossless_test.cc.o test/vp9_motion_vector_test.cc.o test/vp9_skip_loopfilter_test.cc.o test/y4m_test.cc.o third_party/libwebm/mkvparser/mkvparser.cc.o third_party/libwebm/mkvparser/mkvreader.cc.o webmdec.cc.o y4menc.c.o y4minput.c.o -L. -lvpx -lgtest -lpthread -lm -lpthread
ln -sf libvpx.so.6.3.0 vpx-vp8-vp9-x86_64-linux-v1.9.0/lib/libvpx.so.6
/usr/bin/ld: /tmp/ccsyaUhJ.ltrans0.ltrans.o:(.debug_info+0x1586f): undefined reference to `gtest_all.cc.5c9bdf8f'
/usr/bin/ld: /tmp/ccsyaUhJ.ltrans0.ltrans.o:(.debug_info+0x158a5): undefined reference to `gtest_all.cc.5c9bdf8f'
/usr/bin/ld: /tmp/ccsyaUhJ.ltrans0.ltrans.o:(.debug_info+0x158b2): undefined reference to `gtest_all.cc.5c9bdf8f'
/usr/bin/ld: /tmp/ccsyaUhJ.ltrans0.ltrans.o:(.debug_info+0x158b7): undefined reference to `gtest_all.cc.5c9bdf8f'
/usr/bin/ld: /tmp/ccsyaUhJ.ltrans0.ltrans.o:(.debug_info+0x158dd): undefined reference to `gtest_all.cc.5c9bdf8f'
/usr/bin/ld: /tmp/ccsyaUhJ.ltrans0.ltrans.o:(.debug_info+0x15903): more undefined references to `gtest_all.cc.5c9bdf8f' follow
collect2: error: ld returned 1 exit status
make[3]: *** [/<<PKGBUILDDIR>>/libs.mk:623: test_libvpx] Error 1
make[2]: *** [Makefile:41: dist] Error 2

The problem goes away when LTO is disabled, which is what we did for now. Please let us know if you need more to diagnose this issue.

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

sergi… via monorail

unread,
Aug 12, 2021, 11:33:24 AM8/12/21
to webm-d...@webmproject.org

Comment #1 on issue 1736 by sergi...@canonical.com: Build fails with LTO enabled (GCC 11)
https://bugs.chromium.org/p/webm/issues/detail?id=1736#c1

Ah, I've just tested with the current git HEAD and noticed that the problem doesn't seem to manifest there. Please disregard this report, then. Thanks, and sorry about the noise.

sergi… via monorail

unread,
Aug 12, 2021, 12:11:55 PM8/12/21
to webm-d...@webmproject.org

Comment #2 on issue 1736 by sergi...@canonical.com: Build fails with LTO enabled (GCC 11)
https://bugs.chromium.org/p/webm/issues/detail?id=1736#c2

Sigh... I think I forgot to use a compilation flags and for that reason the bug didn't manifest. I can actually reproduce it using git HEAD by compiling the project using this:

LDFLAGS='-Wl,-Bsymbolic-functions -flto=auto -Wl,-z,relro' CFLAGS='-g -O2 -ffile-prefix-map=/root/libvpx/libvpx/builddir=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security' CXXFLAGS='-g -O2 -ffile-prefix-map=/root/libvpx/libvpx/builddir=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' ../configure --prefix=/usr --enable-pic --enable-shared --disable-install-bins --disable-install-srcs --size-limit=16384x16384 --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --target=x86_64-linux-gcc && make -j8 verbose=yes dist

So it seems this bug *is* in fact valid against git HEAD.

jz… via monorail

unread,
Aug 12, 2021, 9:05:11 PM8/12/21
to webm-d...@webmproject.org

Comment #3 on issue 1736 by jz...@google.com: Build fails with LTO enabled (GCC 11)
https://bugs.chromium.org/p/webm/issues/detail?id=1736#c3

Thanks for the report. Does the issue only show with the test code? Can you try adding --disable-unit-tests to your configure command line?

sergi… via monorail

unread,
Aug 13, 2021, 11:15:30 AM8/13/21
to webm-d...@webmproject.org

Comment #4 on issue 1736 by sergi...@canonical.com: Build fails with LTO enabled (GCC 11)
https://bugs.chromium.org/p/webm/issues/detail?id=1736#c4

The issue doesn't manifest when --disable-unit-tests is used, indeed.

jz… via monorail

unread,
Aug 13, 2021, 1:54:52 PM8/13/21
to webm-d...@webmproject.org

Comment #5 on issue 1736 by jz...@google.com: Build fails with LTO enabled (GCC 11)
https://bugs.chromium.org/p/webm/issues/detail?id=1736#c5

That's good to know. If it doesn't happen with the latest upstream version of googletest [1] we should just need to update the snapshot.

[1] https://github.com/google/googletest
Reply all
Reply to author
Forward
0 new messages