Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ks23

macrumors member
Original poster
May 6, 2004
61
44
Hello guys,

could you all please run:
cat /proc/cpuinfo and or
lscpu

Interesting would be: X1000 (PA Semi), early Motorola G4, late Freescale G4 (7447, 7448), also G3, X5000 (NXP) etc.
It's about the vendorID, logo of the CPU manufacturefor cpufetch.

Because cpufetch is (will be) ported to PowerPC. You could also report directly on Github:

Thanks
 
Last edited:
Hello guys,

could you all please run:
cat /proc/cpuinfo and or
lscpu

Interesting would be: X1000 (PA Semi), early Motorola G4, late Freescale G4 (7447, 7448), also G3, X5000 (NXP) etc.
It's about the vendorID, logo of the CPU manufacturefor cpufetch.

Because cpufetch is (will be) ported to PowerPC. You could also report directly on Github:

Thanks

I would love to know the build flags one should be using and/or architecture-specific instructions on how to correctly build this on a PPC 32-bit Darwin environment. If that’s something you know to do, please share it with us!
 
This is the cat /proc/cpuinfo output on my iBook A1005:

Code:
processor    : 0
cpu        : 750FX
temperature     : 10-16 C (uncalibrated)
clock        : 800.000000MHz
revision    : 2.3 (pvr 7000 0203)
bogomips    : 49.67

total bogomips    : 49.67
timebase    : 24835213
platform    : PowerMac
model        : PowerBook4,3
machine        : PowerBook4,3
motherboard    : PowerBook4,3 MacRISC2 MacRISC Power Macintosh
detected as    : 257 (iBook 2 rev. 2)
pmac flags    : 0000001b
L2 cache    : 512K unified
pmac-generation    : NewWorld
Memory        : 640 MB
lscpu:
Code:
Architecture:          ppc
Byte Order:            Big Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Model:                 PowerBook4,3
BogoMIPS:              49.67
L1d cache:             32K
L1i cache:             32K
L2 cache:              512K
 
12" Powerbook G4

ppc-cpu.png
 
@ks23 : you may want to pass this along. In my quick look and testing of this i spotted 2 errors in the makefile that make it default to wanting to build for ARM, rather than PPC. He had used ppc32 rather than ppc64 and ppc, so it skipped ppc all together. Once i applied those changes it built, but it crashes. See attached.

Fixed makefile. See highlighted line.
cpufetch-makefile-ppc.png


Completed build, and crash.
cpufetch-ppc-crash.png


Hope this helps.
Cheers
 
Last edited:
  • Like
Reactions: ks23
heres a cat /proc/cpuinfo and lscpu from my Power Macintosh 9600 (although linux has trouble detecting the 1MB of inline cache and only sees the Phantom 256KB of motherboard L2 cache that does not actually exist but is what OF reports)

1592763178674-png.925701
 
Hello everyone,

sorry for the inaccurate wording. I am not the maintainer of cpufetch. I will post this thread on Github so the maintainer can read through the posts.

And thanks for the feedback.

I would love to know the build flags one should be using and/or architecture-specific instructions on how to correctly build this on a PPC 32-bit Darwin environment. If that’s something you know to do, please share it with us!

Sorry, this you have to ask the maintainer.
 
@ks23 : you may want to pass this along. In my quick look and testing of this i spotted 2 errors in the makefile that make it default to wanting to build for ARM, rather than PPC. He had used ppc32 rather than ppc64 and ppc, so it skipped ppc all together. Once i applied those changes it built, but it crashes. See attached.

Fixed makefile. See highlighted line.
View attachment 1814473

Completed build, and crash.
View attachment 1814474

Hope this helps.
Cheers
Hi, I'm the maintainer of cpufetch. I just created an account in macrumors.

Regarding the Makefile, I did a quick search in google and I used the arch that I found and also the arch that worked for the powerpc machine that I have access to (ppc64le). It's clear that the archs that I used are wrong because, as you said, in the case of your machine it skips the powerpc part and goes to ARM. Do you know an exhaustive list of powerpc archs that match all the powerpc architectures (both 32 and 64 bits)? Are we sure that "ppc64el ppc64le ppc64 ppc" includes all of them?

Right now, the powerpc port is in its infancy, so I expected some bugs in it. I'm pretty curious about the one you found. Can you please run cpufetch again with valgrind (that will tell you where did it crash)? If you are unable to use valgrind, you can run cpufetch with gdb, and it will also tell you where did it fail.

I prefer if you report this on the github page, but it's ok too if you continue the discussion here. Thanks!
 
  • Like
Reactions: juanstdio and ks23
I would love to know the build flags one should be using and/or architecture-specific instructions on how to correctly build this on a PPC 32-bit Darwin environment. If that’s something you know to do, please share it with us!
cpufetch for powerpc only works under Linux. This is because (unfortunately) the program uses the operating system to fetch some information. To make it work under a Darwin kernel it would need further development which I do not plan to do; too much work for too little. If I see many people asking for this I may consider doing it.

I know that many old macs have powerpc and that the users of such machines do not want to switch to mac. Unfortunately, to the best of my knowledge, powerpc does not have instructions for fetching things like frequency, the number of cores, etc so cpufetch needs to depend on the OS to fetch this information.
 
  • Like
