Bug 215612 - trace-cmd v2.9.7 undefined reference to symbols on i686 when compiling, while compiling works fine on other architectures
Summary: trace-cmd v2.9.7 undefined reference to symbols on i686 when compiling, while...
Status: NEEDINFO
Alias: None
Product: Tools
Classification: Unclassified
Component: Trace-cmd/Kernelshark (show other bugs)
Hardware: i386 Linux
: P1 normal
Assignee: Default virtual assignee for Trace-cmd and kernelshark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-16 14:59 UTC by Ziqian SUN (Zamir)
Modified: 2023-06-02 08:14 UTC (History)
1 user (show)

See Also:
Kernel Version: N/A
Subsystem:
Regression: No
Bisected commit-id:


Attachments
full building log on i686 (37.80 KB, text/plain)
2022-02-16 14:59 UTC, Ziqian SUN (Zamir)
Details

Description Ziqian SUN (Zamir) 2022-02-16 14:59:16 UTC
Created attachment 300473 [details]
full building log on i686

When I am compiling trace-cmd v2.7 into Fedora, I met undefined reference error on i686 while other architectures just compiles fine.

The raw compiling command is like

MANPAGE_DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets-1.79.2/manpages/docbook.xsl
CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE'
LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/trace-cmd-v2.9.7/.package_note-trace-cmd-0-1.fc37.i386.ld'
BUILD_TYPE=Release
make V=9999999999 MANPAGE_DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets-1.79.2/manpages/docbook.xsl prefix=/usr libdir=/usr/lib PYTHON_VERS=python3 all_cmd doc libtracecmd.so

And error message starts around

/usr/include/bits/stdio2.h:71:10: note: '__snprintf_chk' output between 102 and 4206 bytes into a destination of size 4096
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
  BUILD                  trace-cmd
/usr/bin/ld: /tmp/ccuDgCKj.ltrans0.ltrans.o: in function `tracecmd_stat_cpu_instance':
/builddir/build/BUILD/trace-cmd-v2.9.7/tracecmd/trace-record.c:488: undefined reference to `trace_seq_printf'
/usr/bin/ld: /tmp/ccuDgCKj.ltrans0.ltrans.o: in function `print_stat.part.0.lto_priv.0':
/builddir/build/BUILD/trace-cmd-v2.9.7/tracecmd/trace-record.c:4104: undefined reference to `trace_seq_do_printf'
/usr/bin/ld: /tmp/ccuDgCKj.ltrans0.ltrans.o: in function `record_stats.lto_priv.0':
/builddir/build/BUILD/trace-cmd-v2.9.7/tracecmd/trace-record.c:5102: undefined reference to `trace_seq_init'
/usr/bin/ld: /builddir/build/BUILD/trace-cmd-v2.9.7/tracecmd/trace-record.c:5103: undefined reference to `trace_seq_init'
/usr/bin/ld: /builddir/build/BUILD/trace-cmd-v2.9.7/tracecmd/trace-record.c:5104: undefined reference to `trace_seq_printf'
/usr/bin/ld: /builddir/build/BUILD/trace-cmd-v2.9.7/tracecmd/trace-record.c:5076: undefined reference to `trace_seq_printf'

Attached is the full compiling log
Comment 1 Steven Rostedt 2023-06-02 08:14:05 UTC
Is this still an issue?

Note You need to log in before you can comment on or make changes to this bug.