Closed danielt3 closed 7 months ago
I will look into it.
I'm not a super-duper-blaster shell scripting ninja master but, from what I can see, on line 155 in build.sh
the script environ.sh
is called with parameter 4 to setup the build environment. It fails because the error message in lines 186 and 187 in environ.sh
are shown in the log but when build.sh
continues, the test in line 156 seem to fail to detect that environ.sh
failed. I'm not sure how to fix this one, but I will keep trying.
I just noticed that I have some mingw-w64
toolchain installed in my machine and I'm investigating if this can mess with the detection by the build scripts.
Having the same issue, it looks like it's not finding 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!
@coreybruce this us not really the same issue but ok. What distro are you using and what sdl2 package did you install or did you build from source?
@coreybruce this us not really the same issue but ok. What distro are you using and what sdl2 package did you install or did you build from source?
Oh I'm sorry, I thought this would have been a similar issue, would you like me to move it to a new issue post?
Manjaro x64 and no, I am using SDL2 2.26.4-1 from the official repo
If you could open a new issue please it would avoid confusion.
If you could open a new issue please it would avoid confusion.
Ok done
@msmalik681, I've been closing dead end issues. Did you ever have any progress on this?
Current version has some building issues, I will have to test it again but I made a seperate issue post about issues building the latest version on arm64
@msmalik681, I've been closing dead end issues. Did you ever have any progress on this?
Yep this is still a issue, I am unable to build OpenBor, can you please fix this as I want ot compile this for Linux i686, x64 and Arm64
./build.sh 4 ✔
-------------------------------------------------------
OpenBOR v4.0 Build 7587 (commit hash 16939d7) - 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...
openbor.c: In function ‘display_ents’:
openbor.c:29440: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]
29440 | if ( anim->platform[e->animpos] )
| ^~~~
Compiling LINUX Port: sdl/sdlport.c...
openbor.c: At top level:
openbor.c:30046: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]
30046 | 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:30315:5: error: conflicting types for ‘set_blockpain’ due to enum/integer mismatch; have ‘int(entity *, e_attack_types, int)’ [-Werror=enum-int-mismatch]
30315 | 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...
Compiling LINUX Port: sdl/threads.c...
Compiling LINUX Port: sdl/menu.c...
Compiling LINUX Port: sdl/opengl.c...
Compiling LINUX Port: sdl/loadgl.c...
Compiling LINUX Port: source/adpcmlib/adpcm.c...
Compiling LINUX Port: source/gfxlib/2xSaI.c...
Compiling LINUX Port: source/gfxlib/bilinear.c...
Compiling LINUX Port: source/gfxlib/dotmatrix.c...
Compiling LINUX Port: source/gfxlib/gfx.c...
Compiling LINUX Port: source/gfxlib/hq2x.c...
Compiling LINUX Port: source/gfxlib/scale2x.c...
Compiling LINUX Port: source/gfxlib/scanline.c...
Compiling LINUX Port: source/gfxlib/simple2x.c...
Compiling LINUX Port: source/gfxlib/tv2x.c...
Compiling LINUX Port: source/gamelib/draw.c...
Compiling LINUX Port: source/gamelib/draw16.c...
Compiling LINUX Port: source/gamelib/draw32.c...
Compiling LINUX Port: source/gamelib/font.c...
Compiling LINUX Port: source/gamelib/translation.c...
Compiling LINUX Port: source/gamelib/anigif.c...
Compiling LINUX Port: source/gamelib/bitmap.c...
Compiling LINUX Port: source/gamelib/screen.c...
Compiling LINUX Port: source/gamelib/screen16.c...
Compiling LINUX Port: source/gamelib/screen32.c...
Compiling LINUX Port: source/gamelib/loadimg.c...
Compiling LINUX Port: source/gamelib/palette.c...
Compiling LINUX Port: source/gamelib/packfile.c...
Compiling LINUX Port: source/gamelib/filecache.c...
Compiling LINUX Port: source/gamelib/pixelformat.c...
Compiling LINUX Port: source/gamelib/soundmix.c...
Compiling LINUX Port: source/gamelib/spriteq.c...
Compiling LINUX Port: source/gamelib/sprite.c...
Compiling LINUX Port: source/gamelib/spritex8p16.c...
Compiling LINUX Port: source/gamelib/spritex8p32.c...
Compiling LINUX Port: source/gamelib/models.c...
Compiling LINUX Port: source/gamelib/transform.c...
Compiling LINUX Port: source/gamelib/filters.c...
Compiling LINUX Port: source/stringptr.c...
Compiling LINUX Port: source/utils.c...
Compiling LINUX Port: source/stristr.c...
Compiling LINUX Port: source/omath.c...
Compiling LINUX Port: source/scriptlib/StackedSymbolTable.c...
source/utils.c: In function ‘checkAlloc’:
source/utils.c:307:9: error: ‘mallinfo’ is deprecated [-Werror=deprecated-declarations]
307 | writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena);
| ^~~~~~~~~~~~~~
In file included from source/utils.c:13:
/usr/include/malloc.h:114:24: note: declared here
114 | extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED;
| ^~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:721: source/utils.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!
make BUILD_LINUX=1 -j4 ✔
Compiling LINUX Port: openbor.c...
Compiling LINUX Port: openborscript.c...
Compiling LINUX Port: sdl/joysticks.c...
Compiling LINUX Port: sdl/control.c...
/bin/sh: line 1: /gcc: No such file or directory
/bin/sh: line 1: /gcc: No such file or directory
/bin/sh: line 1: /gcc: No such file or directory
make: *** [Makefile:721: openbor.o] Error 127
make: *** Waiting for unfinished jobs....
make: *** [Makefile:721: openborscript.o] Error 127
make: *** [Makefile:721: sdl/joysticks.o] Error 127
/bin/sh: line 1: /gcc: No such file or directory
make: *** [Makefile:721: sdl/control.o] Error 127
@coreybruce
Out of courtesy I'll be honest with you. I don’t give two spits about the Linux port. I didn't want it, didn't add it, and I'm not fixing it. You'll just have to wait on @msmalik681. He did push an update for the next build, but I don't know if it does anything for this.
@coreybruce
Out of courtesy I'll be honest with you. I don’t give two spits about the Linux port. I didn't want it, didn't add it, and I'm not fixing it. You'll just have to wait on @msmalik681. He did push an update for the next build, but I don't know if it does anything for this.
Oh I'm curious to why wouldn't you care about a Linux port or want it? it would be beneficial to have Linux supported and having the engine properly multi-platform as it is open source. :smiley:
Oh alright well I hope @msmalik681 can help out :+1: :smile:
@coreybruce my recent pull request fixes issue with mallinfo and I have managed to compile the engine for linux so I am not sure why you have them other errors you could try to compile my branch and report back.
@coreybruce my recent pull request fixes issue with mallinfo and I have managed to compile the engine for linux so I am not sure why you have them other errors you could try to compile my branch and report back.
Ah ok sure thing, is your branch Malik's_Updates
?
Yes
Yes
Yeah idk what $(LNXDEV)/$(PREFIX)gcc
is pointing to but it thinks gcc is at /gcc
, if I set the cc path to /bin/gcc
I get this log where it can't find version .h
. By the way WHat Linux distro did you test this on?
make BUILD_LINUX=1 -j6
Compiling LINUX Port: openbor.c...
Compiling LINUX Port: openborscript.c...
Compiling LINUX Port: sdl/control.c...
Compiling LINUX Port: sdl/timer.c...
In file included from openborscript.c:31:
openbor.h:44:13: fatal error: version.h: No such file or directory
44 | #include "version.h"
| ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:720: openborscript.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from openbor.c:15:
openbor.h:44:13: fatal error: version.h: No such file or directory
44 | #include "version.h"
| ^~~~~~~~~~~
compilation terminated.
In file included from sdl/control.c:17:
./openbor.h:44:13: fatal error: version.h: No such file or directory
44 | #include "version.h"
| ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:720: openbor.o] Error 1
make: *** [Makefile:720: sdl/control.o] Error 1
I'm not sure why the make file is this over complicated when it could be achieved by using cmake to find and set your library files and build dependencies for you.
I compiled in linux mint and you dont use "make" instead use the supplied "build.sh" file to compile.
Right well I wouldn't recommend a build script as it's going to be a pain to maintain and/or be probmatic compared to using cmake and then make, a make script shouldn't need a script to work. That's just my friendly suggestion. :smiley:
Anyways here is my log, it sadly didn't finis hand I did notice some error warnings
./build.sh 4
-------------------------------------------------------
OpenBOR v4.0 Build 7537 (commit hash 9e737b2) - 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...
openbor.c: In function ‘display_ents’:
Compiling LINUX Port: sdl/sdlport.c...
openbor.c:29379: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]
29379 | if ( anim->platform[e->animpos] )
| ^~~~
openbor.c: At top level:
openbor.c:29983: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]
29983 | 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:4586:9: note: previous declaration of ‘find_ent_here’ with type ‘entity *(entity *, float, float, int, int (*)(entity *, entity *))’
4586 | entity *find_ent_here(entity *exclude, float x, float z, int types, int (*test)(entity *, entity *));
| ^~~~~~~~~~~~~
openbor.c:30251:5: error: conflicting types for ‘set_blockpain’ due to enum/integer mismatch; have ‘int(entity *, e_attack_types, int)’ [-Werror=enum-int-mismatch]
30251 | int set_blockpain(entity *ent, e_attack_types attack_type, int reset)
| ^~~~~~~~~~~~~
openbor.h:4596:5: note: previous declaration of ‘set_blockpain’ with type ‘int(entity *, int, int)’
4596 | int set_blockpain(entity *iBlkpain, int type, int reset);
| ^~~~~~~~~~~~~
Compiling LINUX Port: sdl/video.c...
Compiling LINUX Port: sdl/videocommon.c...
Compiling LINUX Port: sdl/threads.c...
Compiling LINUX Port: sdl/menu.c...
Compiling LINUX Port: sdl/opengl.c...
Compiling LINUX Port: sdl/loadgl.c...
Compiling LINUX Port: source/adpcmlib/adpcm.c...
Compiling LINUX Port: source/gfxlib/2xSaI.c...
Compiling LINUX Port: source/gfxlib/bilinear.c...
Compiling LINUX Port: source/gfxlib/dotmatrix.c...
Compiling LINUX Port: source/gfxlib/gfx.c...
Compiling LINUX Port: source/gfxlib/hq2x.c...
Compiling LINUX Port: source/gfxlib/scale2x.c...
Compiling LINUX Port: source/gfxlib/scanline.c...
Compiling LINUX Port: source/gfxlib/simple2x.c...
Compiling LINUX Port: source/gfxlib/tv2x.c...
Compiling LINUX Port: source/gamelib/draw.c...
Compiling LINUX Port: source/gamelib/draw16.c...
Compiling LINUX Port: source/gamelib/draw32.c...
Compiling LINUX Port: source/gamelib/font.c...
Compiling LINUX Port: source/gamelib/translation.c...
Compiling LINUX Port: source/gamelib/anigif.c...
Compiling LINUX Port: source/gamelib/bitmap.c...
Compiling LINUX Port: source/gamelib/screen.c...
Compiling LINUX Port: source/gamelib/screen16.c...
Compiling LINUX Port: source/gamelib/screen32.c...
Compiling LINUX Port: source/gamelib/loadimg.c...
Compiling LINUX Port: source/gamelib/palette.c...
Compiling LINUX Port: source/gamelib/packfile.c...
Compiling LINUX Port: source/gamelib/filecache.c...
Compiling LINUX Port: source/gamelib/pixelformat.c...
Compiling LINUX Port: source/gamelib/soundmix.c...
Compiling LINUX Port: source/gamelib/spriteq.c...
Compiling LINUX Port: source/gamelib/sprite.c...
Compiling LINUX Port: source/gamelib/spritex8p16.c...
Compiling LINUX Port: source/gamelib/spritex8p32.c...
Compiling LINUX Port: source/gamelib/models.c...
Compiling LINUX Port: source/gamelib/transform.c...
Compiling LINUX Port: source/gamelib/filters.c...
Compiling LINUX Port: source/stringptr.c...
Compiling LINUX Port: source/utils.c...
Compiling LINUX Port: source/stristr.c...
Compiling LINUX Port: source/omath.c...
Compiling LINUX Port: source/scriptlib/StackedSymbolTable.c...
Compiling LINUX Port: source/scriptlib/ScriptVariant.c...
Compiling LINUX Port: source/scriptlib/SymbolTable.c...
Compiling LINUX Port: source/scriptlib/Instruction.c...
Compiling LINUX Port: source/scriptlib/Interpreter.c...
Compiling LINUX Port: source/scriptlib/ImportCache.c...
Compiling LINUX Port: source/scriptlib/ParserSet.c...
Compiling LINUX Port: source/scriptlib/Parser.c...
Compiling LINUX Port: source/scriptlib/Lexer.c...
Compiling LINUX Port: source/scriptlib/Stack.c...
Compiling LINUX Port: source/scriptlib/List.c...
Compiling LINUX Port: source/preprocessorlib/pp_lexer.c...
Compiling LINUX Port: source/preprocessorlib/pp_parser.c...
Compiling LINUX Port: source/preprocessorlib/pp_expr.c...
Compiling LINUX Port: source/openborscript/commands.c...
Compiling LINUX Port: source/openborscript/animation.c...
Compiling LINUX Port: source/openborscript/axis.c...
Compiling LINUX Port: source/openborscript/binding.c...
Compiling LINUX Port: source/openborscript/drawmethod.c...
Compiling LINUX Port: source/openborscript/collision_attack.c...
Compiling LINUX Port: source/openborscript/common_property.c...
Compiling LINUX Port: source/openborscript/collision_body.c...
Compiling LINUX Port: source/openborscript/collision_entity.c...
Compiling LINUX Port: source/openborscript/colorset.c...
Compiling LINUX Port: source/openborscript/constants.c...
Compiling LINUX Port: source/openborscript/entity.c...
Compiling LINUX Port: source/openborscript/faction.c...
Compiling LINUX Port: source/openborscript/global_config.c...
Compiling LINUX Port: source/openborscript/icon.c...
Compiling LINUX Port: source/openborscript/index.c...
Compiling LINUX Port: source/openborscript/layer.c...
Compiling LINUX Port: source/openborscript/level.c...
Compiling LINUX Port: source/openborscript/math.c...
Compiling LINUX Port: source/openborscript/model.c...
Compiling LINUX Port: source/openborscript/spawn_hud.c...
Compiling LINUX Port: source/openborscript/status_dial.c...
Compiling LINUX Port: source/openborscript/recursive_damage.c...
cc1: all warnings being treated as errors
make: *** [Makefile:720: openbor.o] Error 1
make: *** Waiting for unfinished jobs....
Removing All LINUX Files...
Done!
it worked fine using gcc 11.4.0 what version of gcc are you using ?
it worked fine using gcc 11.4.0 what version of gcc are you using ?
Oh wow 11.4.0? I'm using 13.2.1-3, sounds like it doesn't work with newer versions of GCC, man this is why Ubuntu based distros suck, they do things in such a problematic way or so far behind on packages that it causes issues... maybe you should test it on Manjaro so we can debug it together easier.
Normally not recommend but try to ignore all errors and compile
Normally not recommend but try to ignore all errors and compile
Oh ok how do it ignore the errors? it won't finish compiling and fails are you can see in the log
Same issue happened on PeppermintOS (Debian i686.) Wait how does Debian have a newer version of GCC then Mint?! Debian has version 13.2.0-10 wtf :laughing:
Switched to your branch, by the way don't use apostasies in branch names, it causes issues and you have to use quotations to solve the problem and make it work when doing git checkout..
Anyways I switched to your branch and ran into the same issues..
Just compiled x86 and x64 on latest release ( https://github.com/DCurrent/openbor/releases/tag/v7533 ) on Ubuntu 18.04 clean install just ran:
sudo apt update && sudo apt upgrade
sudo apt install -y libsdl2-dev libsdl2-gfx-dev libpng-dev libvorbis-dev libvpx-dev
I will add compiling instructions to the source code. I recommend when compiling anything complicated like wine always use a virtual machine so you don't break anything in your operation system. I will test manjaro next.
Just compiled x86 and x64 on latest release ( https://github.com/DCurrent/openbor/releases/tag/v7533 ) on Ubuntu 18.04 clean install just ran:
* sudo apt update && sudo apt upgrade * sudo apt install -y libsdl2-dev libsdl2-gfx-dev libpng-dev libvorbis-dev libvpx-dev
I will add compiling instructions to the source code. I recommend when compiling anything complicated like wine always use a virtual machine so you don't break anything in your operation system. I will test manjaro next.
You might want to add the list of dependencies for Arch based systems as well on those instructions
What version of GCC does Ubuntu use? also I have been compiling on the hardware no VM's or wine were involved.
@coreybruce yeah it looks like gcc is the issue here could not get it to compile on manjaro and when trying to downgrade gcc I broke the system so I would not recommend that. Like I said before a vm might be a better choice for compiling or use the appimage. And you did kind of hijack this thread the original issue was something else.
@danielt3 I have added exit codes so when a environment fails the compile process will stop.
@coreybruce yeah it looks like gcc is the issue here could not get it to compile on manjaro and when trying to downgrade gcc I broke the system so I would not recommend that. Like I said before a vm might be a better choice for compiling or use the appimage. And you did kind of hijack this thread the original issue was something else.
@danielt3 I have added exit codes so when a environment fails the compile process will stop.
Don't think it's a GCC issue and more the code needs to be updated in the make file to support newer versions of GCC and I don't believe this should be closed as msmalik681 has pointed out issues in the other post but lets continue this discussion in the other issue post here : https://github.com/DCurrent/openbor/issues/278
Sorry I didn't mean to hijack the post.
Description
The build for Linux/x86 fails to fail when compiling from an AMD64 environment and dependencie are not found.
If you are on an amd64 and builds for AMD64, the build works fine;
If you are on an amd64 and builds for x86 the build emits an error message but carries on and produces an amd64 executable. Shouldn't it stop when the error is found? Build logs are attached and I'm going to open a new issue for dealing with this new question. Is that OK?
Debugging
Please, see the log build.
And the resulting binary is an actual x86_64 ELF:
Reproduce
Expected behavior
I was expecting the x86 build fails when dependencies are not found and not to continue the build and get an AMD64 executable in ./releases/LINUX/OpenBOR but I'm not sure if this is the intended behavior for this particular situation.
Version
Linux x86_64 (Debian 10)
7141 (b00efbc)