Reactions: ks23 and B S Magnet
cpufetch for powerpc only works under Linux. This is because (unfortunately) the program uses the operating system to fetch some information. To make it work under a Darwin kernel it would need further development which I do not plan to do; too much work for too little. If I see many people asking for this I may consider doing it.

I know that many old macs have powerpc and that the users of such machines do not want to switch to mac. Unfortunately, to the best of my knowledge, powerpc does not have instructions for fetching things like frequency, the number of cores, etc so cpufetch needs to depend on the OS to fetch this information.

Thanks for your work on this project and for clarifying on this thread the source components and their compatibility limitations.

After a day of rest and clearing my head by working on other things, I now realize, in effect, the cpufetch project functions much the way neofetch — which does build on OS X — does.
 
Thanks for your work on this project and for clarifying on this thread the source components and their compatibility limitations.

After a day of rest and clearing my head by working on other things, I now realize, in effect, the cpufetch project functions much the way neofetch — which does build on OS X — does.
You're welcome. I hope that cpufetch can be useful to people with powerpc machines.

Just for clarification, cpufetch works on OS X under x86 platforms, but not under OS X powerpc (see https://github.com/Dr-Noob/cpufetch#1-support).

In the case of neofetch, this complexity (the difference between CPUs and OS) is handled fairly easy thanks to bash and OS abstractions. In the case of cpufetch, this complexity is handled manually, using assembly and OS-dependent code. In other words, if an application like neofetch works for OS X under x86, it needs little to zero effort to work for OS X under ppc. In the case of cpufetch, I need to reimplement many of the powerpc backend from scratch.

This brief clarification is only to motivate the fact that if cpufetch does not work under OS X ppc is not because I'm lazy and it's trivial to do so, it's because it's a lot of hard work.
 
Do you know an exhaustive list of powerpc archs that match all the powerpc architectures (both 32 and 64 bits)? Are we sure that "ppc64el ppc64le ppc64 ppc" includes all of them?
No, i don't. I believe there is ppcspe also. I just included ppc64 and ppc as that covers 32bit macintosh G3/G4 and 64bit G5 machines (and i believe the amigaone x1000/x5000 as well) that most of us here use and or have access to.

As for running gdb on it, it produced the exact same output as the screenshot above. Running ./cpufetch --help does work/display properly however.

On a side note: I am not running recent linux distro's on these machines. I'm mainly using my own custom variants of ubuntu 10 and 12. Not sure if that will have any adverse effect in testing this. At any rate, removing ppc32 (it's not a thing, just slang people use to specify 32bit) and adding ppc64 and ppc was enough to get it building.

Hopefully others will chime in with more knowledge. I just spotted that in the makefile and wanted to point it out. Best of luck in your quest to add more powerpc support. I'll keep an eye on this thread/github, but honestly i'm too busy with multiple other projects to add another to my list to participate in.

Cheers
 
No, i don't. I believe there is ppcspe also. I just included ppc64 and ppc as that covers 32bit macintosh G3/G4 and 64bit G5 machines (and i believe the amigaone x1000/x5000 as well) that most of us here use and or have access to.

As for running gdb on it, it produced the exact same output as the screenshot above. Running ./cpufetch --help does work/display properly however.

On a side note: I am not running recent linux distro's on these machines. I'm mainly using my own custom variants of ubuntu 10 and 12. Not sure if that will have any adverse effect in testing this. At any rate, removing ppc32 (it's not a thing, just slang people use to specify 32bit) and adding ppc64 and ppc was enough to get it building.

Hopefully others will chime in with more knowledge. I just spotted that in the makefile and wanted to point it out. Best of luck in your quest to add more powerpc support. I'll keep an eye on this thread/github, but honestly i'm too busy with multiple other projects to add another to my list to participate in.

Cheers
Thanks for the tips. I have updated the Makefile to include your corrections.

I'm sorry to bother you but I forgot to mention that to get valid results with gdb/valgrind, you need to compile with debug symbols. In cpufetch this can be done using "make debug". The fact that you have old and/or custom Linux distributions make it easier to break things in cpufetch but that is precisely why I'm really interested in understanding what's going on in your machine.

If you don't mind, please download the program again (git pull will suffice), compile with debug flags (make debug), and let's see if gdb now tells what happened. When the program crashes with gdb, you can use "backtrace" to print the trace of the program. If gdb does not help, I would suggest using valgrind as it provides better information in this kind of situations. Thanks!
 
Last edited:
@Dr-Noob : Ok built with make debug. Output still looks the same, so then i ran backtrace. Here's the output.

gdb-fetch.png


I don't want you to go down a rabbit hole on this. Someone with at least Ubuntu 16, Debian 10, Void, etc should be trying this instead of me and my "outdated" OS's. I'll try to put my G5 back together and see if i have better luck as i have a current Void install on that.

Cheers
 
Last edited:
@Dr-Noob : Ok built with make debug. Output still looks the same, so then i ran backtrace. Here's the output.

View attachment 1815389

I don't want you to go down a rabbit hole on this. Someone with at least Ubuntu 16, Debian 10, Void, etc should be trying this instead of me and my "outdated" OS's. I'll try to put my G5 back together and see if i have better luck as i have a current Void install on that.

Cheers
Thanks @wicknix. I'll wait until we have a more solid clue of what's wrong. Unfortunately, I only have access to a POWER9 CPU running one of the latest Fedora releases, so I can not reproduce this issue.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.