openbor icon indicating copy to clipboard operation
openbor copied to clipboard

Build Failing on Arch 5.14.16-arch1-1

Open sauntheninja2 opened this issue 3 years ago • 5 comments

Description Build Fails in Arch

Reproduce git clone repo ensure all dependencies are installed using system packages cd openbor/engine ./build.sh 4 x86

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:118:24: note: declared here 118 | 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....

Removing All LINUX Files... Done!

Debugging Using malloc_info() does seem to solve this issue

sauntheninja2 avatar Nov 10 '21 10:11 sauntheninja2

Build using gcc 7

msmalik681 avatar Nov 10 '21 11:11 msmalik681

We could add -Wno-deprecated-declarations to the build options, but it would probably be better to just call getUsedRam() from ram.c instead of calling mallinfo() in utils.c.

Plombo avatar Dec 20 '21 16:12 Plombo

Well any news about this topic?

SupervisedThinking avatar Feb 22 '22 17:02 SupervisedThinking

I did note something while trying to understand this issue (I'm on version 7141, hash b00efbc):

  1. If you are on an amd64 and builds for AMD64, the build works fine (the error reported in this issue seems to be fixed);
  2. 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?

`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! `

danielt3 avatar Feb 25 '22 13:02 danielt3

I guess mallinfo2 should be used since mallinfo is deprecated https://man7.org/linux/man-pages/man3/mallinfo.3.html

SupervisedThinking avatar Feb 25 '22 18:02 SupervisedThinking