Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947380 - net-analyzer/wireshark-4.4.2 dumpcap compilation fails with -fno-builtin (str_util.c:(.text+0x15f3): undefined reference to `fabs')
Summary: net-analyzer/wireshark-4.4.2 dumpcap compilation fails with -fno-builtin (st...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sam James
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2025-01-03 12:09 UTC by Matthew
Modified: 2025-01-09 10:26 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,8.32 KB, text/plain)
2025-01-03 12:09 UTC, Matthew
Details
full build log (build.log.xz,53.61 KB, application/x-xz)
2025-01-03 12:12 UTC, Matthew
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew 2025-01-03 12:09:43 UTC
Created attachment 915760 [details]
emerge --info

Hello,

compilation of net-analyzer/wireshark-4.4.2, with a flag +dumpcap, fails with a message:

[2074/2690] : && /usr/bin/x86_64-pc-linux-gnu-gcc -fvisibility=hidden  -Wall -Wextra -Wpointer-arith -Wformat-security -fno-strict-overflow -fexcess-precision=fast -Wvla -Wattributes -Wpragmas -Wredundant-decls -Wunreachable-code -Wlogical-op -Wno-error=stringop-overflow= -Wno-error=deprecated-declarations -Wframe-larger-than=32768 -Wno-format-truncation -fdiagnostics-color=always -Wshadow -Wold-style-definition -Wstrict-prototypes -Wno-pointer-sign -march=cascadelake -O2 -pipe -mabm -mno-pku -mno-sgx -fno-builtin -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wno-error=odr -Wno-error=lto-type-mismatch -Wno-error=strict-aliasing -fno-lto -fmacro-prefix-map="/var/tmp/portage/net-analyzer/wireshark-4.4.2/work/wireshark-4.4.2/"= -fmacro-prefix-map="/var/tmp/portage/net-analyzer/wireshark-4.4.2/work/wireshark-4.4.2_build/"= -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs      -Wl,--as-needed  -fPIE -pie CMakeFiles/dumpcap.dir/capture_opts.c.o CMakeFiles/dumpcap.dir/cli_main.c.o CMakeFiles/dumpcap.dir/dumpcap.c.o CMakeFiles/dumpcap.dir/ringbuffer.c.o CMakeFiles/dumpcap.dir/sync_pipe_write.c.o CMakeFiles/dumpcap.dir/capture/iface_monitor.c.o CMakeFiles/dumpcap.dir/capture/ws80211_utils.c.o CMakeFiles/dumpcap.dir/capture/capture-pcap-util-unix.c.o CMakeFiles/dumpcap.dir/capture/capture-pcap-util.c.o -o run/dumpcap  run/libwritecap.a  run/libwsutil_static.a  /usr/lib64/libpcap.so  /usr/lib64/libcap.so  /usr/lib64/libz.so  /usr/lib64/libnl-genl-3.so  /usr/lib64/libnl-route-3.so  /usr/lib64/libnl-3.so  /usr/lib64/libglib-2.0.so  /usr/lib64/libgmodule-2.0.so  -ldl  /usr/lib64/libgcrypt.so  /usr/lib64/libgpg-error.so  /usr/lib64/libgnutls.so  /usr/lib64/libpcre2-8.so  /usr/lib64/libz.so && :
FAILED: run/dumpcap 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -fvisibility=hidden  -Wall -Wextra -Wpointer-arith -Wformat-security -fno-strict-overflow -fexcess-precision=fast -Wvla -Wattributes -Wpragmas -Wredundant-decls -Wunreachable-code -Wlogical-op -Wno-error=stringop-overflow= -Wno-error=deprecated-declarations -Wframe-larger-than=32768 -Wno-format-truncation -fdiagnostics-color=always -Wshadow -Wold-style-definition -Wstrict-prototypes -Wno-pointer-sign -march=cascadelake -O2 -pipe -mabm -mno-pku -mno-sgx -fno-builtin -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wno-error=odr -Wno-error=lto-type-mismatch -Wno-error=strict-aliasing -fno-lto -fmacro-prefix-map="/var/tmp/portage/net-analyzer/wireshark-4.4.2/work/wireshark-4.4.2/"= -fmacro-prefix-map="/var/tmp/portage/net-analyzer/wireshark-4.4.2/work/wireshark-4.4.2_build/"= -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs      -Wl,--as-needed  -fPIE -pie CMakeFiles/dumpcap.dir/capture_opts.c.o CMakeFiles/dumpcap.dir/cli_main.c.o CMakeFiles/dumpcap.dir/dumpcap.c.o CMakeFiles/dumpcap.dir/ringbuffer.c.o CMakeFiles/dumpcap.dir/sync_pipe_write.c.o CMakeFiles/dumpcap.dir/capture/iface_monitor.c.o CMakeFiles/dumpcap.dir/capture/ws80211_utils.c.o CMakeFiles/dumpcap.dir/capture/capture-pcap-util-unix.c.o CMakeFiles/dumpcap.dir/capture/capture-pcap-util.c.o -o run/dumpcap  run/libwritecap.a  run/libwsutil_static.a  /usr/lib64/libpcap.so  /usr/lib64/libcap.so  /usr/lib64/libz.so  /usr/lib64/libnl-genl-3.so  /usr/lib64/libnl-route-3.so  /usr/lib64/libnl-3.so  /usr/lib64/libglib-2.0.so  /usr/lib64/libgmodule-2.0.so  -ldl  /usr/lib64/libgcrypt.so  /usr/lib64/libgpg-error.so  /usr/lib64/libgnutls.so  /usr/lib64/libpcre2-8.so  /usr/lib64/libz.so && :
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: run/libwsutil_static.a(str_util.c.o): in function `format_units':
str_util.c:(.text+0x15f3): undefined reference to `fabs'
collect2: error: ld returned 1 exit status


I'm using gcc 14 : (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
and glibc 2.40: (Gentoo 2.40-r5 (patchset 5)) 2.40
Comment 1 Matthew 2025-01-03 12:12:09 UTC
Created attachment 915761 [details]
full build log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-03 12:13:31 UTC
Ah, it's likely because of your -fno-builtin. It exposes missing -lm linkage.
Comment 3 Matthew 2025-01-03 19:03:34 UTC
Thanks for ultra fast response Sam!
You're right, removing -fno-builtin helps for the compilation issue.

Any chance for adding -lm  into wireshark's ebuild?
Comment 4 Holger Hoffstätte 2025-01-06 13:57:30 UTC
Well, that was fast - fixed upstream already:

https://gitlab.com/wireshark/wireshark/-/commit/442d1cad22339985f43eef4f79bb5794b66d9a9b
Comment 5 Guy Harris 2025-01-06 21:08:51 UTC
(In reply to Holger Hoffstätte from comment #4)
> Well, that was fast - fixed upstream already:

Probably as a consequence of issue 20326 being filed upstream:

https://gitlab.com/wireshark/wireshark/-/issues/20326
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-06 21:43:00 UTC
(In reply to Guy Harris from comment #5)
> (In reply to Holger Hoffstätte from comment #4)
> > Well, that was fast - fixed upstream already:
> 
> Probably as a consequence of issue 20326 being filed upstream:
> 
> https://gitlab.com/wireshark/wireshark/-/issues/20326

Holger was the one who filed that :)
Comment 7 Larry the Git Cow gentoo-dev 2025-01-09 10:26:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cec694e56a2b8f71a82efe2f41d268dcb5d47775

commit cec694e56a2b8f71a82efe2f41d268dcb5d47775
Author:     Holger Hoffstätte <holger@applied-asynchrony.com>
AuthorDate: 2025-01-09 09:07:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-09 10:24:47 +0000

    net-analyzer/wireshark: add 4.4.3
    
    Closes: https://bugs.gentoo.org/947380
    Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-analyzer/wireshark/Manifest               |   2 +
 net-analyzer/wireshark/wireshark-4.4.3.ebuild | 344 ++++++++++++++++++++++++++
 2 files changed, 346 insertions(+)