Previous Thread
Next Thread
Print Thread
Trouble Compiling MAME without X-Windows or OpenGL #117410 06/09/20 11:22 AM
Joined: May 2020
Posts: 3
O
Oscilated Offline OP
Member
OP Offline
Member
O
Joined: May 2020
Posts: 3
All,

Thanks in advance for any assistance you may offer...

I'm running into an issue where MAME wants to link against X-Windows libraries even when I explicitly tell the makefile I don't have X. Additionally, but probably unrelated, I'm also explicitly telling the makefile to not use OpenGL (yes, I expect to run MAME from the console framebuffer).

Here is the error I get on the console:

Code
Compiling 3rdparty/bgfx/src/glcontext_egl.cpp... g++ -march=core2 -O2 -pipe -march=core2 -O2 -pipe -MMD -MP -MP -DPTR64=1 -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DNATIVE_DRC=drcbe_x64 -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DBGFX_CONFIG_MAX_FRAME_BUFFERS=128 -DBGFX_CONFIG_RENDERER_OPENGLES=1 -DBGFX_CONFIG_RENDERER_OPENGL=0 -I"../../../../../3rdparty/bgfx/include" -I"../../../../../3rdparty/bgfx/3rdparty" -I"../../../../../3rdparty/bx/include" -I"../../../../../3rdparty/bimg/include" -I"../../../../../3rdparty/bgfx/3rdparty/dxsdk/include" -I"../../../../../3rdparty/bgfx/3rdparty/khronos" -m64 -pipe -O3 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-error=deprecated-declarations -Wno-unused-result -Wno-array-bounds -Wno-format-overflow -Wno-stringop-truncation -Wno-stringop-overflow -m64 -Wno-uninitialized -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-format-extra-args -std=c++14 -Woverloaded-virtual -Wno-class-memaccess -Wno-misleading-indentation -o "../../../../linux_gcc/obj/x64/Release/3rdparty/bgfx/src/glcontext_egl.o" -c "../../../../../3rdparty/bgfx/src/glcontext_egl.cpp" In file included from ../../../../../3rdparty/bgfx/3rdparty/khronos/EGL/egl.h:39, from ../../../../../3rdparty/bgfx/src/glcontext_egl.h:11, from ../../../../../3rdparty/bgfx/src/renderer_gl.h:128, from ../../../../../3rdparty/bgfx/src/glcontext_egl.cpp:9: ../../../../../3rdparty/bgfx/3rdparty/khronos/EGL/eglplatform.h:116:10: fatal error: X11/Xlib.h: No such file or directory 116 | #include <X11/Xlib.h> | ^~~~~~~~~~~~ compilation terminated. make[2]: *** [bgfx.make:509: ../../../../linux_gcc/obj/x64/Release/3rdparty/bgfx/src/glcontext_egl.o] Error 1 make[1]: *** [Makefile:61: bgfx] Error 2 make[1]: Leaving directory '/usr/src/MAME-221/build/projects/sdl/mame/gmake-linux' make: *** [makefile:1350: linux_x64] Error 2



If it helps, I've included the configuration section of my Makefile:

Code
########################################################################### ################# BEGIN USER-CONFIGURABLE OPTIONS ##################### ########################################################################### REGENIE = 1 VERBOSE = 1 NOWERROR = 1 # IGNORE_GIT = 1 # TARGET = mame # SUBTARGET = tiny TOOLS = 1 # TESTS = 1 # BENCHMARKS = 1 OSD = sdl NO_OPENGL = 1 # USE_DISPATCH_GL = 0 # MODERN_WIN_API = 0 # DIRECTINPUT = 7 # USE_SDL = 1 # SDL_INI_PATH = .;$HOME/.mame/;ini; # SDL2_MULTIAPI = 1 # NO_USE_MIDI = 1 # NO_USE_PORTAUDIO = 1 # USE_TAPTUN = 1 # USE_PCAP = 1 # USE_QTDEBUG = 1 NO_X11 = 1 NO_USE_XINPUT = 1 # NO_USE_XINPUT_WII_LIGHTGUN_HACK = 1 # FORCE_DRC_C_BACKEND = 1 # DEBUG = 1 # PROFILER = 1 # SANITIZE = # PTR64 = 1 # BIGENDIAN = 1 # NOASM = 1 # OPTIMIZE = 3 # SYMBOLS = 1 # SYMLEVEL = 2 # MAP = 1 # PROFILE = 1 # ARCHOPTS = # ARCHOPTS_C = # ARCHOPTS_CXX = # ARCHOPTS_OBJC = # ARCHOPTS_OBJCXX = # OPT_FLAGS = # LDOPTS = # USE_SYSTEM_LIB_ASIO = 1 USE_SYSTEM_LIB_EXPAT = 1 USE_SYSTEM_LIB_ZLIB = 1 USE_SYSTEM_LIB_JPEG = 1 USE_SYSTEM_LIB_FLAC = 1 # USE_SYSTEM_LIB_LUA = 1 # USE_SYSTEM_LIB_SQLITE3 = 1 # USE_SYSTEM_LIB_PORTMIDI = 1 # USE_SYSTEM_LIB_PORTAUDIO = 1 # USE_BUNDLED_LIB_SDL2 = 1 # USE_SYSTEM_LIB_UTF8PROC = 1 # USE_SYSTEM_LIB_GLM = 1 # USE_SYSTEM_LIB_RAPIDJSON = 1 # USE_SYSTEM_LIB_PUGIXML = 1 # MESA_INSTALL_ROOT = /opt/mesa # SDL_INSTALL_ROOT = /opt/sdl2 # SDL_FRAMEWORK_PATH = $(HOME)/Library/Frameworks # USE_LIBSDL = 1 # CYGWIN_BUILD = 1 # BUILDDIR = build # TARGETOS = windows # CROSS_BUILD = 1 # TOOLCHAIN = # OVERRIDE_CC = cc # OVERRIDE_CXX = c++ # OVERRIDE_LD = ld # DEPRECATED = 0 # LTO = 1 # SSE2 = 1 # OPENMP = 1 # SEPARATE_BIN = 1 # PYTHON_EXECUTABLE = python3 # SHADOW_CHECK = 1 # STRIP_SYMBOLS = 0 # QT_HOME = /usr/lib64/qt48/ # SOURCES = src/mame/drivers/asteroid.cpp,src/mame/audio/llander.cpp # FORCE_VERSION_COMPILE = 1 # MSBUILD = 1 # IGNORE_BAD_LOCALISATION=1 # PRECOMPILE = 0 # DEBUG_DIR=c:\test\location # DEBUG_ARGS= -window -video bgfx ifdef PREFIX_MAKEFILE include $(PREFIX_MAKEFILE) else -include useroptions.mak endif ########################################################################### ################## END USER-CONFIGURABLE OPTIONS ###################### ###########################################################################



