ad-oliviero / uwufetch

A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace.
GNU General Public License v3.0
749 stars 52 forks source link

M1 Support #215

Closed Radiicall closed 1 year ago

Radiicall commented 1 year ago

uwufetch doesn't report CPU or Model on the Apple M1

uwufetch:

image

neofetch for comparison:

image

ad-oliviero commented 1 year ago

Debugging a program for M1 machines can only be done on one of them, so I can't really try to fix this issue as I do not own any apple systems. I could use a vm, but right now there's no way to emulate an M1 processor, so I still can do nothing.

Radiicall commented 1 year ago

I can cat some files if you can tell me what you want to see

ad-oliviero commented 1 year ago

I wrote some optimizations in a new branch, it is possible that something got fixed under macos M1.

Could you try to git pull; git checkout optimizations and recompile it?

Radiicall commented 1 year ago

Sorry I wasn't clear, im running linux on the M1, not macOS

ad-oliviero commented 1 year ago

Oh right, I forgot that you are on linux. I added a logging system to the optimizations branch, could you switch to that branch and send the output of make debug ARGS="-v"?

Radiicall commented 1 year ago
[benja@fedora-m1 uwufetch]$ make debug ARGS="-v"
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-39-g7d603b4\" -D__DEBUG__ -fPIC -c -o fetch.o fetch.c
fetch.c: In function ‘get_model’:
fetch.c:406:15: warning: unused variable ‘buffer’ [-Wunused-variable]
  406 |         char* buffer                                     = ((struct thread_varg*)argp)->buffer;
      |               ^~~~~~
fetch.c: In function ‘get_info’:
fetch.c:615:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
  615 |                                         ;
      |                                         ^
fetch.c:718:28: warning: pointer ‘cpuinfo’ used after ‘fclose’ [-Wuse-after-free]
  718 |         struct thread_varg args =
      |                            ^~~~
fetch.c:639:9: note: call to ‘fclose’ here
  639 |         fclose(cpuinfo);
      |         ^~~~~~~~~~~~~~~
