Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mame compilation error  (Read 4001 times)

0 Members and 1 Guest are viewing this topic.

eldiego

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:June 07, 2024, 11:18:22 pm
  • I do my daytona twin, arcade 4 players and vpin!!!
Mame compilation error
« on: May 30, 2016, 10:23:38 am »
Hi, i am trying to compile mame 0.122, i am having an error "cc1.exe all warnings being treated as errors"
I am using a guide from http://forum.attractmode.org/index.php?PHPSESSID=sb4qe2hb7ttgvlts2qinqct536&topic=348.msg4826#msg4826
i am using windows 10 32 bits
i change the lines but when write make appears the error

eldiego

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:June 07, 2024, 11:18:22 pm
  • I do my daytona twin, arcade 4 players and vpin!!!
Re: Mame compilation error
« Reply #1 on: May 30, 2016, 06:50:47 pm »
Or if anyone have the same version compiled with nonag and hiscore i will very happy

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Mame compilation error
« Reply #2 on: May 31, 2016, 02:30:06 pm »
Try editing the makefile and setting NOWERROR so warnings are not treated as errors.

eldiego

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:June 07, 2024, 11:18:22 pm
  • I do my daytona twin, arcade 4 players and vpin!!!
Re: Mame compilation error
« Reply #3 on: June 01, 2016, 07:32:45 pm »
Try editing the makefile and setting NOWERROR so warnings are not treated as errors.

i am not acquainted with the makefile, can you tell me please where i can put the nowerror, because i can not see the line where i put the setting

###########################################################################
#
#   makefile
#
#   Core makefile for building MAME and derivatives
#
#   Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
#   Visit http://mamedev.org for licensing and usage restrictions.
#
###########################################################################



###########################################################################
#################   BEGIN USER-CONFIGURABLE OPTIONS   #####################
###########################################################################


#-------------------------------------------------
# specify core target: mame, mess, etc.
# specify subtarget: mame, mess, tiny, etc.
# build rules will be included from
# src/$(TARGET)/$(SUBTARGET).mak
#-------------------------------------------------

ifndef TARGET
TARGET = mame
endif

ifndef SUBTARGET
SUBTARGET = $(TARGET)
endif



#-------------------------------------------------
# specify OSD layer: windows, sdl, etc.
# build rules will be included from
# src/osd/$(OSD)/$(OSD).mak
#-------------------------------------------------

ifndef OSD
OSD = windows
endif



#-------------------------------------------------
# specify OS target, which further differentiates
# the underlying OS; supported values are:
# win32, unix, macosx, os2
#-------------------------------------------------

ifndef TARGETOS
ifeq ($(OSD),windows)
TARGETOS = win32
else
TARGETOS = unix
endif
endif



#-------------------------------------------------
# configure name of final executable
#-------------------------------------------------

# uncomment and specify prefix to be added to the name
# PREFIX =

# uncomment and specify suffix to be added to the name
# SUFFIX =



#-------------------------------------------------
# specify architecture-specific optimizations
#-------------------------------------------------

# uncomment and specify architecture-specific optimizations here
# some examples:
#   optimize for I686:   ARCHOPTS = -march=pentiumpro
#   optimize for Core 2: ARCHOPTS = -march=pentium-m -msse3
#   optimize for G4:     ARCHOPTS = -mcpu=G4
# note that we leave this commented by default so that you can
# configure this in your environment and never have to think about it
# ARCHOPTS =



#-------------------------------------------------
# specify program options; see each option below
# for details
#-------------------------------------------------

# uncomment next line to include the debugger
# DEBUG = 1

# uncomment next line to include the internal profiler
# PROFILER = 1

# uncomment next line to use DRC MIPS3 engine
X86_MIPS3_DRC = 1

# uncomment next line to use DRC PowerPC engine
X86_PPC_DRC = 1



#-------------------------------------------------
# specify build options; see each option below
# for details
#-------------------------------------------------

# uncomment next line if you are building for a 64-bit target
# PTR64 = 1

# uncomment next line if you are building for a big-endian target
# BIGENDIAN = 1

# uncomment next line to build expat as part of MAME build
BUILD_EXPAT = 1

# uncomment next line to build zlib as part of MAME build
BUILD_ZLIB = 1

# uncomment next line to include the symbols
# SYMBOLS = 1

# uncomment next line to include profiling information from the compiler
# PROFILE = 1

# uncomment next line to generate a link map for exception handling in windows
# MAP = 1

# specify optimization level or leave commented to use the default
# (default is OPTIMIZE = 3 normally, or OPTIMIZE = 0 with symbols)
# OPTIMIZE = 3


