GithubHelp home page GithubHelp logo

Add PowerPC support about hwinfo HOT 10 OPEN

lfreist avatar lfreist commented on July 19, 2024
Add PowerPC support

from hwinfo.

Comments (10)

lfreist avatar lfreist commented on July 19, 2024 1

Hi,
hwinfo should work architecture independent on Linux, Windows and Mac (development for MacOS is not very far...).

The supported (and yet unsupported) features for each platform stated here should work on any architecture.

Have you already tried building and running hwinfo on a PowerPC?

If so, it would be nice, if you can provide further information on whats unexpected/not working.

from hwinfo.

barracuda156 avatar barracuda156 commented on July 19, 2024 1

Closed due to inactivity

I apologize, this went forgotten. I will do this today.

from hwinfo.

lfreist avatar lfreist commented on July 19, 2024 1

Thank you! It's a pure failure from my side. Didn't have a non x86 Mac for testing thins peace of code... However, I found the bug and will fix it later.

from hwinfo.

barracuda156 avatar barracuda156 commented on July 19, 2024

@lfreist I will try and update you.

from hwinfo.

lfreist avatar lfreist commented on July 19, 2024

Closed due to inactivity

from hwinfo.

barracuda156 avatar barracuda156 commented on July 19, 2024

@lfreist Build fails here for me:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_hwinfo/hwinfo/work/hwinfo-ce1d868a7c451c27e98614dce74540aea914afd5/src/apple/cpu.cpp: In static member function 'static std::string hwinfo::CPU::getModelName()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_hwinfo/hwinfo/work/hwinfo-ce1d868a7c451c27e98614dce74540aea914afd5/src/apple/cpu.cpp:81:22: error: 'model' was not declared in this scope; did you mean 'modfl'?
   81 |   return std::string(model);
      |                      ^~~~~
      |                      modfl

from hwinfo.

barracuda156 avatar barracuda156 commented on July 19, 2024

Types of PPC cpus can be found in /usr/include/mach/machine.h.
This is how it can be determined: https://www.eidos.ic.i.u-tokyo.ac.jp/~tau/lecture/parallel_distributed/2016/examples/09mm/OpenBLAS/cpuid_power.c

from hwinfo.

barracuda156 avatar barracuda156 commented on July 19, 2024

@lfreist Great, thank you!

from hwinfo.

lfreist avatar lfreist commented on July 19, 2024

commit ba3ba8b should fix the stated issue. Since I cannot test for non x86 MacOS, I cannot assure that there are no other issues... Would be grateful, if you can provide further information after testing the new commit!

from hwinfo.

barracuda156 avatar barracuda156 commented on July 19, 2024

@lfreist Thank you. There is this error then:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_hwinfo/hwinfo/work/hwinfo-ba3ba8b165502f1ab979204c4adcf93bb339c5b1/src/apple/cpu.cpp: In static member function 'static std::string hwinfo::CPU::getModelName()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_hwinfo/hwinfo/work/hwinfo-ba3ba8b165502f1ab979204c4adcf93bb339c5b1/src/apple/cpu.cpp:79:58: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
   79 |   if (sysctlbyname("machdep.cpu.brand_string", model.data(), &size, NULL, 0) < 0) {
      |                                                ~~~~~~~~~~^~
      |                                                          |
      |                                                          const void*
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_hwinfo/hwinfo/work/hwinfo-ba3ba8b165502f1ab979204c4adcf93bb339c5b1/src/apple/cpu.cpp:12:
/usr/include/sys/sysctl.h:752:36: note:   initializing argument 2 of 'int sysctlbyname(const char*, void*, size_t*, void*, size_t)'
  752 | int     sysctlbyname(const char *, void *, size_t *, void *, size_t);
      |                                    ^~~~~~

When passing -fpermissive, it builds through completion. Many objects have no symbols though:

/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(filesystem.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(battery.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(cpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(gpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(ram.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(os.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(mainboard.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(disk.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(filesystem.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(cpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(gpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(ram.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(os.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(mainboard.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(disk.cpp.o) has no symbols
/opt/local/bin/ranlib ../lib/libHWinfo.a
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(filesystem.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(battery.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(cpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(gpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(ram.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(os.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(mainboard.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(disk.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(filesystem.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(cpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(gpu.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(ram.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(os.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(mainboard.cpp.o) has no symbols
/opt/local/bin/ranlib: file: ../lib/libHWinfo.a(disk.cpp.o) has no symbols

Destroot does not work too, but that is trivial to fix on our end.

from hwinfo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.