snesrev / smw

Smw
https://discord.gg/AJJbJAzNNJ
Other
427 stars 42 forks source link

macOS Ventura (13.5.1) make errors #32

Open yvan1990 opened 1 year ago

yvan1990 commented 1 year ago

Describe your bug here. And how to reproduce it.

Make errors:

cc -c -O2 -fno-strict-aliasing -Werror  -I/usr/local/include/SDL2 -D_THREAD_SAFE -DSYSTEM_VOLUME_MIXER_AVAILABLE=0 -I. -Wno-strict-prototypes smb1/smb1_00.c -o smb1/smb1_00.o
smb1/smb1_00.c:963:12: error: result of comparison of constant 7 with expression of type 'bool' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
    if (v5 < 7)
        ~~ ^ ~
1 error generated.
make: *** [smb1/smb1_00.o] Error 1

What is your build target?

Mac

M0REKZ commented 1 year ago

Try changing the compiler to gcc (installed from brew), that worked for me

cdeletre commented 10 months ago

Not a nice fix but you can remove the -Werror in Makefile (line 7) to get it built on MacOS Ventura (with clang)

CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-O2 -fno-strict-aliasing -Werror )

becomes

CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-O2 -fno-strict-aliasing )