###########################################################################
##################   END USER-CONFIGURABLE OPTIONS   ######################
###########################################################################


#-------------------------------------------------
# sanity check the configuration
#-------------------------------------------------

# disable DRC cores for 64-bit builds
ifdef PTR64
X86_PPC_DRC =
endif

# specify a default optimization level if none explicitly stated
ifndef OPTIMIZE
ifndef SYMBOLS
OPTIMIZE = 3
else
OPTIMIZE = 0
endif
endif

# profiler defaults to on for DEBUG builds
ifdef DEBUG
ifndef PROFILER
PROFILER = 1
endif
endif



#-------------------------------------------------
# platform-specific definitions
#-------------------------------------------------

# extension for executables
EXE =

ifeq ($(TARGETOS),win32)
EXE = .exe
endif
ifeq ($(TARGETOS),os2)
EXE = .exe
endif

# compiler, linker and utilities
AR = @ar
CC = @gcc
LD = @gcc
MD = -mkdir$(EXE)
RM = @rm -f



#-------------------------------------------------
# form the name of the executable
#-------------------------------------------------

# debug builds just get the 'd' suffix and nothing more
ifdef DEBUG
DEBUGSUFFIX = d
endif

# the name is just 'target' if no subtarget; otherwise it is
# the concatenation of the two (e.g., mametiny)
ifeq ($(TARGET),$(SUBTARGET))
NAME = $(TARGET)
else
NAME = $(TARGET)$(SUBTARGET)
endif

# fullname is prefix+name+suffix+debugsuffix
FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(DEBUGSUFFIX)

# add an EXE suffix to get the final emulator name
EMULATOR = $(FULLNAME)$(EXE)



#-------------------------------------------------
# source and object locations
#-------------------------------------------------

# all sources are under the src/ directory
SRC = src

# build the targets in different object dirs, so they can co-exist
OBJ = obj/$(OSD)/$(FULLNAME)



#-------------------------------------------------
# compile-time definitions
#-------------------------------------------------

# CR/LF setup: use both on win32/os2, CR only on everything else
DEFS = -DCRLF=2

ifeq ($(TARGETOS),win32)
DEFS = -DCRLF=3
endif
ifeq ($(TARGETOS),os2)
DEFS = -DCRLF=3
endif

# map the INLINE to something digestible by GCC
DEFS += -DINLINE="static __inline__"

# define LSB_FIRST if we are a little-endian target
ifndef BIGENDIAN
DEFS += -DLSB_FIRST
endif

# define PTR64 if we are a 64-bit target
ifdef PTR64
DEFS += -DPTR64
endif

# define MAME_DEBUG if we are a debugging build
ifdef DEBUG
DEFS += -DMAME_DEBUG
else
DEFS += -DNDEBUG
endif

# define MAME_PROFILER if we are a profiling build
ifdef PROFILER
DEFS += -DMAME_PROFILER
endif



#-------------------------------------------------
# compile flags
#-------------------------------------------------

# we compile to C89 standard with GNU extensions
CFLAGS = -std=gnu89

# this speeds it up a bit by piping between the preprocessor/compiler/assembler
CFLAGS += -pipe

# add -g if we need symbols
ifdef SYMBOLS
CFLAGS += -g
endif

# add a basic set of warnings
CFLAGS += \
   -Wall \
   -Wpointer-arith \
   -Wbad-function-cast \
   -Wcast-align \
   -Wstrict-prototypes \
   -Wundef \
   -Wformat-security \
   -Wwrite-strings \

# add profiling information for the compiler
ifdef PROFILE
CFLAGS += -pg
endif

# this warning is not supported on the os2 compilers
ifneq ($(TARGETOS),os2)
CFLAGS += -Wdeclaration-after-statement
endif

# add the optimization flag
CFLAGS += -O$(OPTIMIZE)

# if we are optimizing, include optimization options
# and make all errors into warnings
ifneq ($(OPTIMIZE),0)
CFLAGS += -Werror $(ARCHOPTS) -fno-strict-aliasing
#CFLAGS += $(ARCHOPTS) -fno-strict-aliasing
endif

# if symbols are on, make sure we have frame pointers
ifdef SYMBOLS
CFLAGS += -fno-omit-frame-pointer
endif



#-------------------------------------------------
# include paths
#-------------------------------------------------

