Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937331 - net-misc/iperf-3.17.1, bad immediate value for 8-bit offset, on ARM MUSL
Summary: net-misc/iperf-3.17.1, bad immediate value for 8-bit offset, on ARM MUSL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal
Assignee: Sam James
URL:
Whiteboard:
Keywords:
: 937332 (view as bug list)
Depends on:
Blocks: gcc-14 gcc-14-stable
  Show dependency tree
 
Reported: 2024-08-04 19:55 UTC by Marius Dinu
Modified: 2024-11-02 02:32 UTC (History)
3 users (show)

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


Attachments
emerge --info (emerge-info.txt,7.14 KB, text/plain)
2024-08-04 19:55 UTC, Marius Dinu
Details
build log (iperf-3.17.1.log,17.56 KB, application/octet-stream)
2024-08-04 19:56 UTC, Marius Dinu
Details
wrong .i file (libiperf_la-iperf_tcp.i,359.81 KB, text/plain)
2024-08-06 08:22 UTC, Marius Dinu
Details
wrong .s file (libiperf_la-iperf_tcp.s,19.95 KB, text/plain)
2024-08-06 08:22 UTC, Marius Dinu
Details
.i file (libiperf_la-iperf_server_api.i,384.12 KB, text/plain)
2024-08-06 08:53 UTC, Marius Dinu
Details
.s file (libiperf_la-iperf_server_api.s,34.38 KB, text/plain)
2024-08-06 08:54 UTC, Marius Dinu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Dinu 2024-08-04 19:55:54 UTC
Created attachment 899033 [details]
emerge --info

emerge net-misc/iperf-3.17.1 on ARM MUSL fails with this error:

libtool: compile:  armv7a-unknown-linux-musleabihf-gcc -DHAVE_CONFIG_H -I. -I/usr/include/cjson -O2 -pipe -fomit-frame-pointer -march=armv7ve+neon-vfpv3 -mcpu=cortex-a17 -mfpu=neon-vfpv3 -mfloat-abi=hard -Wall -pthread -c iperf_tcp.c  -fPIC -DPIC -o .libs/libiperf_la-iperf_tcp.o
{standard input}: Assembler messages:
{standard input}:1223: Error: bad immediate value for 8-bit offset (640)
{standard input}:1346: Error: bad immediate value for 8-bit offset (640)
{standard input}:1509: Error: bad immediate value for 8-bit offset (616)
{standard input}:1583: Error: bad immediate value for 8-bit offset (640)
{standard input}:1781: Error: bad immediate value for 8-bit offset (624)
{standard input}:1799: Error: bad immediate value for 8-bit offset (632)
{standard input}:1937: Error: bad immediate value for 8-bit offset (640)
make[2]: *** [Makefile:1003: libiperf_la-iperf_client_api.lo] Error 1 

Thanks.
Comment 1 Marius Dinu 2024-08-04 19:56:16 UTC
Created attachment 899034 [details]
build log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-04 20:10:36 UTC
I think you'll need to probe a bit more as to what's going on here. iperf is just C so it's a compiler or assembler issue - but I suspect we would've heard before if it was generally broken on armv7 + musl.
Comment 3 Marius Dinu 2024-08-05 14:41:20 UTC
Tell me what you need me to do.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-05 23:07:53 UTC
OK :)

First, can you give me preprocessed source, so go to /var/tmp/portage/net-misc/iperf-3.17.1/work/iperf-3.17.1/src, run:
armv7a-unknown-linux-musleabihf-gcc -DHAVE_CONFIG_H -I. -I/usr/include/cjson -O2 -pipe -fomit-frame-pointer -march=armv7ve+neon-vfpv3 -mcpu=cortex-a17 -mfpu=neon-vfpv3 -mfloat-abi=hard -Wall -pthread -c iperf_tcp.c  -fPIC -DPIC -o .libs/libiperf_la-iperf_tcp.o -save-temps

and then find libiperf_la-iperf_tcp*.i and upload it here. .s would be useful as well.

Second, can you try play with the CFLAGS on that line? specifically march/mcpu/vfpu/mfloat-abi, deleting them but also changing their values to more generic ones to see what seems to provoke the failure?

Let me know if you need more help.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-05 23:13:48 UTC
This might be https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-05 23:14:12 UTC
> sys-devel/gcc:             14.1.1_p20240622::gentoo

Can you try >=gcc-14.2.0?
Comment 7 Marius Dinu 2024-08-06 08:22:01 UTC
Created attachment 899270 [details]
wrong .i file
Comment 8 Marius Dinu 2024-08-06 08:22:43 UTC
Created attachment 899271 [details]
wrong .s file
Comment 9 Marius Dinu 2024-08-06 08:45:36 UTC
gcc 14.2.0 won't emerge (different error, but I was told not to open more bug reports)

Sorry for the mistake. libiperf_la-iperf_tcp doen't cause the error. It's libiperf_la-iperf_server_api instead.

I'm attaching a new set of files. Ignore previous ones.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-06 08:53:32 UTC
(In reply to Marius Dinu from comment #9)
> gcc 14.2.0 won't emerge (different error, but I was told not to open more
> bug reports)

It wasn't a telling off, to be clear, Mike meant "the other one is almost certainly the same as this" (which is what I said too), so having many bug reports for the same thing isn't useful, so we can keep the discussion & debugging in one place.

But if it's *clearly* a different error, you can file a new one. Show me it?
Comment 11 Marius Dinu 2024-08-06 08:53:46 UTC
Created attachment 899272 [details]
.i file
Comment 12 Marius Dinu 2024-08-06 08:54:17 UTC
Created attachment 899273 [details]
.s file
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-06 08:55:41 UTC
I think you might be able to disable NEON for the purposes of building gcc. Or perhaps use gcc 13 to build it if you have gcc 14 selected (you can get gcc 13 from a stage3 if you no longer have it installed, or use the binhost which has stage packages for all arches even if not more).
Comment 14 Marius Dinu 2024-08-06 09:09:06 UTC
https://bugs.gentoo.org/937446
Comment 15 Mike Gilbert gentoo-dev 2024-08-06 14:53:03 UTC
Right, I was really just trying to prevent multiple bug reports with the same root cause. If it's obviously a different issue, feel free to create new bugs.
Comment 16 Marius Dinu 2024-08-06 16:51:52 UTC
No problem. I understand. Actually I was planning to take break from bug reports. :-)
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-02 02:32:42 UTC
This one is fixed w/ >=gcc-14.2.0.
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-02 02:32:50 UTC
*** Bug 937332 has been marked as a duplicate of this bug. ***