Cogmasters / concord

A Discord API wrapper library made in C
https://cogmasters.github.io/concord/
MIT License
523 stars 30 forks source link

Make Error - Windows, Cygwin #144

Closed ilikecatgirls closed 1 year ago

ilikecatgirls commented 1 year ago

Describe the bug

I was trying to build the bot and encountered a Make error, that I don't know how to solve. I tried running the Cygwin terminal as administrator along with cygstart --action=runas make and no luck.

Expected behavior

Expected it to be built just fine.

To Reproduce

Install Cygwin normally, along with the packages required by the repository, clone the repository, enter, run make and this happens.

Version

Latest, as of writing this. Windows 10 64-bit.

Stack trace

make[1]: Entering directory 'C:/cygwin64/home/user11/concord/core' cc -O2 -std=c99 -pthread -D_XOPEN_SOURCE=600 -DLOG_USE_COLOR -I. -I/usr/local/in clude -c -o cog-utils.o cog-utils.c process_begin: CreateProcess(C:\cygwin64\bin\cc, cc -O2 -std=c99 -pthread -D_XOP EN_SOURCE=600 -DLOG_USE_COLOR -I. -I/usr/local/include -c -o cog-utils.o cog-uti ls.c, ...) failed. make (e=5): Access is denied. make[1]: [: cog-utils.o] Error 5 make[1]: Leaving directory 'C:/cygwin64/home/user11/concord/core' make: [Makefile:26: static] Error 2

ghost commented 1 year ago

Check the permissions on your C:\cygwin64\bin\cc, to me it looks like the file may not be executable.

ghost commented 1 year ago

it looks like cc is a symlink to gcc.exe, but for some reason it is trying to load the symlink as an executable instead of what it links to. try doing make CC=gcc or make CC=gcc.exe.

ilikecatgirls commented 1 year ago

@minneelyyyy It seems like using make CC=gcc worked. Thank you.