# add core include paths
CFLAGS += \
   -I$(SRC)/$(TARGET) \
   -I$(SRC)/$(TARGET)/includes \
   -I$(OBJ)/$(TARGET)/layout \
   -I$(SRC)/emu \
   -I$(OBJ)/emu \
   -I$(OBJ)/emu/layout \
   -I$(SRC)/lib/util \
   -I$(SRC)/osd \
   -I$(SRC)/osd/$(OSD) \



#-------------------------------------------------
# linking flags
#-------------------------------------------------

# LDFLAGS are used generally; LDFLAGSEMULATOR are additional
# flags only used when linking the core emulator
LDFLAGS = -Wl,--warn-common
LDFLAGSEMULATOR =

# add profiling information for the linker
ifdef PROFILE
LDFLAGS += -pg
endif

# strip symbols and other metadata in non-symbols and non profiling builds
ifndef SYMBOLS
ifndef PROFILE
LDFLAGS += -s
endif
endif

# output a map file (emulator only)
ifdef MAP
LDFLAGSEMULATOR += -Wl,-Map,$(FULLNAME).map
endif

# any reason why this doesn't work for all cases?
ifeq ($(TARGETOS),macosx)
LDFLAGSEMULATOR += -Xlinker -all_load
endif



#-------------------------------------------------
# define the standard object directory; other
# projects can add their object directories to
# this variable
#-------------------------------------------------

OBJDIRS = $(OBJ)



#-------------------------------------------------
# define standard libarires for CPU and sounds
#-------------------------------------------------

LIBEMU = $(OBJ)/libemu.a
LIBCPU = $(OBJ)/libcpu.a
LIBSOUND = $(OBJ)/libsound.a
LIBUTIL = $(OBJ)/libutil.a
LIBOCORE = $(OBJ)/libocore.a
LIBOSD = $(OBJ)/libosd.a

VERSIONOBJ = $(OBJ)/version.o



#-------------------------------------------------
# either build or link against the included
# libraries
#-------------------------------------------------

# start with an empty set of libs
LIBS =

# add expat XML library
ifdef BUILD_EXPAT
CFLAGS += -I$(SRC)/lib/expat
EXPAT = $(OBJ)/libexpat.a
else
LIBS += -lexpat
EXPAT =
endif

# add ZLIB compression library
ifdef BUILD_ZLIB
CFLAGS += -I$(SRC)/lib/zlib
ZLIB = $(OBJ)/libz.a
else
LIBS += -lz
ZLIB =
endif



#-------------------------------------------------
# 'all' target needs to go here, before the
# include files which define additional targets
#-------------------------------------------------

all: maketree buildtools emulator tools



#-------------------------------------------------
# include the various .mak files
#-------------------------------------------------

# include OSD-specific rules first
include $(SRC)/osd/$(OSD)/$(OSD).mak

# then the various core pieces
include $(SRC)/$(TARGET)/$(SUBTARGET).mak
include $(SRC)/emu/emu.mak
include $(SRC)/lib/lib.mak
include $(SRC)/build/build.mak
include $(SRC)/tools/tools.mak

# combine the various definitions to one
CDEFS = $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS)



#-------------------------------------------------
# primary targets
#-------------------------------------------------

emulator: maketree $(BUILD) $(EMULATOR)

buildtools: maketree $(BUILD)

tools: maketree $(TOOLS)

maketree: $(sort $(OBJDIRS))

clean:
   @echo Deleting object tree $(OBJ)...
   $(RM) -r $(OBJ)
   @echo Deleting $(EMULATOR)...
   $(RM) $(EMULATOR)
   @echo Deleting $(TOOLS)...
   $(RM) $(TOOLS)
ifdef MAP
   @echo Deleting $(FULLNAME).map...
   $(RM) $(FULLNAME).map
endif



#-------------------------------------------------
# directory targets
#-------------------------------------------------

$(sort $(OBJDIRS)):
   $(MD) -p $@



#-------------------------------------------------
# executable targets and dependencies
#-------------------------------------------------

ifndef EXECUTABLE_DEFINED

$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
# always recompile the version string
   $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
   @echo Linking $@...
   $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@

endif



#-------------------------------------------------
# generic rules
#-------------------------------------------------

$(OBJ)/%.o: $(SRC)/%.c | $(OSPREBUILD)
   @echo Compiling $<...
   $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@

$(OBJ)/%.pp: $(SRC)/%.c | $(OSPREBUILD)
   @echo Compiling $<...
   $(CC) $(CDEFS) $(CFLAGS) -E $< -o $@

$(OBJ)/%.s: $(SRC)/%.c | $(OSPREBUILD)
   @echo Compiling $<...
   $(CC) $(CDEFS) $(CFLAGS) -S $< -o $@

