Bug#1127311: newmat FTBFS with undefined symbol __parse_hwcap_and_convert_at_platform
Trupti
trupti at linux.ibm.com
Fri Feb 6 21:28:58 GMT 2026
Hi,
With GCC 15 on ppc64el, the GCC runtime library (libgcc) contains code
(float128-ifunc.o) that depends on a C library function used for CPU
feature detection. Because libtool uses -nostdlib internally, the build
system must list all required runtime libraries explicitly. In this
case, the linker processes libgcc before libc, so the required symbol
"__parse_hwcap_and_convert_at_platform" is not found and the build
fails.
As pointed out by Matthias Klose in this
report(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1126055), build
systems that bypass the compiler’s default link logic must either avoid
doing so or fully emulate it. Removing -nostdlib at the package level is
not practical here, since it is added internally by libtool.
Following that guidance, the build system was fixed by explicitly
listing the required runtime libraries (-lgcc -lgcc_s -lc) via
libnewmat_la_LIBADD. This correctly emulates GCC’s default link
behaviour and resolves the FTBFS on ppc64el with GCC 15.
Below are the main chnages, after autoreconf ran more files are
genrated/modified.
--- newmat-1.10.4.orig/Makefile.am
+++ newmat-1.10.4/Makefile.am
@@ -3,6 +3,8 @@ lib_LTLIBRARIES = libnewmat.la
libnewmat_la_LDFLAGS = -version-info 10:0:0
+libnewmat_la_LIBADD = -lgcc -lgcc_s -lc
+
libnewmat_la_SOURCES = \
newmat1.cpp newmat2.cpp newmat3.cpp newmat4.cpp newmat5.cpp
newmat6.cpp \
newmat7.cpp newmat8.cpp newmatex.cpp bandmat.cpp submat.cpp
myexcept.cpp \
I am sharing the patch here for your review. Please let me know if you
have any suggestions or would prefer a different approach.
Thanks,
Trupti
On 2026-02-07 02:21, Trupti wrote:
> Hi,
>
> This failure was first reported against gcc-15, but further analysis
> showed that it is not a GCC bug.
> The issue lies in the package’s build system, which does not correctly
> handle runtime library linking with newer GCC versions.
Bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1126055
>
> Therefore, this report tracks the issue against the package itself.
>
>
> Thanks,
> Trupti
>
>
>
> On 2026-02-07 01:33, Trupti wrote:
>> Package: newmat
>> Version: 1.10.4-9
>> Severity: serious
>> Tags: ftbfs
>> User: debian-powerpc at lists.debian.org
>> Usertags: ppc64el
>> X-Debbugs-Cc: debian-powerpc at lists.debian.org
>>
>> Dear Newmat Maintainers,
>>
>> Nemat(1.10.4-9) is FTBFS on ppc64el architecture with below error:
>>
>>
>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -Wdate-time
>> -D_FORTIFY_SOURCE=2 -g -O2
>> -ffile-prefix-map=/build/reproducible-path/newmat-1.10.4=.
>> -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++98
>> -c newfft.cpp -o newfft.o >/dev/null 2>&1
>> /bin/bash ./libtool --tag=CXX --mode=link g++ -g -O2
>> -ffile-prefix-map=/build/reproducible-path/newmat-1.10.4=.
>> -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++98
>> -version-info 10:0:0 -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -o
>> libnewmat.la -rpath /usr/lib/powerpc64le-linux-gnu newmat1.lo
>> newmat2.lo newmat3.lo newmat4.lo newmat5.lo newmat6.lo newmat7.lo
>> newmat8.lo newmatex.lo bandmat.lo submat.lo myexcept.lo cholesky.lo
>> evalue.lo fft.lo hholder.lo jacobi.lo newfft.lo sort.lo svd.lo
>> newmatrm.lo newmat9.lo
>> libtool: link: g++ -fPIC -DPIC -shared -nostdlib
>> /usr/lib/gcc/powerpc64le-linux-gnu/15/../../../powerpc64le-linux-gnu/crti.o
>> /usr/lib/gcc/powerpc64le-linux-gnu/15/crtbeginS.o .libs/newmat1.o
>> .libs/newmat2.o .libs/newmat3.o .libs/newmat4.o .libs/newmat5.o
>> .libs/newmat6.o .libs/newmat7.o .libs/newmat8.o .libs/newmatex.o
>> .libs/bandmat.o .libs/submat.o .libs/myexcept.o .libs/cholesky.o
>> .libs/evalue.o .libs/fft.o .libs/hholder.o .libs/jacobi.o
>> .libs/newfft.o .libs/sort.o .libs/svd.o .libs/newmatrm.o
>> .libs/newmat9.o -L/usr/lib/gcc/powerpc64le-linux-gnu/15
>> -L/usr/lib/gcc/powerpc64le-linux-gnu/15/../../../powerpc64le-linux-gnu
>> -L/usr/lib/gcc/powerpc64le-linux-gnu/15/../../../../lib
>> -L/lib/powerpc64le-linux-gnu -L/lib/../lib
>> -L/usr/lib/powerpc64le-linux-gnu -L/usr/lib/../lib
>> -L/usr/lib/gcc/powerpc64le-linux-gnu/15/../../.. -L/lib -L/usr/lib
>> -lstdc++ -lm -lc -lgcc_s
>> /usr/lib/gcc/powerpc64le-linux-gnu/15/crtendS.o
>> /usr/lib/gcc/powerpc64le-linux-gnu/15/../../../powerpc64le-linux-gnu/crtn.o
>> -g -O2 -ffile-prefix-map=/build/reproducible-path/newmat-1.10.4=.
>> -fstack-protector-strong -Werror=format-security -Wl,-z -Wl,relro
>> -Wl,-z -Wl,now -Wl,-z -Wl,defs -Wl,-soname -Wl,libnewmat.so.10 -o
>> .libs/libnewmat.so.10.0.0
>> /usr/bin/ld:
>> /usr/lib/gcc/powerpc64le-linux-gnu/15/libgcc.a(float128-ifunc.o):(.data+0x0):
>> undefined reference to `__parse_hwcap_and_convert_at_platform'
>> collect2: error: ld returned 1 exit status
>> make[2]: *** [Makefile:699: libnewmat.la] Error 1
>> make[2]: Leaving directory '/build/reproducible-path/newmat-1.10.4'
>> make[1]: *** [Makefile:608: all] Error 2
>> make[1]: Leaving directory '/build/reproducible-path/newmat-1.10.4'
>> dh_auto_build: error: make -j8 returned exit code 2
>> make: *** [debian/rules:23: binary-arch] Error 25
>> dpkg-buildpackage: error: debian/rules binary-arch subprocess failed
>> with exit status 2
>>
>>
>> Here is full build log for reference
>> https://buildd.debian.org/status/fetch.php?pkg=newmat&arch=ppc64el&ver=1.10.4-9%2Bb1&stamp=1768632273&raw=0
>>
>> Note: Previously built with gcc 14 now falling with gcc 15.
>>
>>
>> Thanks,
>> Trupti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix.patch.xz
Type: application/x-xz
Size: 254488 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20260207/421b5de0/attachment-0001.xz>
More information about the debian-science-maintainers
mailing list