ad-oliviero/uwufetch

Can't compile on M1 MacBook Air

dmelka1 opened this issue · 4 comments

Errors:
lukaszdrob@ukaszs-MacBook-Air uwufetch % make build
cc -O3 -o uwufetch uwufetch.c
uwufetch.c:536:2: error: use of undeclared identifier 'uptime'
uptime = uptime_apple();
^
uwufetch.c:664:2: error: use of undeclared identifier 'ram_used'
ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
^
uwufetch.c:733:40: error: use of undeclared identifier 'host_model'; did you mean 'strmode'?
if (sscanf(line, HOSTCTL ": %[^\n]", host_model)) break;
^~~~~~~~~~
strmode
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:164:7: note: 'strmode' declared here
void strmode(int __mode, char *__bp);
^
uwufetch.c:978:2: error: use of undeclared identifier 'ram_used'
ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
^
uwufetch.c:979:2: error: use of undeclared identifier 'ram_total'
ram_total = mem_buffer / 1024 / 1024;
^
5 errors generated.
make: *** [build] Error 1
lukaszdrob@ukaszs-MacBook-Air uwufetch %

You should be able to compile with 258357a

nope, but some new errors appeared:

cc -O3 -o uwufetch uwufetch.c
uwufetch.c:733:49: error: member reference type 'struct info' is not a pointer; did you mean to use '.'?
if (sscanf(line, HOSTCTL ": %[^\n]", user_info->host_model)) break;
~~~~~~~~~^~
.
uwufetch.c:978:11: error: member reference type 'struct info' is not a pointer; did you mean to use '.'?
user_info->ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
~~~~~~~~~^~
.
uwufetch.c:978:23: error: expression is not assignable
user_info->ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024);
~~~~~~~~~~~~~~~~~~~ ^
uwufetch.c:979:11: error: member reference type 'struct info' is not a pointer; did you mean to use '.'?
user_info->ram_total = mem_buffer / 1024 / 1024;
~~~~~~~~~^~
.
uwufetch.c:979:23: error: expression is not assignable
user_info->ram_total = mem_buffer / 1024 / 1024;
~~~~~~~~~~~~~~~~~~~~ ^
5 errors generated.
make: *** [build] Error 1

Now it should compile (I'm sorry for these bugs, I haven't a mac to try and debug uwufetch)

It compiled now and works without any issues. Thanks for spending your time on my ticket.