ad-oliviero / uwufetch

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

Can't build on MacOwOs #147

Closed KripC2160 closed 2 years ago

KripC2160 commented 2 years ago

I tried to install uwufetch on MacOwOs however when I try to make build, it shows this error.

cc -O3 -o uwufetch uwufetch.c uwufetch.c:559:2: error: implicit declaration of function 'sysinfo' is invalid in C99 [-Werror,-Wimplicit-function-declaration] sysinfo(&sys); // to get uptime ^ uwufetch.c:559:11: error: use of undeclared identifier 'sys' sysinfo(&sys); // to get uptime ^

I am currently using Macbook Air with Apple M1 chip and MacOwOs Big Sur version 11.3.1

elegantShock2258 commented 2 years ago

provide output of gcc -v and make -v

KripC2160 commented 2 years ago

for gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.5 (clang-1205.0.22.11) Target: arm64-apple-darwin20.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

for make -v:

GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

elegantShock2258 commented 2 years ago

you did make install right? what does make debug show?

i suppose you need to update your gcc or make....

KripC2160 commented 2 years ago

this is the result from make debug cc -Wall -Wextra -g -pthread -o uwufetch uwufetch.c uwufetch.c:559:2: error: implicit declaration of function 'sysinfo' is invalid in C99 [-Werror,-Wimplicit-function-declaration] sysinfo(&sys); // to get uptime ^ uwufetch.c:559:11: error: use of undeclared identifier 'sys' sysinfo(&sys); // to get uptime I also installed gcc using brew just in case but it did not change the outcome

KripC2160 commented 2 years ago

for make install (I didn't try that since it was process after make build) the result was this mkdir -p /usr/local/bin /usr/local/lib/uwufetch /usr/local/share/man/man1 cp uwufetch /usr/local/bin/uwufetch cp: uwufetch: No such file or directory make: *** [install] Error 1

ad-oliviero commented 2 years ago

Since I have no way to test this on a mac, could you try to build the _mac_ostesting branch?

KripC2160 commented 2 years ago

It works!

Screen Shot 2021-10-15 at 7 19 02

however when I leave the uwufetch directory it doesn't work but I think it's because I downloaded it on Desktop

Screen Shot 2021-10-15 at 7 19 23
LukeHuckman commented 2 years ago

however when I leave the uwufetch directory it doesn't work but I think it's because I downloaded it on Desktop

Yeah that's normal, because you don't have uwufetch included in your PATH environment variable.

elegantShock2258 commented 2 years ago

great! now do sudo make install and if it works , you should close the issue!

KripC2160 commented 2 years ago

alright thank you for you help!