Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on Manjaro x64 #278

Open
coreybruce opened this issue Apr 10, 2023 · 23 comments · May be fixed by #316
Open

Fails to build on Manjaro x64 #278

coreybruce opened this issue Apr 10, 2023 · 23 comments · May be fixed by #316
Assignees

Comments

@coreybruce
Copy link

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

@msmalik681
Copy link
Collaborator

Can you confirm the sdl2 package name you installed ?

@msmalik681
Copy link
Collaborator

These are the required packages on debien: libsdl2-dev libsdl2-gfx-dev libpng-dev libvorbis-dev libvpx-dev

@coreybruce
Copy link
Author

on Manjaro the package names are:

  • sdl2
  • sdl2_gfx
  • libpng
  • libvorbis
  • libvpx

Debian and Ubuntu have the most retarded package names

@msmalik681
Copy link
Collaborator

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.

@coreybruce
Copy link
Author

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?

@V0rt3x667
Copy link

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"

@V0rt3x667
Copy link

To clarify, substitute ${md_build} with the folder containing the openbor source code.

@V0rt3x667
Copy link

Also run the scripts in this order:
./version.sh
./build.sh 4

@coreybruce
Copy link
Author

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

@V0rt3x667
Copy link

Sorry I don't maintain OpenBOR so I can't change how the software is built and installed.

@msmalik681
Copy link
Collaborator

Might update this to automatically satisfy dependencies based on your package manager as i wanted to update it to automatically make a appimage anyway.

@coreybruce
Copy link
Author

Sorry I don't maintain OpenBOR so I can't change how the software is built and installed.

Oh ok no problem 🙂

@coreybruce
Copy link
Author

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?

@coreybruce
Copy link
Author

coreybruce commented Jan 19, 2024

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

@msmalik681
Copy link
Collaborator

@DCurrent ignoring "SDL2_framerate.h" if we can satisfy the other 5 errors/issues then we can support newer gcc versions ?

@DCurrent
Copy link
Owner

DCurrent commented Feb 2, 2024

@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.

@coreybruce
Copy link
Author

Yeah it defiantly needs to be improved

@msmalik681
Copy link
Collaborator

msmalik681 commented Feb 2, 2024

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.

@msmalik681 msmalik681 self-assigned this Feb 2, 2024
@coreybruce
Copy link
Author

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?

@msmalik681
Copy link
Collaborator

@coreybruce please join my discord https://discord.gg/P44baVdCHF I have made a channel for openbor linux.

@coreybruce
Copy link
Author

coreybruce commented Feb 4, 2024

@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?

@msmalik681
Copy link
Collaborator

Easier to collaborate or are you on the cronocrash forums ?

@coreybruce
Copy link
Author

Easier to collaborate or are you on the cronocrash forums ?

Oh ok well I am already in the Discord server and in that channel

@j8r j8r linked a pull request May 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants