openbor
openbor copied to clipboard
Linux x86 build fails to fail when dependencies are not found
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.
danielt3@debian:~/devel/openbor-git/engine$ ./build.sh 4 x86
-------------------------------------------------------
OpenBOR v3.0 Build 7141 (commit hash b00efbc) - http://www.ChronoCrash.com
All rights reserved.
See LICENSE and README within OpenBOR root for details.
Copyright (c) 2004 - 2018 OpenBOR Team
-------------------------------------------------------
-------------------------------------------------------
ERROR - Linux x86 Environment Failed
SDK Installed?
-------------------------------------------------------
-------------------------------------------------------
Linux x86 SDK (x86_64-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...
Compiling LINUX Port: sdl/timer.c...
Compiling LINUX Port: sdl/sdlport.c...
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/collision_body.c...
Compiling LINUX Port: source/openborscript/collision_entity.c...
Compiling LINUX Port: source/openborscript/constants.c...
Compiling LINUX Port: source/openborscript/entity.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/recursive_damage.c...
Compiling LINUX Port: source/openborscript/string.c...
Compiling LINUX Port: source/ramlib/ram.c...
Compiling LINUX Port: source/randlib/rand32.c...
Compiling LINUX Port: source/pnglib/pngdec.c...
Compiling LINUX Port: source/pnglib/savepng.c...
Compiling LINUX Port: source/webmlib/vidplay.c...
Compiling LINUX Port: source/webmlib/vorbis.c...
Compiling LINUX Port: source/webmlib/samplecvt.c...
Compiling LINUX Port: source/webmlib/yuv.c...
Compiling LINUX Port: source/webmlib/halloc/halloc.c...
Compiling LINUX Port: source/webmlib/nestegg/nestegg.c...
Linking LINUX Port: OpenBOR.elf...
Stripping LINUX Port: OpenBOR...
Completed LINUX Port!
OpenBOR is now ready!
moved binary to ./releases/LINUX/ !
Removing All LINUX Files...
Done!
-------------------------------------------------------
And the resulting binary is an actual x86_64 ELF:
danielt3@debian:~/devel/openbor-git/engine$ file ./releases/LINUX/OpenBOR/OpenBOR
./releases/LINUX/OpenBOR/OpenBOR: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=dffb8875a150868dc1be8d2ab1bdb50e107b8c31, stripped
Reproduce
- git clone the repo
- install needed dependencies
- (for trying to build AMD64) $ ./build.sh 4 amd64
- (for trying to build x86) $ ./build.sh 4 x86
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
- Platform
Linux x86_64 (Debian 10)
- Engine Build
7141 (b00efbc)
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.