DCurrent / openbor

OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more!
http://www.chronocrash.com
BSD 3-Clause "New" or "Revised" License
901 stars 121 forks source link

Build fails on Debian GNU/Linux (aarch64) #232

Closed vanfanel closed 3 years ago

vanfanel commented 3 years ago

Hi,

OpenBOR used to build fine, but after a git pull and rebuild, I get this:

pi@raspberrypi:~/src/openbor/engine $ make BUILD_LINUX_LE_arm=1 GCC_TARGET=64 -j4
Compiling LINUX Port: openbor.c...
Compiling LINUX Port: openborscript.c...
Compiling LINUX Port: sdl/control.c...
Compiling LINUX Port: sdl/video.c...
sdl/video.c:16:10: fatal error: SDL2_framerate.h: No such file or directory
 #include "SDL2_framerate.h" //Kratus (29-04-21) Reversed the FPS limit to reduce CPU usage
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:714: sdl/video.o] Error 1
make: *** Waiting for unfinished jobs....
^Cmake: *** [Makefile:713: openbor.o] Interrupt

Seems that a file is missing, doing this on the git clone main directory won't return any results: find ./ -name SDL2_framerate.h

Any idea on what's going on?

DCurrent commented 3 years ago

@fgames9000 please have a look at this. It appears your framerate modification is causing some issues after all.

fgames9000 commented 3 years ago

@DCurrent strange, I was able to compile Windows, Android and PSP platforms with no problems. I never compiled a Linux version, but I will take a look.

fgames9000 commented 3 years ago

@DCurrent, @vanfanel

After many tests I discovered what is causing the problem. I saw that you are using Linux and due to this maybe you didn't unpacked the "win-sdk.7z" file. So, I found that the file "SDL2_framerate.h" is located at the following path:

..\openbor-master\tools\win-sdk\include\SDL2\SDL2_framerate.h

As a test, I deleted this file and "bingo", I got the same error as yours, even if I'm compiling the Windows port.

By default in Windows systems, when you run the "build.bat" by the first time, the "win-sdk" is automatically unpacked and the user does not need to do anything. I don't know how it works in the Linux systems, but it seems that you need to unpack it manually, same as older builds like 6330 or 6391.

Windows SDK (SVN) i686-pc Environment Loaded!

Removing All WIN Files... Done!

Compiling CoWINmpiling PoWrItN: Poopretn:bor .co.p.enbo.rs riptC.oc..m.pil ing WIN CPoormpilingt: WIsdlN/jo ysPtoirctk:s. c.s..dl/ .c...ol Compiling WIN Port: sdl/sblaster.c... Compiling WIN Port: sdl/timer.c... Compiling WIN Port: sdl/sdlport.c... Compiling WIN Port: sdl/video.c... Compiling WIN Port: sdl/videocommon.c... sdl/video.c:16:10: fatal error: SDL2_framerate.h: No such file or directory

include "SDL2_framerate.h" //Kratus (29-04-21) Reversed the FPS limit to reduce CPU usage

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

compilation terminated. ..\tools\bin\make.exe: [sdl/video.o] Error 1 ..\tools\bin\make.exe: Waiting for unfinished jobs....

You can unpack the "win-sdk.7z" file directly in the following folder:

..\openbor-master\tools\win-sdk\

Please, let me know if it worked, I don't have a Linux machine to make tests.

EDIT: I found another place that has the same file "SDL2_framerate.h":

..\openbor-master\tools\devkitpro\libogc\include\SDL\

In this place, you will need to unpack the "devkitpro.7z" file.

vanfanel commented 3 years ago

@fgames9000 It would be great if OpenBOR could be built without having to decompress windows-related files, as it used to be possible. Thanks for looking at the issue.

The part that goes like: "it seems you are using Linux and due to this..." does not make much sense, I think. GNU/Linux is a first-class citizen when it comes to SDL2 software. Using Linux is not a problem: I would say Windows is the problem here.

fgames9000 commented 3 years ago

@vanfanel Oh, I didn't mean that Linux is a "problem". I only meant that you are using a different system than me. I'm not a Linux user, and that's it.

I will talk with the dev team about your suggestion, thanks. Please, let me know if the solution I posted worked for you.

vanfanel commented 3 years ago

@fgames9000 Ah yes, that worked. Sorry, maybe I misinterpreted your words :)

fgames9000 commented 3 years ago

@vanfanel It's all right. I'm glad it worked :)

msmalik681 commented 3 years ago

@vanfanel there is no issue compiling for Debian Linux both x86 and amd64 I use Pop OS 20.04 and I compiled just fine using gcc-7 and installing the correct dependencies: sudo apt install -y libsdl2-dev libsdl2-gfx-dev libpng-dev libvorbis-dev libvpx-dev

Your log shows you are compiling on a rasperry pi with a arm cpu is that correct ?

vanfanel commented 3 years ago

@msmalik681 Yes, you are right, I am building on Debian aarch64 on a Raspberry Pi.

DCurrent commented 3 years ago

Thanks @fgames9000!