ar rcs libfetch.a fetch.o
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-39-g7d603b4\" -D__DEBUG__ -shared -o libfetch.so fetch.o
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-39-g7d603b4\" -D__DEBUG__ -o uwufetch uwufetch.c libfetch.a
./uwufetch -v
[INFO]: main in uwufetch.c:702: version 2.0-39-g7d603b4
[INFO]: main in uwufetch.c:734: reading config
[INFO]: get_twidth in fetch.c:99: getting terminal width
[VARIABLE]: get_twidth in fetch.c:104: user_info->target_width = 72
[INFO]: get_info in fetch.c:558: getting os name from /etc/os-release
[VARIABLE]: get_info in fetch.c:578: user_info->os_name = "fedora"
[INFO]: get_info in fetch.c:582: getting cpu name
[VARIABLE]: get_info in fetch.c:599: user_info->cpu_model = ""
[INFO]: get_info in fetch.c:644: getting username and hostname
[VARIABLE]: get_info in fetch.c:646: user_info->host = "fedora-m1"
[VARIABLE]: get_info in fetch.c:648: tmp_user = "benja"
[VARIABLE]: get_info in fetch.c:653: user_info->user = "benja"
[INFO]: get_info in fetch.c:657: getting shell
[VARIABLE]: get_info in fetch.c:659: tmp_shell = "/bin/bash"
[VARIABLE]: get_info in fetch.c:668: user_info->shell = "/bin/bash"
[INFO]: get_sys in fetch.c:115: getting sys_var struct
[INFO]: get_info in fetch.c:726: STARTING thread 0
[INFO]: get_info in fetch.c:726: STARTING thread 1
[INFO]: get_ram in fetch.c:132: getting ram
[INFO]: get_info in fetch.c:726: STARTING thread 2
[INFO]: get_res in fetch.c:296: getting resolution
[INFO]: get_info in fetch.c:726: STARTING thread 3
[INFO]: get_gpu in fetch.c:248: getting gpus with lshw
[INFO]: get_info in fetch.c:726: STARTING thread 4
[INFO]: get_info in fetch.c:726: STARTING thread 5
[INFO]: get_pkg in fetch.c:316: getting pkgs
[INFO]: get_model in fetch.c:404: getting model
[INFO]: get_ker in fetch.c:477: getting kernel
[VARIABLE]: get_ram in fetch.c:200: user_info->ram_total = 7565
[VARIABLE]: get_ker in fetch.c:484: user_info->kernel = "Linux 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64"
[VARIABLE]: get_ram in fetch.c:201: user_info->ram_used = 5776
[INFO]: get_pkg in fetch.c:352: trying pkgman 0: (apt)
[INFO]: get_upt in fetch.c:504: getting uptime
[VARIABLE]: get_upt in fetch.c:533: user_info->uptime = 0xe45
[INFO]: get_info in fetch.c:726: STARTING thread 6
[INFO]: get_info in fetch.c:730: JOINING thread 0
[VARIABLE]: get_model in fetch.c:427: tmp_model[i] = ""
[VARIABLE]: get_model in fetch.c:427: tmp_model[i] = ""
[VARIABLE]: get_model in fetch.c:427: tmp_model[i] = ""
[VARIABLE]: get_model in fetch.c:427: tmp_model[i] = ""
[VARIABLE]: get_model in fetch.c:436: user_info->model = ""
[INFO]: get_pkg in fetch.c:352: trying pkgman 1: (apk)
[VARIABLE]: get_res in fetch.c:305: user_info->screen_width = 1464
[VARIABLE]: get_res in fetch.c:306: user_info->screen_height = 915
[INFO]: get_pkg in fetch.c:352: trying pkgman 2: (emerge)
[INFO]: get_pkg in fetch.c:352: trying pkgman 3: (flatpak)
[INFO]: get_info in fetch.c:730: JOINING thread 1
[INFO]: get_info in fetch.c:730: JOINING thread 2
[VARIABLE]: get_pkg in fetch.c:378: user_info->pkgman_name = "8 (flatpak)"
[INFO]: get_pkg in fetch.c:352: trying pkgman 4: (snap)
[INFO]: get_pkg in fetch.c:352: trying pkgman 5: (guix)
[INFO]: get_pkg in fetch.c:352: trying pkgman 6: (nix)
[INFO]: get_pkg in fetch.c:352: trying pkgman 7: (pacman)
[INFO]: get_pkg in fetch.c:352: trying pkgman 8: (pkg)
[INFO]: get_pkg in fetch.c:352: trying pkgman 9: (pkg)
[INFO]: get_pkg in fetch.c:352: trying pkgman 10: (port)
[INFO]: get_pkg in fetch.c:352: trying pkgman 11: (brew-cellar)
[INFO]: get_pkg in fetch.c:352: trying pkgman 12: (brew-cask)
[INFO]: get_pkg in fetch.c:352: trying pkgman 13: (rpm)
[VARIABLE]: get_pkg in fetch.c:378: user_info->pkgman_name = "8 (flatpak), 1336 (rpm)"
[INFO]: get_pkg in fetch.c:352: trying pkgman 14: (xbps)
[INFO]: get_pkg in fetch.c:352: trying pkgman 15: (zypper)
[INFO]: get_info in fetch.c:730: JOINING thread 3
[INFO]: get_info in fetch.c:730: JOINING thread 4
[INFO]: get_info in fetch.c:730: JOINING thread 5
[INFO]: get_info in fetch.c:730: JOINING thread 6
[VARIABLE]: main in uwufetch.c:751: config_flags.show_image = (nil)
                     benja@fedora-m1
        _____        OWOS     Fedowa
       /   __)\      MOWODEL  
     > |  / <\ \     KEWNEL   Linuwu 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64             
    ___| ω|__/ /     CPUWU    
   / (_    _)_/      MEMOWY   5776 MiB/7565 MiB
  / /  |  |          WESOWUTION  1464x915
  \ \__/  |          SHEWW    /bin/bash
   \(_____/          PKGS     1344: 8 (flatpak), 1336 (rpm)
                     UWUPTIME 1h, 0m
                     ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇
ad-oliviero commented 1 year ago

I could have fixed the cpu name in 8543fe4c56e9b48e2fc62b4c15a9a52cdf693227

For the model (and cpu if it still doesn't work, ), I'll need the output of

cat /sys/devices/virtual/dmi/id/product_name
cat /sys/devices/virtual/dmi/id/product_version
cat /sys/devices/virtual/dmi/id/board_name
cat /sys/devices/virtual/dmi/id/board_vendor

and

cat /proc/cpuinfo
Radiicall commented 1 year ago

So i see you called the commit "Fixed compilation on macos", as i said before I'm currently on linux, but anyways it didnt seem to help.

cat /sys/devices/virtual/dmi/id/product_name
cat /sys/devices/virtual/dmi/id/product_version
cat /sys/devices/virtual/dmi/id/board_name
cat /sys/devices/virtual/dmi/id/board_vendor
cat: /sys/devices/virtual/dmi/id/product_name: No such file or directory
cat: /sys/devices/virtual/dmi/id/product_version: No such file or directory
cat: /sys/devices/virtual/dmi/id/board_name: No such file or directory
cat: /sys/devices/virtual/dmi/id/board_vendor: No such file or directory

/proc/cpuinfo

processor   : 0
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x022
CPU revision    : 1

processor   : 1
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x022
CPU revision    : 1

processor   : 2
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x022
CPU revision    : 1

processor   : 3
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x022
CPU revision    : 1

processor   : 4
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x023
CPU revision    : 1

processor   : 5
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x023
CPU revision    : 1

processor   : 6
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x023
CPU revision    : 1

processor   : 7
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant : 0x1
CPU part    : 0x023
CPU revision    : 1
ad-oliviero commented 1 year ago

Sorry, I linked the wrong commit, I meant this one df34baa830af80b66b29de5144d08b73fc0b60e4.

For the model, try sysctl -n hw.model and lscpu, if there's no useful output, I have no idea where does neofetch get it from: the files that you cated before are all the files that neofetch uses in its get_model() function.

For the cpu, I'm having the same problem on termux. Neofetch's output for the cpu is almost equally useless tho, as it gives just the core count and the frequency. I think that fixing it on android could fix it also on linux-M1

EDIT: also, I just merged the optimizations branch with main, as it compiles in most of the supported platforms

Radiicall commented 1 year ago

Will test later

Radiicall commented 1 year ago

It still doesnt show Host or CPU after switching to main, the sysctl command doesnt work, and the lscpu command returned:

Architecture:           aarch64
  CPU op-mode(s):       64-bit
  Byte Order:           Little Endian
CPU(s):                 8
  On-line CPU(s) list:  0-7
Vendor ID:              Apple
  Model name:           Icestorm
    Model:              1
    Thread(s) per core: 1
    Core(s) per socket: 4
    Socket(s):          1
    Stepping:           0x1
    CPU(s) scaling MHz: 65%
    CPU max MHz:        2064.0000
    CPU min MHz:        600.0000
    BogoMIPS:           48.00
    Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssb
                        s sb paca pacg dcpodp flagm2 frint
  Model name:           Firestorm
    Model:              1
    Thread(s) per core: 1
    Core(s) per socket: 4
    Socket(s):          1
    Stepping:           0x1
    CPU(s) scaling MHz: 100%
    CPU max MHz:        2988.0000
    CPU min MHz:        600.0000
    BogoMIPS:           48.00
    Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssb
                        s sb paca pacg dcpodp flagm2 frint
Caches (sum of all):    
  L1d:                  768 KiB (8 instances)
  L1i:                  1.3 MiB (8 instances)
  L2:                   16 MiB (2 instances)
Vulnerabilities:        
  Itlb multihit:        Not affected
  L1tf:                 Not affected
  Mds:                  Not affected
  Meltdown:             Not affected
  Mmio stale data:      Not affected
  Retbleed:             Not affected
  Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:           Mitigation; __user pointer sanitization
  Spectre v2:           Not affected
  Srbds:                Not affected
  Tsx async abort:      Not affected
ad-oliviero commented 1 year ago

I added a cpu "fallback" that writes core count instead of cpu name if it is not found.

For the model, I don't know yet how does neofetch get it, but I'm working on it

Radiicall commented 1 year ago

You could check lscpu for codename Icestorm and Firestorm and then write "Apple M1" from that. There's probably also a thing in /sys to check cpu codename

Radiicall commented 1 year ago

the core count is showing now instead of nothing, its not in uwu though so that should probably be fixed

ad-oliviero commented 1 year ago

I added another "fallback", for the model that uses lscpu.

Radiicall commented 1 year ago

image

it doesnt seem to be using the lscpu fallback

ad-oliviero commented 1 year ago

Could you send another uwufetch -v output (after recompiling it with make debug)?

Radiicall commented 1 year ago
[benja@fedora-m1 uwufetch]$ git pull
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 51 (delta 19), reused 17 (delta 6), pack-reused 0
Unpacking objects: 100% (51/51), 20.68 KiB | 641.00 KiB/s, done.
From https://github.com/TheDarkBug/uwufetch
   3ebf1f3..10c47cd  main       -> origin/main
Updating 3ebf1f3..10c47cd
Fast-forward
 .github/ISSUE_TEMPLATE/bug-report.md             | 36 ++++++++++++++++++++++++++++++++++++
 .github/ISSUE_TEMPLATE/feature_request.md        | 20 ++++++++++++++++++++
 .github/ISSUE_TEMPLATE/request-new-os-support.md | 20 ++++++++++++++++++++
 .github/workflows/c-cpp.yml                      | 33 +++++++++++++++++++++++++++++++++
 CONTRIBUTING.md                                  | 47 +++++++++--------------------------------------
 README.md                                        |  3 +++
 fetch.c                                          | 34 ++++++++++++++++++----------------
 fetch.h                                          |  4 ++++
 8 files changed, 143 insertions(+), 54 deletions(-)
 create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md
 create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
 create mode 100644 .github/ISSUE_TEMPLATE/request-new-os-support.md
 create mode 100644 .github/workflows/c-cpp.yml
[benja@fedora-m1 uwufetch]$ make debug ARGS="-v"
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-65-g10c47cd\" -D__DEBUG__ -fPIC -c -o fetch.o fetch.c
ar rcs libfetch.a fetch.o
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-65-g10c47cd\" -D__DEBUG__ -shared -o libfetch.so fetch.o
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-65-g10c47cd\" -D__DEBUG__ -o uwufetch uwufetch.c libfetch.a
./uwufetch -v
[INFO]: main in uwufetch.c:743: version 2.0-65-g10c47cd
[INFO]: get_twidth in fetch.c:108: getting terminal width
[VARIABLE]: get_twidth in fetch.c:113: user_info->target_width = 151
[INFO]: get_info in fetch.c:622: getting os name from /etc/os-release
[VARIABLE]: get_info in fetch.c:642: user_info->os_name = "fedora"
[INFO]: get_info in fetch.c:686: getting username and hostname
[VARIABLE]: get_info in fetch.c:688: user_info->host = "fedora-m1"
[VARIABLE]: get_info in fetch.c:690: tmp_user = "benja"
[VARIABLE]: get_info in fetch.c:695: user_info->user = "benja"
[INFO]: get_info in fetch.c:699: getting shell
[VARIABLE]: get_info in fetch.c:701: tmp_shell = "/bin/bash"
[VARIABLE]: get_info in fetch.c:710: user_info->shell = "/bin/bash"
[INFO]: get_sys in fetch.c:124: getting sys_var struct
[INFO]: get_info in fetch.c:768: STARTING thread 0
[INFO]: get_info in fetch.c:768: STARTING thread 1
[INFO]: get_cpu in fetch.c:146: getting cpu name
[INFO]: get_info in fetch.c:768: STARTING thread 2
[INFO]: get_ram in fetch.c:180: getting ram
[INFO]: get_info in fetch.c:768: STARTING thread 3
[ERROR]: get_cpu in fetch.c:165: failed to get cpu name
[INFO]: get_gpu in fetch.c:295: getting gpus with lshw
[VARIABLE]: get_cpu in fetch.c:173: user_info->cpu_model = "8 Cores"
[INFO]: get_info in fetch.c:768: STARTING thread 4
[INFO]: get_res in fetch.c:343: getting resolution
[INFO]: get_info in fetch.c:768: STARTING thread 5
[INFO]: get_pkg in fetch.c:364: getting pkgs
[INFO]: get_pkg in fetch.c:400: trying pkgman 0: (apt)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/apt"
[WARNING]: get_pkg in fetch.c:420: pkgman (apt) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 1: (apk)
[INFO]: get_info in fetch.c:768: STARTING thread 6
[INFO]: get_model in fetch.c:459: getting model
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/apk"
[WARNING]: get_pkg in fetch.c:420: pkgman (apk) executable not found!
[INFO]: get_info in fetch.c:768: STARTING thread 7
[INFO]: get_ker in fetch.c:540: getting kernel
[VARIABLE]: get_model in fetch.c:517: tmp_model[i] = ""
[INFO]: get_pkg in fetch.c:400: trying pkgman 2: (emerge)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/qlist"
[WARNING]: get_pkg in fetch.c:420: pkgman (emerge) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 3: (flatpak)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/flatpak"
[VARIABLE]: get_upt in fetch.c:568: ((struct thread_varg*)argp)->thread_flags[7] = 0x1
[INFO]: get_upt in fetch.c:570: getting uptime
[VARIABLE]: get_upt in fetch.c:599: user_info->uptime = 0x8f4e
[VARIABLE]: get_ker in fetch.c:547: user_info->kernel = "Linux 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64"
[INFO]: get_info in fetch.c:778: JOINING thread 0
[VARIABLE]: get_model in fetch.c:517: tmp_model[i] = ""
[VARIABLE]: get_model in fetch.c:517: tmp_model[i] = "��|r��"
[VARIABLE]: get_ram in fetch.c:247: user_info->ram_total = 7565
[VARIABLE]: get_ram in fetch.c:248: user_info->ram_used = 4236
[INFO]: get_info in fetch.c:778: JOINING thread 1
[VARIABLE]: get_model in fetch.c:517: tmp_model[i] = " �|r�"
[VARIABLE]: get_model in fetch.c:533: user_info->model = "��|r��"
[VARIABLE]: get_res in fetch.c:352: user_info->screen_width = 1464
[VARIABLE]: get_res in fetch.c:353: user_info->screen_height = 915
[INFO]: get_info in fetch.c:778: JOINING thread 2
[INFO]: get_info in fetch.c:778: JOINING thread 3
[VARIABLE]: get_pkg in fetch.c:432: user_info->pkgman_name = "12 (flatpak)"
[INFO]: get_pkg in fetch.c:400: trying pkgman 4: (snap)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/snap"
[WARNING]: get_pkg in fetch.c:420: pkgman (snap) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 5: (guix)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/guix"
[WARNING]: get_pkg in fetch.c:420: pkgman (guix) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 6: (nix)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/nix-store"
[WARNING]: get_pkg in fetch.c:420: pkgman (nix) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 7: (pacman)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/pacman"
[WARNING]: get_pkg in fetch.c:420: pkgman (pacman) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 8: (pkg)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/pkg"
[WARNING]: get_pkg in fetch.c:420: pkgman (pkg) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 9: (pkg)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/pkg_info"
[WARNING]: get_pkg in fetch.c:420: pkgman (pkg) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 10: (port)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/port"
[WARNING]: get_pkg in fetch.c:420: pkgman (port) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 11: (brew-cellar)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/brew"
[WARNING]: get_pkg in fetch.c:420: pkgman (brew-cellar) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 12: (brew-cask)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/brew"
[WARNING]: get_pkg in fetch.c:420: pkgman (brew-cask) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 13: (rpm)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/rpm"
[VARIABLE]: get_pkg in fetch.c:432: user_info->pkgman_name = "12 (flatpak), 1349 (rpm)"
[INFO]: get_pkg in fetch.c:400: trying pkgman 14: (xbps)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/xbps-query"
[WARNING]: get_pkg in fetch.c:420: pkgman (xbps) executable not found!
[INFO]: get_pkg in fetch.c:400: trying pkgman 15: (zypper)
[VARIABLE]: get_pkg in fetch.c:401: current->command_path = "/usr/bin/zypper"
[WARNING]: get_pkg in fetch.c:420: pkgman (zypper) executable not found!
[INFO]: get_info in fetch.c:778: JOINING thread 4
[INFO]: get_info in fetch.c:778: JOINING thread 5
[INFO]: get_info in fetch.c:778: JOINING thread 6
[INFO]: get_info in fetch.c:778: JOINING thread 7
[INFO]: uwufy_all in uwufetch.c:405: uwufing everything
[INFO]: uwu_kernel in uwufetch.c:314: uwufing kernel
[VARIABLE]: uwu_kernel in uwufetch.c:375: kernel = "Linuwu 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64             "
[INFO]: uwu_hw in uwufetch.c:380: uwufing hardware
[VARIABLE]: uwufy_all in uwufetch.c:411: user_info->cpu_model = "8 Cowes"
[INFO]: uwu_hw in uwufetch.c:380: uwufing hardware
[VARIABLE]: uwufy_all in uwufetch.c:413: user_info->model = "��|r��"
[VARIABLE]: print_ascii in uwufetch.c:569: ascii_file = "./res/ascii/fedora.txt"
                     benja@fedora-m1
        _____        OWOS     Fedowa
       /   __)\      MOWODEL  ��|r��
     > |  / <\ \     KEWNEL   Linuwu 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64             
    ___| ω|__/ /     CPUWU    8 Cowes
   / (_    _)_/      MEMOWY   4236 MiB/7565 MiB
  / /  |  |          WESOWUTION  1464x915
  \ \__/  |          SHEWW    /bin/bash
   \(_____/          PKGS     1361: 12 (flatpak), 1349 (rpm)
                     UWUPTIME 10h, 11m
                     ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇
[INFO]: main in uwufetch.c:788: Execution completed successfully!
ad-oliviero commented 1 year ago

Should be fixed in the latest commit

Radiicall commented 1 year ago
cc -O3 -DUWUFETCH_VERSION=\"2.0-66-ga382ca1\" -fPIC -c -o fetch.o fetch.c
ar rcs libfetch.a fetch.o
cc -O3 -DUWUFETCH_VERSION=\"2.0-66-ga382ca1\" -shared -o libfetch.so fetch.o
cc -O3 -DUWUFETCH_VERSION=\"2.0-66-ga382ca1\" -o uwufetch uwufetch.c libfetch.a
[benja@fedora-m1 uwufetch]$ ./uwufetch 
                     benja@fedora-m1
        _____        OWOS     Fedowa
       /   __)\      MOWODEL  
     > |  / <\ \     KEWNEL   Linuwu 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64  
    ___| ω|__/ /     CPUWU    8 Cowes
   / (_    _)_/      MEMOWY   4569 MiB/7565 MiB
  / /  |  |          WESOWUTION  1464x915
  \ \__/  |          SHEWW    /bin/bash
   \(_____/          PKGS     1369: 12 (flatpak), 1357 (rpm)
                     UWUPTIME 4m
                     ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇

It seems to still be the same in the latest commit

ad-oliviero commented 1 year ago

Could you run lscpu > lscpu.out and upload the .out file? I really don't know why it isn't working

Radiicall commented 1 year ago

lscpu.txt

Radiicall commented 1 year ago
[benja@fedora-m1 uwufetch]$ git pull
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6 (delta 4), reused 6 (delta 4), pack-reused 0
Unpacking objects: 100% (6/6), 545 bytes | 272.00 KiB/s, done.
From https://github.com/TheDarkBug/uwufetch
   a382ca1..9403f4c  main       -> origin/main
Updating a382ca1..9403f4c
Fast-forward
 Makefile | 2 +-
 fetch.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
[benja@fedora-m1 uwufetch]$ make debug ARGS="-v"
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-68-g9403f4c\" -D__DEBUG__ -fPIC -c -o fetch.o fetch.c
ar rcs libfetch.a fetch.o
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-68-g9403f4c\" -D__DEBUG__ -shared -o libfetch.so fetch.o
cc -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"2.0-68-g9403f4c\" -D__DEBUG__ -o uwufetch uwufetch.c libfetch.a
./uwufetch -v
[INFO]: main in uwufetch.c:743: version 2.0-68-g9403f4c
[INFO]: get_twidth in fetch.c:109: getting terminal width
[VARIABLE]: get_twidth in fetch.c:114: user_info->target_width = 50
[INFO]: get_info in fetch.c:616: getting os name from /etc/os-release
[VARIABLE]: get_info in fetch.c:636: user_info->os_name = "fedora"
[INFO]: get_info in fetch.c:680: getting username and hostname
[VARIABLE]: get_info in fetch.c:682: user_info->host = "fedora-m1"
[VARIABLE]: get_info in fetch.c:684: tmp_user = "benja"
[VARIABLE]: get_info in fetch.c:689: user_info->user = "benja"
[INFO]: get_info in fetch.c:693: getting shell
[VARIABLE]: get_info in fetch.c:695: tmp_shell = "/bin/bash"
[VARIABLE]: get_info in fetch.c:704: user_info->shell = "/bin/bash"
[INFO]: get_sys in fetch.c:125: getting sys_var struct
[INFO]: get_info in fetch.c:761: STARTING thread 0
[INFO]: get_info in fetch.c:761: STARTING thread 1
[INFO]: get_cpu in fetch.c:146: getting cpu name
[INFO]: get_info in fetch.c:761: STARTING thread 2
[INFO]: get_ram in fetch.c:180: getting ram
[INFO]: get_info in fetch.c:761: STARTING thread 3
[ERROR]: get_cpu in fetch.c:165: failed to get cpu name
[INFO]: get_info in fetch.c:761: STARTING thread 4
[VARIABLE]: get_cpu in fetch.c:173: user_info->cpu_model = "8 Cores"
[INFO]: get_res in fetch.c:341: getting resolution
[INFO]: get_info in fetch.c:761: STARTING thread 5
[INFO]: get_pkg in fetch.c:361: getting pkgs
[INFO]: get_pkg in fetch.c:397: trying pkgman 0: (apt)
[INFO]: get_info in fetch.c:761: STARTING thread 6
[INFO]: get_model in fetch.c:455: getting model
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/apt"
[WARNING]: get_pkg in fetch.c:417: pkgman (apt) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 1: (apk)
[INFO]: get_info in fetch.c:761: STARTING thread 7
[VARIABLE]: get_model in fetch.c:512: tmp_model[i] = ""
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/apk"
[VARIABLE]: get_model in fetch.c:512: tmp_model[i] = ""
[INFO]: get_info in fetch.c:771: JOINING thread 0
[VARIABLE]: get_ram in fetch.c:246: user_info->ram_total = 7565
[INFO]: get_ker in fetch.c:536: getting kernel
[VARIABLE]: get_upt in fetch.c:563: ((struct thread_varg*)argp)->thread_flags[7] = 0x1
[INFO]: get_upt in fetch.c:565: getting uptime
[VARIABLE]: get_upt in fetch.c:594: user_info->uptime = 0x1342
[VARIABLE]: get_ram in fetch.c:247: user_info->ram_used = 4270
[VARIABLE]: get_model in fetch.c:512: tmp_model[i] = ""
[VARIABLE]: get_ker in fetch.c:543: user_info->kernel = "Linux 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64"
[INFO]: get_info in fetch.c:771: JOINING thread 1
[INFO]: get_info in fetch.c:771: JOINING thread 2
[WARNING]: get_pkg in fetch.c:417: pkgman (apk) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 2: (emerge)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/qlist"
[WARNING]: get_pkg in fetch.c:417: pkgman (emerge) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 3: (flatpak)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/flatpak"
[VARIABLE]: get_model in fetch.c:512: tmp_model[i] = ""
[VARIABLE]: get_res in fetch.c:349: user_info->screen_width = 1464
[VARIABLE]: get_res in fetch.c:350: user_info->screen_height = 915
[INFO]: get_info in fetch.c:771: JOINING thread 3
[VARIABLE]: get_model in fetch.c:525: tmp_model[longest_model] = "Icestorm"
[VARIABLE]: get_model in fetch.c:529: user_info->model = "Apple MacBook Air (M1)"
[VARIABLE]: get_pkg in fetch.c:429: user_info->pkgman_name = "19 (flatpak)"
[INFO]: get_pkg in fetch.c:397: trying pkgman 4: (snap)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/snap"
[WARNING]: get_pkg in fetch.c:417: pkgman (snap) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 5: (guix)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/guix"
[WARNING]: get_pkg in fetch.c:417: pkgman (guix) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 6: (nix)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/nix-store"
[WARNING]: get_pkg in fetch.c:417: pkgman (nix) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 7: (pacman)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/pacman"
[WARNING]: get_pkg in fetch.c:417: pkgman (pacman) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 8: (pkg)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/pkg"
[WARNING]: get_pkg in fetch.c:417: pkgman (pkg) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 9: (pkg)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/pkg_info"
[WARNING]: get_pkg in fetch.c:417: pkgman (pkg) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 10: (port)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/port"
[WARNING]: get_pkg in fetch.c:417: pkgman (port) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 11: (brew-cellar)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/brew"
[WARNING]: get_pkg in fetch.c:417: pkgman (brew-cellar) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 12: (brew-cask)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/brew"
[WARNING]: get_pkg in fetch.c:417: pkgman (brew-cask) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 13: (rpm)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/rpm"
[VARIABLE]: get_pkg in fetch.c:429: user_info->pkgman_name = "19 (flatpak), 1370 (rpm)"
[INFO]: get_pkg in fetch.c:397: trying pkgman 14: (xbps)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/xbps-query"
[WARNING]: get_pkg in fetch.c:417: pkgman (xbps) executable not found!
[INFO]: get_pkg in fetch.c:397: trying pkgman 15: (zypper)
[VARIABLE]: get_pkg in fetch.c:398: current->command_path = "/usr/bin/zypper"
[WARNING]: get_pkg in fetch.c:417: pkgman (zypper) executable not found!
[INFO]: get_info in fetch.c:771: JOINING thread 4
[INFO]: get_info in fetch.c:771: JOINING thread 5
[INFO]: get_info in fetch.c:771: JOINING thread 6
[INFO]: get_info in fetch.c:771: JOINING thread 7
[INFO]: uwufy_all in uwufetch.c:405: uwufing everything
[INFO]: uwu_kernel in uwufetch.c:314: uwufing kernel
[VARIABLE]: uwu_kernel in uwufetch.c:375: kernel = "Linuwu 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64             "
[INFO]: uwu_hw in uwufetch.c:380: uwufing hardware
[VARIABLE]: uwufy_all in uwufetch.c:411: user_info->cpu_model = "8 Cowes"
[INFO]: uwu_hw in uwufetch.c:380: uwufing hardware
[VARIABLE]: uwufy_all in uwufetch.c:413: user_info->model = "Nyapple MacBook Air (M1)"
[VARIABLE]: print_ascii in uwufetch.c:569: ascii_file = "./res/ascii/fedora.txt"
                     benja@fedora-m1
        _____        OWOS     Fedowa
       /   __)\      MOWODEL  Nyapple MacBook Air (M1)
     > |  / <\ \     KEWNEL   Linuwu 6.2.0-0.rc3.asahi7.1.fc37.aarch64 aarch64  
    ___| ω|__/ /     CPUWU    8 Cowes
   / (_    _)_/      MEMOWY   4270 MiB/7565 MiB
  / /  |  |          WESOWUTION  1464x915
  \ \__/  |          SHEWW    /bin/bash
   \(_____/          PKGS     1389: 19 (flatpak), 1370 (rpm)
                     UWUPTIME 1h, 22m
                     ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇
[INFO]: main in uwufetch.c:788: Execution completed successfully!

woooo

ad-oliviero commented 1 year ago

Nice