Closed rcampbel3 closed 2 years ago
@rcampbel3 thanks for the heads up. We're aware about gcc-9 throwing temper tantrums over strcopy, but haven't found a good fix yet that doesn't break a lot of other things.
Having the same issue on Manjaro Arm64
/mnt/St/pr/openbor/engine master ./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...
Compiling LINUX Port: sdl/timer.c...
Compiling LINUX Port: sdl/sdlport.c...
openbor.c: In function ‘display_ents’:
openbor.c:22328: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]
22328 | if ( anim->platform[e->animpos] )
| ^~~~
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:713: source/utils.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make: *** [Makefile:712: openbor.o] Error 1
Removing All LINUX Files...
Done!
Just tested latest master build 7142 on linux mint 20.3 and it compiled fine. Please ensure you have the correct dependencies "libsdl2-dev libsdl2-gfx-dev libpng-dev libvorbis-dev libvpx-dev" also I built it using gcc 9.4.0 to check your gcc version use "gcc --version" in terminal.
@DCurrent do we actually consider it a bug or issue if a build outside of the official releases is compiling or not ?
Yeah no you can close it, it's been fixed now and compiles fine
Description
Source build from latest git pull fails on Ubuntu 20.04
Reproduce
git clone repo ensure all dependencies are installed using system packages cd openbor/engine ./build.sh 4 amd64
Additional context
export CFLAGS=-Wno-error
, same result