perf build broken after updating to bintuils 2.34.90.20200706-1ubuntu1

Bug #1887397 reported by Andrea Righi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Debian)
Fix Released
Unknown
linux (Ubuntu)
Undecided
Unassigned
Groovy
Undecided
Unassigned

Bug Description

After updating to binutils 2.34.90.20200706-1ubuntu1 Linux' perf build is failing with the following error:

/usr/bin/ld:/tmp/autopkgtest.440kEd/build.N7g/src/debian/build/tools-perarch/tools/lib/traceevent/plugins/libtraceevent-dynamic-list:2: ignoring invalid character `@' in script
/usr/bin/ld:/tmp/autopkgtest.440kEd/build.N7g/src/debian/build/tools-perarch/tools/lib/traceevent/plugins/libtraceevent-dynamic-list:2: ignoring invalid character `@' in script
/usr/bin/ld:/tmp/autopkgtest.440kEd/build.N7g/src/debian/build/tools-perarch/tools/lib/traceevent/plugins/libtraceevent-dynamic-list:2: syntax error in dynamic list
collect2: error: ld returned 1 exit status

The file mentioned in the error (libtraceevent-dynamic-list) contains some '@' that ld doesn't seem to like:

$ cat lib/traceevent/plugins/libtraceevent-dynamic-list
{
        __stack_chk_fail@@GLIBC_2.4;
        free@@GLIBC_2.2.5;
        memset@@GLIBC_2.2.5;
        realloc@@GLIBC_2.2.5;
        sprintf@@GLIBC_2.2.5;
        strcmp@@GLIBC_2.2.5;
        strdup@@GLIBC_2.2.5;
        strncmp@@GLIBC_2.2.5;
        tep_find_any_field;
        tep_find_field;
        tep_find_function;
        tep_find_function_address;
        tep_get_field_raw;
        tep_get_field_val;
        tep_is_file_bigendian;
        tep_is_local_bigendian;
        tep_plugin_add_options;
        tep_plugin_remove_options;
        tep_print_func_field;
        tep_print_num_field;
        tep_read_number_field;
        tep_register_comm;
        tep_register_event_handler;
        tep_register_print_function;
        tep_unregister_event_handler;
        tep_unregister_print_function;
        trace_seq_printf;
        trace_seq_putc;
        trace_seq_puts;
        trace_seq_terminate;
        warning;
};

The same file generated in a Focal environment (w/ binutils 2.34-6ubuntu1) looks as following:

$ cat lib/traceevent/plugins/libtraceevent-dynamic-list
{
        __stack_chk_fail;
        free;
        memset;
        realloc;
        sprintf;
        strcmp;
        strdup;
        strncmp;
        tep_find_any_field;
        tep_find_field;
        tep_find_function;
        tep_find_function_address;
        tep_get_field_raw;
        tep_get_field_val;
        tep_is_file_bigendian;
        tep_is_local_bigendian;
        tep_plugin_add_options;
        tep_plugin_remove_options;
        tep_print_func_field;
        tep_print_num_field;
        tep_read_number_field;
        tep_register_comm;
        tep_register_event_handler;
        tep_register_print_function;
        tep_unregister_event_handler;
        tep_unregister_print_function;
        trace_seq_printf;
        trace_seq_putc;
        trace_seq_puts;
        trace_seq_terminate;
        warning;
};

And here is the chunk of Makefile that is generating this file:

