raduprv / Eternal-Lands

http://www.eternal-lands.com
Other
155 stars 56 forks source link

Updates to Linux Makefile (maybe others) needed #203

Closed feeltheburn closed 2 months ago

feeltheburn commented 1 year ago

1) No package 'openssl' found (I installed libopenssl-devel) 2) No package 'SDL2_ttf' found (I installed SDL2_ttf-devel) 3) fsaa/fsaa_glx.c:2:10: fatal error: X11/extensions/Xrandr.h: No such file or directory

include <X11/extensions/Xrandr.h>

      ^~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. (I installed libXrandr-devel)

Unsure how to correctly update Makefile.linux, but these three errors are received after required programs are checked. The first two just keeps continuing to try and compile, erroring out on each file while the third terminates.

("I installed" is the name of the RPM in OpenSUSE that I installed to get past the compile error. These aren't always the named the same as what's in the required list thus my not knowing how to correctly require these items.)

pjbroad commented 1 year ago

Does this patch help? It should not be needed, except the xrand bit perhaps.


diff --git a/Makefile.linux b/Makefile.linux
index 7d8c18ce..f702a205 100644
--- a/Makefile.linux
+++ b/Makefile.linux
@@ -19,6 +19,7 @@ OPTIONS = -DLINUX -DELC $(foreach FEATURE, $(FEATURES), -D$(FEATURE)) -D_7ZIP_ST
        $(shell pkg-config sdl2 --cflags) \
        $(shell pkg-config SDL2_net --cflags) \
        $(shell pkg-config SDL2_image --cflags) \
+       $(shell pkg-config SDL2_ttf --cflags) \
        $(shell pkg-config libxml-2.0 --cflags) \
        $(shell pkg-config cal3d --cflags) \
        $(shell pkg-config gl --cflags) \
@@ -27,6 +28,8 @@ OPTIONS = -DLINUX -DELC $(foreach FEATURE, $(FEATURES), -D$(FEATURE)) -D_7ZIP_ST
        $(shell pkg-config vorbis --cflags) \
        $(shell pkg-config vorbisfile --cflags) \
        $(shell pkg-config zlib --cflags) \
+       $(shell pkg-config openssl --cflags) \
+       $(shell pkg-config xrandr --cflags) \
        $(foreach FEATURE, $(FEATURES), $($(FEATURE)_CFLAGS))

 CFLAGS=$(PLATFORM) $(CWARN) -O1 -ggdb -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
@@ -37,6 +40,7 @@ LDFLAGS=$(shell pkg-config sdl2 --libs) \
        $(shell pkg-config libxml-2.0 --libs) \
        $(shell pkg-config SDL2_net --libs) \
        $(shell pkg-config SDL2_image --libs) \
+       $(shell pkg-config SDL2_ttf --libs) \
        $(shell pkg-config cal3d --libs) \
        $(shell pkg-config gl --libs) \
        $(shell pkg-config glu --libs) \
@@ -44,6 +48,8 @@ LDFLAGS=$(shell pkg-config sdl2 --libs) \
        $(shell pkg-config vorbis --libs) \
        $(shell pkg-config vorbisfile --libs) \
        $(shell pkg-config zlib --libs) \
+       $(shell pkg-config openssl --libs) \
+       $(shell pkg-config xrandr --libs) \
        $(foreach FEATURE, $(FEATURES), $($(FEATURE)_LIBS)) \
        $(shell pkg-config x11 --libs) -lm -lstdc++
pjbroad commented 1 year ago

Rereading your issue, I may be confused, does it compile cleanly once the libraries are installed?

feeltheburn commented 1 year ago

Once they're installed, it compiles fine. They're just not checked for initially before compiling starts.

And for the first two, it wouldn't stop compiling with an error, just continue trying to compile the rest of the files.

No time to test atm but will do later. It does appear from looking at the changes that it's covering the issues though.

feeltheburn commented 2 months ago

This seems to be okay now, closing.