Closed hfiguiere closed 5 months ago
Hi Hubert
Oh, yes, that is broken. Thanks for the hint.
we need to define a additional display_msg_1
method in ./wscript which takes the additional 'self' argument to fix the error reporting from outside.
For the latter, I've no idea how and were I could fetch CPU information for the aarch64, so I can't add any optimisation flags for it.
So I'll fix the error reporting, but leave optimisations for unknown CPU's in the hand of the user.
A fix for the error handling is pushed to git.
My concern here is that you confuse target host (the one you compile for) and builder host (the one you run the build process on). Imagine you build on a fancy AMD Ryzen with fancy extensions you enable but target a simple Intel Core i3.... Let alone building for a different architecture (but then I don't know how waf handle this anyway)
The only way to handle that is by the user then. Means, don't use the --optimization flag but set the flags you need for your target host.
you can use lscpu
it seems more consistent with the information displayed, I checked on both x86_64 and aarch64 (my RPi)
That's a good one. I can't remember if that was available at the time I implemented the optimization flag, but you ar right, seemd to be time to move on. If you post the output of lspcu for your aarch64, I may be able to add support for it in that run.
On my Raspberry Pi 400 using the 64-bits OS (not the default)
$ lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Vendor ID: ARM
Model: 3
Model name: Cortex-A72
Stepping: r0p3
CPU max MHz: 1800.0000
CPU min MHz: 600.0000
BogoMIPS: 108.00
Flags: fp asimd evtstrm crc32 cpuid
But this doesn't mean it's right.
FYI it is possible that the lscpu tool is not installed
FYI it is possible that the lscpu tool is not installed
Yes, I would leave the old check as fallback.
On my Raspberry Pi 400 using the 64-bits OS
mm, I expected something in flags for optimize for the fpu register (-mfpu=???, -mcpu=??? )
Trying to build Guitarix on Raspberry Pi 400 using the 64-bits OS (aarch64)
I configure with
./waf configure --optimization
Configure end with a Python error:
The line in question is
The bug is two fold:
--optimization
assume x86_64.The former should be fixed first.
For the latter the gist is that is checks
/proc/cpuinfo
assuming a particular format.grep ^model\ name /proc/cpuinfo
returns nothing on aarch64Let me know if you need more info.