Bug 2331361 - undefined reference to `__parse_hwcap_and_convert_at_platform' from libgcc
Summary: undefined reference to `__parse_hwcap_and_convert_at_platform' from libgcc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libtool
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Frédéric Bérat
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2024-12-10 13:50 UTC by Dan Horák
Modified: 2025-01-10 16:37 UTC (History)
19 users (show)

Fixed In Version: libtool-2.5.4-2.fc42
Clone Of:
Environment:
Last Closed: 2025-01-10 16:37:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-1382 0 None None None 2024-12-13 14:32:53 UTC

Description Dan Horák 2024-12-10 13:50:19 UTC
A build of the codeblocks IDE in Rawhide fails with

...
make[4]: Entering directory '/builddir/build/BUILD/codeblocks-20.03-build/codeblocks/src/plugins/contrib/HexEditor'
/bin/sh ../../../../libtool  --tag=CXX   --mode=link g++  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection  -Winvalid-pch -fPIC -fexceptions -module -shared -version-info 0:1:0 -no-undefined -avoid-version -Wl,--no-undefined -Wl,-z,relro -Wl,--as-needed  -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes  -o libHexEditor.la -rpath /usr/lib64/codeblocks/plugins CharacterView.lo DigitView.lo ExpressionExecutor.lo ExpressionParser.lo ExpressionPreprocessed.lo ExpressionTestCases.lo ExpressionTester.lo FileContentBase.lo FileContentBuffered.lo FileContentDisk.lo HexEditLineBuffer.lo HexEditor.lo HexEditPanel.lo HexEditViewBase.lo SearchDialog.lo SelectStoredExpressionDlg.lo TestCasesDlg.lo ../../../sdk/libcodeblocks.la -pthread   -lwx_gtk3u_aui-3.2 -lwx_gtk3u_propgrid-3.2 -lwx_gtk3u_richtext-3.2 -lwx_gtk3u_xrc-3.2 -lwx_gtk3u_html-3.2 -lwx_gtk3u_qa-3.2 -lwx_gtk3u_core-3.2 -lwx_baseu_xml-3.2 -lwx_baseu_net-3.2 -lwx_baseu-3.2  -lpthread -ldl 
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/ppc64le-redhat-linux/14/../../../../lib64/crti.o /usr/lib/gcc/ppc64le-redhat-linux/14/crtbeginS.o  .libs/CharacterView.o .libs/DigitView.o .libs/ExpressionExecutor.o .libs/ExpressionParser.o .libs/ExpressionPreprocessed.o .libs/ExpressionTestCases.o .libs/ExpressionTester.o .libs/FileContentBase.o .libs/FileContentBuffered.o .libs/FileContentDisk.o .libs/HexEditLineBuffer.o .libs/HexEditor.o .libs/HexEditPanel.o .libs/HexEditViewBase.o .libs/SearchDialog.o .libs/SelectStoredExpressionDlg.o .libs/TestCasesDlg.o   ../../../sdk/.libs/libcodeblocks.so -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgobject-2.0 -lglib-2.0 -ltinyxml -lwx_gtk3u_aui-3.2 -lwx_gtk3u_propgrid-3.2 -lwx_gtk3u_richtext-3.2 -lwx_gtk3u_xrc-3.2 -lwx_gtk3u_html-3.2 -lwx_gtk3u_qa-3.2 -lwx_gtk3u_core-3.2 -lwx_baseu_xml-3.2 -lwx_baseu_net-3.2 -lwx_baseu-3.2 -lpthread -ldl -L/usr/lib/gcc/ppc64le-redhat-linux/14 -L/usr/lib/gcc/ppc64le-redhat-linux/14/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/ppc64le-redhat-linux/14/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/ppc64le-redhat-linux/14/crtendS.o /usr/lib/gcc/ppc64le-redhat-linux/14/../../../../lib64/crtn.o -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -flto=auto -g -grecord-gcc-switches -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes   -pthread -Wl,-soname -Wl,libHexEditor.so -o .libs/libHexEditor.so
make[4]: Leaving directory '/builddir/build/BUILD/codeblocks-20.03-build/codeblocks/src/plugins/contrib/HexEditor'
/usr/bin/ld: /usr/lib/gcc/ppc64le-redhat-linux/14/libgcc.a(float128-ifunc.o):(.data+0x0): undefined reference to `__parse_hwcap_and_convert_at_platform'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:610: libHexEditor.la] Error 1


The build used
glibc-2.40.9000-21.fc42.ppc64le
gcc-14.2.1-6.fc42.ppc64le


link to build logs in copr = https://download.copr.fedorainfracloud.org/results/sharkcz/danny/fedora-rawhide-ppc64le/08372393-codeblocks/

Reproducible: Always

Comment 1 Dan Horák 2024-12-10 14:07:31 UTC
Per https://copr.fedorainfracloud.org/coprs/sharkcz/danny/build/8372393/ there is no such problem in earlier releases.

Comment 2 Carlos O'Donell 2024-12-10 17:01:44 UTC
It exists in ld.so:

$ readelf -a -W usr/lib64/ld64.so.2 | grep __parse_hwcap
    19: 000000000002e240  2516 FUNC    GLOBAL DEFAULT [<localentry>: 8]     9 __parse_hwcap_and_convert_at_platform@@GLIBC_2.23
    30: 000000000002e240  2516 FUNC    GLOBAL DEFAULT [<localentry>: 8]     9 __parse_hwcap_3_4_and_convert_at_platform@@GLIBC_2.39
   663: 000000000002e240  2516 FUNC    GLOBAL DEFAULT [<localentry>: 8]     9 __parse_hwcap_and_convert_at_platform@@GLIBC_2.23
   680: 000000000002e240  2516 FUNC    GLOBAL DEFAULT [<localentry>: 8]     9 __parse_hwcap_3_4_and_convert_at_platform@@GLIBC_2.39

And libc.so includes it AS_NDEEDED:

$ cat ./usr/lib64/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-powerpcle)
GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a  AS_NEEDED ( /lib64/ld64.so.2 ) )

So I would expect the link to resolve the reference to the dynamic loader.

I don't think there is any bug here, but the problem is likely in the link line?

Comment 3 Florian Weimer 2024-12-10 17:24:24 UTC
This is likely because libtool tries to reimplement the linker in a shell script. It's required to use the order -lc -lgcc_s -lc (listing -lc twice), otherwise links with -Wl,--as-needed fail.

Comment 4 Dan Horák 2024-12-10 20:29:09 UTC
you are right, sounds like bug 2047389 is back

Comment 5 Fedora Update System 2025-01-10 15:05:56 UTC
FEDORA-2025-1072edb794 (libtool-2.5.4-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-1072edb794

Comment 6 Fedora Update System 2025-01-10 16:37:57 UTC
FEDORA-2025-1072edb794 (libtool-2.5.4-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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