Open c0d3h4x0r opened 4 years ago
I am working on a fix for this.
I've think I've finally got this working. I had to add a table-ordering hack to make_cpp.lua
in GENie, then run genie embed
to force scripts.c
to get regenerated correctly, then rebuild mame2016-libretro
with REGENIE=1
.
can you please guide me whats wrong
Generating ../build/projects/windows/mame/gmake-mingw64-gcc/zenith.make...
Generating ../build/projects/windows/mame/gmake-mingw64-gcc/zpa.make...
Generating ../build/projects/windows/mame/gmake-mingw64-gcc/zvt.make...
Generating ../build/projects/windows/mame/gmake-mingw64-gcc/skeleton.make...
Generating ../build/projects/windows/mame/gmake-mingw64-gcc/mame2016.make...
Done.
Precompiling src/emu/emu.h...
In file included from ../../../../../src/emu/emu.h:60:
../../../../../src/emu/input.h: In copy constructor 'input_seq::input_seq(const input_seq&)':
../../../../../src/emu/input.h:451:49: error: 'void memcpy(void, const void*, size_t)' writing to an object of non-trivially copyable type 'class input_code'; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
451 | input_seq(const input_seq &rhs) { memcpy(m_code, rhs.m_code, sizeof(m_code)); }
| ~~^~~~~~~~
In file included from ../../../../../src/emu/emu.h:60:
../../../../../src/emu/input.h:400:7: note: 'class input_code' declared here
400 | class input_code
| ^~~~~~
cc1plus.exe: all warnings being treated as errors
precompile.make:455: recipe for target '../../../../mingw-gcc/obj/x64/Release/emu.h.gch' failed
make[2]: [../../../../mingw-gcc/obj/x64/Release/emu.h.gch] Error 1
makefile:70: recipe for target 'precompile' failed
make[1]: [precompile] Error 2
makefile:930: recipe for target 'windows_x64' failed
make: *** [windows_x64] Error 2
[MINGW64] C:\msys64\src\mame2016-libretro>cc1plus.exe: all warnings being treated as errors 'cc1plus.exe:' is not recognized as an internal or external command, operable program or batch file.
I've been trying to get
mame2016-libretro
building undermingw64.exe
(rather than the MSYS2-basedwin32env
shell), which has required me to pull in the latest stable version (version 1115 (commit cd9b1a624810b166d11788d01c2aa4daf2ea42e6)) of GENie to resolve some build errors.With that in place, I still get the following remaining build errors:
This is caused by incorrect library ordering in the generated
mame2016.make
.libshared.a
needs to come beforelibsega.a
in order for that function to be recognized by the linker when it reasons overlibsega.a
.The LUA code responsible for this appears to reside in
make_cpp.lua
, inside the functioncpp.linker()
. It needs to somehow be adjusted to guarantee the correct relative static library ordering as needed bymame2016-libretro
in order to successfully link.