define do_generate_dynamic_list_file
        symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \
        xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
        if [ "$$symbol_type" = "U W" ];then \
                (echo '{'; \
                $(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
                echo '};'; \
                ) > $2; \
        else \
                (echo Either missing one of [$1] or bad version of $(NM)) 1>&2;\
                fi

My guess is that something changed in the output of `nm` to show the @ charaters that ld does not like.

This problem is currently breaking all kernel builds in Groovy.

Revision history for this message
Andrea Righi (arighi) wrote :
Download full text (3.2 KiB)

Adding the specific command that is reporting error:

gcc -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wstrict-aliasing=3 -Wshadow -DHAVE_ARCH_X86_64_SUPPORT -Iarch/x86/include/generated -DHAVE_SYSCALL_TABLE_SUPPORT -DHAVE_PERF_REGS_SUPPORT -DHAVE_ARCH_REGS_QUERY_REGISTER_OFFSET -Werror -O6 -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 -fstack-protector-all -D_FORTIFY_SOURCE=2 -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/perf/lib/include -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/perf/util/include -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/perf/arch/x86/include -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/include/ -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/arch/x86/include/uapi -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/include/uapi -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/arch/x86/include/ -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/arch/x86/ -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/perf/util -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/perf -I/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/lib/ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP -DHAVE_PTHREAD_BARRIER -DHAVE_EVENTFD -DHAVE_GET_CURRENT_DIR_NAME -DHAVE_GETTID -DHAVE_DWARF_GETLOCATIONS_SUPPORT -DHAVE_GLIBC_SUPPORT -DHAVE_AIO_SUPPORT -DHAVE_SCHED_GETCPU_SUPPORT -DHAVE_SETNS_SUPPORT -DHAVE_LIBELF_SUPPORT -DHAVE_LIBELF_MMAP_SUPPORT -DHAVE_ELF_GETPHDRNUM_SUPPORT -DHAVE_GELF_GETNOTE_SUPPORT -DHAVE_ELF_GETSHDRSTRNDX_SUPPORT -DHAVE_DWARF_SUPPORT -DHAVE_LIBBPF_SUPPORT -DHAVE_BPF_PROLOGUE -DHAVE_JITDUMP -DHAVE_DWARF_UNWIND_SUPPORT -DNO_LIBUNWIND_DEBUG_FRAME -DHAVE_LIBUNWIND_SUPPORT -DHAVE_LIBCRYPTO_SUPPORT -DHAVE_SLANG_SUPPORT -DNO_LIBPERL -DHAVE_TIMERFD_SUPPORT -DNO_LIBPYTHON -DHAVE_CPLUS_DEMANGLE_SUPPORT -DHAVE_ZLIB_SUPPORT -DHAVE_LZMA_SUPPORT -DHAVE_LIBCAP_SUPPORT -DHAVE_BACKTRACE_SUPPORT -DHAVE_LIBNUMA_SUPPORT -DHAVE_KVM_STAT_SUPPORT -DHAVE_AUXTRACE_SUPPORT -DHAVE_JVMTI_CMLR -Wl,-z,noexecstack -lunwind-x86_64 -lunwind -llzma -Xlinker --dynamic-list=/home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/lib/traceevent/plugins/libtraceevent-dynamic-list \
perf-in.o pmu-events/pmu-events-in.o -Wl,--whole-archive /home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/lib/api/libapi.a /home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/lib/traceevent/libtraceevent.a /home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/lib/subcmd/libsubcmd.a /home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/perf/lib/libperf.a /home/arighi/canonical/kernel/ubuntu/unstable/linux/tools/lib/bpf/libbpf.a -Wl,--no-whole-archive -Wl,--start-group -lpthread -lrt -lm -ldl -lelf -ldw -lunwind-x86_64 -lunwind -llzma -lcrypto -lslang -liberty -lz -llz...

Read more...

Revision history for this message
Andrea Righi (arighi) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

see https://sourceware.org/bugzilla/show_bug.cgi?id=25708
this seems to be an intended change.

affects: binutils (Ubuntu Groovy) → linux (Ubuntu Groovy)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1887397

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
zanyrain (zanyrain) wrote :
Download full text (5.4 KiB)

The same thing happens to me when I'm trying to rebuild Linux 5.7 kernel on debian testing.

gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/perf -I/home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-tools/tools/perf -isystem /home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-tools/include -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wstrict-aliasing=3 -Wshadow -DHAVE_ARCH_X86_64_SUPPORT -I/home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-tools/tools/perf/arch/x86/include/generated -DHAVE_SYSCALL_TABLE_SUPPORT -DHAVE_PERF_REGS_SUPPORT -DHAVE_ARCH_REGS_QUERY_REGISTER_OFFSET -O6 -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/lib/perf/include -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/perf/util/include -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/perf/arch/x86/include -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/include/ -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/arch/x86/include/uapi -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/include/uapi -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/arch/x86/include/ -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/arch/x86/ -I/home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-tools/tools/perf//util -I/home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-tools/tools/perf/ -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/perf/util -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/perf -I/home/zanyrain/r7000-dev/linux-5.7.6/tools/lib/ -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP -DHAVE_PTHREAD_BARRIER -DHAVE_EVENTFD -DHAVE_GET_CURRENT_DIR_NAME -DHAVE_GETTID -DHAVE_FILE_HANDLE -DHAVE_DWARF_GETLOCATIONS_SUPPORT -DHAVE_GLIBC_SUPPORT -DHAVE_AIO_SUPPORT -DHAVE_SCHED_GETCPU_SUPPORT -DHAVE_SETNS_SUPPORT -DHAVE_CSTRACE_SUPPORT -DHAVE_LIBELF_SUPPORT -DHAVE_LIBELF_MMAP_SUPPORT -DHAVE_ELF_GETPHDRNUM_SUPPORT -DHAVE_GELF_GETNOTE_SUPPORT -DHAVE_ELF_GETSHDRSTRNDX_SUPPORT -DHAVE_DWARF_SUPPORT -DHAVE_LIBBPF_SUPPORT -DHAVE_BPF_PROLOGUE -DHAVE_JITDUMP -DHAVE_DWARF_UNWIND_SUPPORT -DNO_LIBUNWIND_DEBUG_FRAME -DHAVE_LIBUNWIND_SUPPORT -DHAVE_SLANG_SUPPORT -DHAVE_LIBPERL_SUPPORT -DHAVE_TIMERFD_SUPPORT -DHAVE_LIBPYTHON_SUPPORT -DHAVE_CPLUS_DEMANGLE_SUPPORT -DHAVE_ZLIB_SUPPORT -DHAVE_LZMA_SUPPORT -DHAVE_LIBCAP_SUPPORT -DHAVE_BACKTRACE_SUPPORT -DHAVE_LIBNUMA_SUPPORT -DHAVE_KVM_STAT_SUPPORT -DHAVE_PERF_READ_VDSO32 -DHAVE_PERF_READ_VDSOX32 -DHAVE_LIBBABELTRACE_SUPPORT -DHAVE_AUXTRACE_SUPPORT -I/home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-tools/tools/perf/ -Wl,-z,relro -Xlinker --dynamic-list=/home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-tools/tools/perf/plugins/libtraceevent-dynamic-list \
 /home/zanyrain/r7000-dev/linux-5.7.6/debian/build/build-t...

Read more...

Changed in linux (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.8.0-16.17

---------------
linux (5.8.0-16.17) groovy; urgency=medium

  * groovy/linux: 5.8.0-16.17 -proposed tracker (LP: #1891233)

  * Miscellaneous Ubuntu changes
    - hio -- Update to use bio_{start,end}_io_acct with 5.8+
    - Enable hio driver
    - [Packaging] Temporarily disable building doc package contents

linux (5.8.0-15.16) groovy; urgency=medium

  * groovy/linux: 5.8.0-15.16 -proposed tracker (LP: #1891177)

  * Miscellaneous Ubuntu changes
    - SAUCE: Documentation: import error c_funcptr_sig_re, c_sig_re (sphinx-
      doc/sphinx@0f49e30c)

linux (5.8.0-14.15) groovy; urgency=medium

  * groovy/linux: 5.8.0-14.15 -proposed tracker (LP: #1891085)

  * Packaging resync (LP: #1786013)
    - [Packaging] update helper scripts

  * msg_zerocopy.sh in net from ubuntu_kernel_selftests failed (LP: #1812620)
    - selftests/net: relax cpu affinity requirement in msg_zerocopy test

  * Fix missing HDMI/DP Audio on an HP Desktop (LP: #1890441)
    - ALSA: hda/hdmi: Add quirk to force connectivity

  * Add initial audio support for Lenovo ThinkStation P620 (LP: #1890317)
    - ALSA: usb-audio: Add support for Lenovo ThinkStation P620

  * Fix IOMMU error on AMD Radeon Pro W5700 (LP: #1890306)
    - PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken

  * Enlarge hisi_sec2 capability (LP: #1890222)
    - crypto: hisilicon - update SEC driver module parameter

  * Miscellaneous Ubuntu changes
    - [Config] Re-enable signing for ppc64el

 -- Seth Forshee <email address hidden> Tue, 11 Aug 2020 15:32:58 -0500

Changed in linux (Ubuntu Groovy):
status: Incomplete → Fix Released
Changed in linux (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.