Fails to build on Manjaro x64
Please complete the following template to help us investigate your issue. Developer time is very limited - incomplete issue reports may be ignored and deleted.
Note: Legacy builds are not supported. Any fixes will be applied to the latest engine builds.
Description
Fails to build on Manjaro x64 and can't find SDL2 even tho it is installed
./build.sh 4 amd64 ✔
-------------------------------------------------------
OpenBOR v3.0 Build 7142 (commit hash 7f6f175) - http://www.ChronoCrash.com
All rights reserved.
See LICENSE and README within OpenBOR root for details.
Copyright (c) 2004 - 2018 OpenBOR Team
-------------------------------------------------------
-------------------------------------------------------
Linux amd64 SDK (x86_64-pc-linux-gnu) Environment Loaded!
-------------------------------------------------------
Removing All LINUX Files...
Done!
Compiling LINUX Port: openbor.c...
Compiling LINUX Port: openborscript.c...
Compiling LINUX Port: sdl/control.c...
Compiling LINUX Port: sdl/sblaster.c...
/bin/sh: line 1: pkg-config: command not found
/bin/sh: line 1: pkg-config: command not found
/bin/sh: line 1: pkg-config: command not found
/bin/sh: line 1: pkg-config: command not found
In file included from openbor.h:23,
from openbor.c:14:
sdl/video.h:15:10: fatal error: SDL.h: No such file or directory
15 | #include "SDL.h"
| ^~~~~~~
compilation terminated.
In file included from sdl/sblaster.c:13:
sdl/sdlport.h:12:10: fatal error: SDL.h: No such file or directory
12 | #include <SDL.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile:713: sdl/sblaster.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:713: openbor.o] Error 1
In file included from source/globals.h:41,
from source/scriptlib/depends.h:13,
from source/scriptlib/Interpreter.h:11,
from source/openborscript/config.h:12,
from openborscript.c:30:
sdl/sdlport.h:12:10: fatal error: SDL.h: No such file or directory
12 | #include <SDL.h>
| ^~~~~~~
In file included from source/globals.h:41,
from sdl/control.c:14:
sdl/sdlport.h:12:10: fatal error: SDL.h: No such file or directory
12 | #include <SDL.h>
| ^~~~~~~
compilation terminated.
compilation terminated.
make: *** [Makefile:713: sdl/control.o] Error 1
make: *** [Makefile:713: openborscript.o] Error 1
Removing All LINUX Files...
Done!
Expected behavior
Builds and finds dependancies
- Platform OpenBOR v3.0 Build 6391
Can you confirm the sdl2 package name you installed ?
These are the required packages on debien: libsdl2-dev libsdl2-gfx-dev libpng-dev libvorbis-dev libvpx-dev
on Manjaro the package names are:
- sdl2
- sdl2_gfx
- libpng
- libvorbis
- libvpx
Debian and Ubuntu have the most retarded package names
you need to install the dev packages but i can't find any for arch you can try to install haskell-sdl2 if that does not work you will have to build sdl2 from source.
The dev packages are the packages I have installed, like I said Ubuntu and Debian have a really bizarre way of naming packages. I already meet the requirements but the build script is looking for the wrong thing. You need to adjust the compiling script. do you have normal build commands? does this use make?
Hi, if you like you can use my retro gaming script to install openbor: https://github.com/V0rt3x667/ArchyPie-Setup.
If you don't want to use that then you can also sed the source code as follows to build openbor. # Fix Locale Warning sed -e "s|en_US.UTF-8|C|g" -i "${md_build}/engine/version.sh"
# Disable Abort On Warnings & Errors
sed -e "s|-Werror||g" -i "${md_build}/engine/Makefile"
To clarify, substitute ${md_build} with the folder containing the openbor source code.
Also run the scripts in this order: ./version.sh ./build.sh 4
Hey there sorry I didn't get back to you, I can give it a go but if the instructions/code could be updated to be compiled on more modern distros that would be great
Sorry I don't maintain OpenBOR so I can't change how the software is built and installed.
Might update this to automatically satisfy dependencies based on your package manager as i wanted to update it to automatically make a appimage anyway.
Sorry I don't maintain OpenBOR so I can't change how the software is built and installed.
Oh ok no problem 🙂
Might update this to automatically satisfy dependencies based on your package manager as i wanted to update it to automatically make a appimage anyway.
Are you a maintainer if this repo? Could we just get normal build commands document?
I have tried again with both using the makefile and the build.sh file and they have both sadly failed
make BUILD_LINUX=1 ✔
Compiling LINUX Port: openbor.c...
/bin/sh: line 1: /gcc: No such file or directory
make: *** [Makefile:721: openbor.o] Error 127
./build.sh 4 127 ✘
-------------------------------------------------------
OpenBOR v4.0 Build 7575 (commit hash 8064d0e) - https://www.ChronoCrash.com
All rights reserved.
See LICENSE and README within OpenBOR root for details.
Copyright (c) OpenBOR Team
-------------------------------------------------------
ls: cannot access '/home/corey/.local/bin': No such file or directory
-------------------------------------------------------
ERROR - Linux x86 Environment Failed
SDK Installed?
-------------------------------------------------------
-------------------------------------------------------
Linux x86 SDK (x86_64-pc-linux-gnu) Environment Loaded!
-------------------------------------------------------
Removing All LINUX Files...
Done!
Compiling LINUX Port: openbor.c...
Compiling LINUX Port: openborscript.c...
Compiling LINUX Port: sdl/joysticks.c...
Compiling LINUX Port: sdl/control.c...
Compiling LINUX Port: sdl/sblaster.c...
Compiling LINUX Port: sdl/timer.c...
Compiling LINUX Port: sdl/sdlport.c...
openbor.c: In function ‘display_ents’:
openbor.c:29446:26: error: the comparison will always evaluate as ‘true’ for the pointer operand in ‘anim->platform + (sizetype)((long unsigned int)e->animpos * 32)’ must not be NULL [-Werror=address]
29446 | if ( anim->platform[e->animpos] )
| ^~~~
openbor.c: At top level:
openbor.c:30052:9: error: conflicting types for ‘find_ent_here’ due to enum/integer mismatch; have ‘entity *(entity *, float, float, e_entity_type, int (*)(entity *, entity *))’ [-Werror=enum-int-mismatch]
30052 | entity *find_ent_here(entity *exclude, float x, float z, e_entity_type types, int (*test)(entity *, entity *))
| ^~~~~~~~~~~~~
In file included from openbor.c:15:
openbor.h:4565:9: note: previous declaration of ‘find_ent_here’ with type ‘entity *(entity *, float, float, int, int (*)(entity *, entity *))’
4565 | entity *find_ent_here(entity *exclude, float x, float z, int types, int (*test)(entity *, entity *));
| ^~~~~~~~~~~~~
openbor.c:30321:5: error: conflicting types for ‘set_blockpain’ due to enum/integer mismatch; have ‘int(entity *, e_attack_types, int)’ [-Werror=enum-int-mismatch]
30321 | int set_blockpain(entity *ent, e_attack_types attack_type, int reset)
| ^~~~~~~~~~~~~
openbor.h:4575:5: note: previous declaration of ‘set_blockpain’ with type ‘int(entity *, int, int)’
4575 | int set_blockpain(entity *iBlkpain, int type, int reset);
| ^~~~~~~~~~~~~
Compiling LINUX Port: sdl/video.c...
Compiling LINUX Port: sdl/videocommon.c...
sdl/video.c:16:10: fatal error: SDL2_framerate.h: No such file or directory
16 | #include "SDL2_framerate.h" // Kratus (01-2023) Added a FPS limit option in the video settings
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:721: sdl/video.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make: *** [Makefile:720: openbor.o] Error 1
Removing All LINUX Files...
Done!
@DCurrent It would be better to have a cmake file to find the dependencies or tools you need to generate a proper makefile and build for Linux and all the architectures instead of making a script that would be a headache to support/update everything
@DCurrent ignoring "SDL2_framerate.h" if we can satisfy the other 5 errors/issues then we can support newer gcc versions ?
@msmalik681
So long as A) it compiles in Windows environment without modifications and B) we're fixing errors and not suppressing/ignoring them I'm fine with it.
Yeah it defiantly needs to be improved
So looking at this log the issues are with recent changes to the engine. Again ignore the "SDL2_framerate.h" as I recently tested and that was not showing up so maybe it is already fixed. The other errors I did see so looking at this log can you figure out why it is complaining ? or how we can fix it ?
Edit: its not displaying properly in my quote see the log posted last by corey bruce.
So looking at this log the issues are with recent changes to the engine. Again ignore the "SDL2_framerate.h" as I recently tested and that was not showing up so maybe it is already fixed. The other errors I did see so looking at this log can you figure out why it is complaining ? or how we can fix it ?
Edit: its not displaying properly in my quote see the log posted last by corey bruce.
did you want me to git pull and try again?
@coreybruce please join my discord https://discord.gg/P44baVdCHF I have made a channel for openbor linux.
@coreybruce please join my discord https://discord.gg/P44baVdCHF I have made a channel for openbor linux.
Ok but why do we need to be in Discord when we are already talking here?
Easier to collaborate or are you on the cronocrash forums ?
Easier to collaborate or are you on the cronocrash forums ?
Oh ok well I am already in the Discord server and in that channel
We're building Linux and Arm without any issues, and everything I'm looking at here appears pretty out of date at this point. I'm closing the ticket. @msmalik681, please let me know if there's more going on I'm not seeing.
The docker can compile linux arm just fine
Hi there, building still doesn't quite seem to work yet,I tried the build-all.sh script but ran into a issue where it can't find libraries I have installed
/usr/bin/ld: cannot find -lvorbisfile: No such file or directory
/usr/bin/ld: have you installed the static version of the vorbisfile library ?
/usr/bin/ld: cannot find -lvorbis: No such file or directory
/usr/bin/ld: have you installed the static version of the vorbis library ?
/usr/bin/ld: cannot find -logg: No such file or directory
/usr/bin/ld: have you installed the static version of the ogg library ?
/usr/bin/ld: cannot find -lvpx: No such file or directory
/usr/bin/ld: have you installed the static version of the vpx library ?
/usr/bin/ld: cannot find -lpng: No such file or directory
/usr/bin/ld: have you installed the static version of the png library ?
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/OpenBOR.dir/build.make:1669: OpenBOR] Error 1
make[1]: *** [CMakeFiles/Makefile2:122: CMakeFiles/OpenBOR.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Here are those libraries I already have installed that it can't find.
pacman -Q libvorbis
libvorbis 1.3.7-4
[corey@corey-notebook openbor]$ pacman -Q libpng
libpng 1.6.47-1
[corey@corey-notebook openbor]$ pacman -Q libvpx
libvpx 1.15.0-1
[corey@corey-notebook openbor]$ pacman -Q libogg
libogg 1.3.5-2
I believe this issue should still be open.
The new docker compiler works just fine please wait for the next stable release it will cover all linux architectures.