$(OBJ)/%.lh: $(SRC)/%.lay $(FILE2STR)
   @echo Converting $<...
   @$(FILE2STR) $< $@ layout_$(basename $(notdir $<))

$(OBJ)/%.fh: $(SRC)/%.png $(PNG2BDC) $(FILE2STR)
   @echo Converting $<...
   @$(PNG2BDC) $< $(OBJ)/temp.bdc
   @$(FILE2STR) $(OBJ)/temp.bdc $@ font_$(basename $(notdir $<)) UINT8

$(OBJ)/%.a:
   @echo Archiving $@...
   $(RM) $@
   $(AR) -cr $@ $^

ifeq ($(TARGETOS),macosx)
$(OBJ)/%.o: $(SRC)/%.m | $(OSPREBUILD)
   @echo Objective-C compiling $<...
   $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
endif

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Mame compilation error
« Reply #4 on: June 02, 2016, 02:35:44 pm »
Change these lines

Code: [Select]
#CFLAGS += -Werror $(ARCHOPTS) -fno-strict-aliasing
CFLAGS += $(ARCHOPTS) -fno-strict-aliasing

eldiego

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:June 07, 2024, 11:18:22 pm
  • I do my daytona twin, arcade 4 players and vpin!!!
Re: Mame compilation error
« Reply #5 on: June 03, 2016, 02:34:01 pm »
Change these lines

Code: [Select]
#CFLAGS += -Werror $(ARCHOPTS) -fno-strict-aliasing
CFLAGS += $(ARCHOPTS) -fno-strict-aliasing

Thanks!!!

eldiego

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:June 07, 2024, 11:18:22 pm
  • I do my daytona twin, arcade 4 players and vpin!!!
Re: Mame compilation error
« Reply #6 on: June 03, 2016, 03:53:55 pm »
works for a time but later
mame ui.o not found in the ms-dos windows
in the scr of .122 not exist that archive

warpath0007

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:July 28, 2016, 07:36:30 am
  • I want to build my own arcade controls!
Re: Mame compilation error
« Reply #7 on: July 28, 2016, 07:36:53 am »
I am having a problem compiling MAME on linux since 0.175. I keep getting this error

Compiling src/osd/modules/render/bgfx/suppressor.cpp...
Compiling src/osd/modules/render/bgfx/suppressorreader.cpp...
Compiling src/osd/modules/render/bgfx/target.cpp...
Compiling src/osd/modules/render/bgfx/targetmanager.cpp...
Compiling src/osd/modules/render/bgfx/targetreader.cpp...
Compiling src/osd/modules/render/bgfx/texture.cpp...
Compiling src/osd/modules/render/bgfx/texturemanager.cpp...
Compiling src/osd/modules/render/bgfx/timeparameter.cpp...
Compiling src/osd/modules/render/bgfx/uniform.cpp...
Compiling src/osd/modules/render/bgfx/uniformreader.cpp...
Compiling src/osd/modules/render/bgfx/valueuniform.cpp...
Compiling src/osd/modules/render/bgfx/valueuniformreader.cpp...
Compiling src/osd/modules/render/bgfx/writereader.cpp...
Compiling src/osd/modules/render/bgfxutil.cpp...
Compiling src/osd/modules/render/binpacker.cpp...
Compiling src/osd/modules/render/draw13.cpp...
Compiling src/osd/modules/render/drawbgfx.cpp...
Compiling src/osd/modules/render/drawogl.cpp...
Compiling src/osd/modules/render/drawsdl.cpp...
Compiling src/osd/modules/sound/coreaudio_sound.cpp...
Compiling src/osd/modules/sound/direct_sound.cpp...
Compiling src/osd/modules/sound/js_sound.cpp...
Compiling src/osd/modules/sound/none.cpp...
Compiling src/osd/modules/sound/sdl_sound.cpp...
Compiling src/osd/modules/sound/xaudio2_sound.cpp...
Compiling src/osd/osdnet.cpp...
Compiling src/osd/sdl/sdlmain.cpp...
Compiling src/osd/sdl/video.cpp...
Compiling src/osd/sdl/window.cpp...
Compiling src/osd/watchdog.cpp...
Archiving libosd_sdl.a...
Archiving libnetlist.a...
makefile:1194: recipe for target 'linux_x64' failed
make: *** [linux_x64] Error 2
egonzalez@egonzalez-desktop:~/Compile/mame0.176$


I'm no expert so I can't figure out what is going on.
I've tried it on different flavors of linux, but I keep getting this error now.
Can anyone help me find out what I am missing?

Using Ubuntu 16.04