Oscilated
Posts: 2
Joined: Fri Jun 05, 2020 7:13 pm

Trouble Compiling MAME without X-Windows or OpenGL

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: Select all

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


Here is the configuration section of my Makefile:

Code: Select all

########################################################################### ################# 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 ###################### ###########################################################################

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 :)

-Oscilated

User avatar
Tafoid
Posts: 205
Joined: Thu Nov 06, 2014 12:50 pm
Location: USA
Contact: Website

Re: Trouble Compiling MAME without X-Windows or OpenGL

Asked over here where people are answering:
https://forums.bannister.org/ubbthreads ... ber=117410

Oscilated
Posts: 2
Joined: Fri Jun 05, 2020 7:13 pm

Re: Trouble Compiling MAME without X-Windows or OpenGL

Looks like I'm getting some traction over there.

Return to “MAME Discussion”