Lastly, In my attempt to give as much relevant information as possible, here is my host environment (software-wise):

  • Native x86_64 without 32bit libraries


  • Linux localhost 5.5.3 #2 SMP Wed May 20 22:49:09 EDT 2020 x86_64 GNU/Linux


  • Base system is Linux From Scratch v9.1, which includes:
    BASH v5.0
    GCC v9.2.0
    GlibC v2.31
    BinUtils v2.34
    Make v4.3
    Pkg-Config v0.29.2
    Python v3.8.3


  • Additional Software (in case it matters):
    ALSA Libraries
    ALSA Utilities
    FAAD2
    FLAC
    FreeType
    JPEGsrc V6
    OGG Libraries
    PNG Libraries
    XML2 Libraries
    NASM
    PCRRE 2
    SDL 2
    TIFF Libraries
    XMLTS


Hopefully I provided enough information. And thank you again for any help you can offer smile

-Oscilated

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117411 06/09/20 11:49 AM
Joined: Jun 2001
Posts: 419
O
Olivier Galibert Offline
Senior Member
Offline
Senior Member
O
Joined: Jun 2001
Posts: 419
I don't think we've supported compiling non-gpu for a long time. What's for sure is that we don't support compiling without bgfx, and bgfx requires one.

You can try, but you get to keep all pieces when it breaks, to change osd/sdl/* to make it possible not to have bgfx, scripts/src/3rdparty.lua and src/osd/modules.lua not to compile it in. Hopefully you sdl2 library is a special edition that works with the framebuffer and provides hardware acceleration for blitting otherwise rendering is going to crawl.

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117412 06/09/20 11:56 AM
Joined: Mar 2001
Posts: 16,521
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,521
Also, I understand building with no X if you're a Wayland purist, but MAME on a raw frame buffer with no OGL/EAGL will not perform super well. What's the application here?

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117413 06/09/20 12:41 PM
Joined: Aug 2004
Posts: 1,394
Robbbert Offline
Very Senior Member
Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,394
Weird how Firefox turns those code-quotes into a single unreadably long line. Even IE does a better job.

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117414 06/09/20 01:08 PM
Joined: Mar 2001
Posts: 16,521
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,521
It's gibberish in Safari, and Chrome makes it all one long line. So I suspect that's the HTML5-correct behavior and IE's actually wrong.

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Robbbert] #117415 06/09/20 05:56 PM
Joined: Apr 2006
Posts: 719
Tafoid Offline
Senior Member
Offline
Senior Member
Joined: Apr 2006
Posts: 719
Originally Posted by Robbbert
Weird how Firefox turns those code-quotes into a single unreadably long line. Even IE does a better job.


I have to assume it is due to lack of LF+CR that Windows often expects to completely break the line




Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117416 06/09/20 07:24 PM
Joined: Mar 2004
Posts: 655
belegdol Offline
Senior Member
Offline
Senior Member
Joined: Mar 2004
Posts: 655
It seems to have been possible to build without X on Odroid N2:
https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=116245

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117417 06/09/20 07:29 PM
Joined: Mar 2001
Posts: 16,521
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,521
I'm still curious what the application is here, because there's one particular reason MAME gets compiled this way and it's often not legit.

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117418 06/09/20 08:00 PM
Joined: May 2020
Posts: 3
O
Oscilated Offline OP
Member
OP Offline
Member
O
Joined: May 2020
Posts: 3
Quote
It seems to have been possible to build without X on Odroid N2


Yeah, I saw those posts. In fact, those posts are the basis to my makefile. Seems something may have changed from when that thread was active.



Quote
I'm still curious what the application is here, because there's one particular reason MAME gets compiled this way and it's often not legit.


The application is literally just a home-brew cabinet that I'm finally getting around to updating from MAME v150(ish). Compile worked back when 150(ish) was current, but I understand things change. If I remember correctly, I had to comment out a few OpenGL related includes back then.


Understanding that X-less/OGL-less builds are more "fringe", I wanted to take the opportunity to point out a possible issue. If this isn't a supported path, that's fine. I guess I need to figure out how to rearchitect my system using X.

Re: Trouble Compiling MAME without X-Windows or OpenGL [Re: Oscilated] #117419 06/09/20 08:03 PM
Joined: May 2020
Posts: 3
O
Oscilated Offline OP
Member
OP Offline
Member
O
Joined: May 2020
Posts: 3
Quote
I have to assume it is due to lack of LF+CR that Windows often expects to completely break the line


I think you're correct. I copy-and-pasted from a SSH session.


Who's Online Now
2 registered members (Pernod, 1 invisible), 76 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,782
Posts115,558
Members4,908
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3