User avatar
f205v
Posts: 22
Joined: Tue Nov 11, 2014 10:31 pm
Location: Switzerland
Contact: Website

problem compiling

Hi, I just update to latest tree, and while doing a clean compiling I get an error:
Archiving libemu.a...
makefile:1080: recipe for target 'windows_x64' failed
make: *** [windows_x64] Error 2
A few lines above there is a number of other errors:

Code: Select all

Compiling src/mame/drivers/fm7.cpp...
In file included from ../../../../../3rdparty/sol2/sol/stack.hpp:30Compiling src/mame/drivers/fidel_dames.cpp...
,
                 from ../../../../../3rdparty/sol2/sol/object.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/proxy.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/table_core.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/table.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/state_view.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/state.hpp:25,
                 from ../../../../../3rdparty/sol2/sol.hpp:45,
                 from ../../../../../src/frontend/mame/luaengine.h:27,
                 from ../../../../../src/frontend/mame/clifront.cpp:19:
../../../../../3rdparty/sol2/sol/stack_push.hpp: In instantiation of 'static int sol::stack::pusher<wchar_t [N]>::push(lua_State*, const wchar_t (&)[N], std::size_t) [with long long unsigned int N = 2; lua_State = lua_State; std::size_t = long long unsigned int]':
../../../../../3rdparty/sol2/sol/stack_core.hpp:173:48:   required from 'int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const wchar_t (&)[2]; Args = {int}; lua_State = lua_State]'
../../../../../3rdparty/sol2/sol/stack_push.hpp:579:33:   required from here
../../../../../3rdparty/sol2/sol/stack_push.hpp:549:39: error: call of overloaded 'push<const wchar_t*>(lua_State*&, const wchar_t [2], const wchar_t*)' is ambiguous
  549 |     return stack::push<const wchar_t*>(L, str, str + sz);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from ../../../../../3rdparty/sol2/sol/stack.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/object.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/proxy.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/table_core.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/table.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/state_view.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/state.hpp:25,
                 from ../../../../../3rdparty/sol2/sol.hpp:45,
                 from ../../../../../src/frontend/mame/luaengine.h:27,
                 from ../../../../../src/frontend/mame/clifront.cpp:19:
../../../../../3rdparty/sol2/sol/stack_core.hpp:172:14: note: candidate: 'int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const wchar_t*; Args = {const wchar_t*}; lua_State = lua_State]'
  172 |   inline int push(lua_State* L, T&& t, Args&&... args) {
      |              ^~~~
../../../../../3rdparty/sol2/sol/stack_core.hpp:178:14: note: candidate: 'int sol::stack::push(lua_State*, Arg&&, Args&& ...) [with T = const wchar_t*; Arg = const wchar_t (&)[2]; Args = {const wchar_t*}; <template-parameter-1-4> = void; lua_State = lua_State]'
  178 |   inline int push(lua_State* L, Arg&& arg, Args&&... args) {
      |              ^~~~
In file included from ../../../../../3rdparty/sol2/sol/stack.hpp:30,
                 from ../../../../../3rdparty/sol2/sol/object.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/proxy.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/table_core.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/table.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/state_view.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/state.hpp:25,
                 from ../../../../../3rdparty/sol2/sol.hpp:45,
                 from ../../../../../src/frontend/mame/luaengine.h:27,
                 from ../../../../../src/frontend/mame/clifront.cpp:19:
../../../../../3rdparty/sol2/sol/stack_push.hpp: In instantiation of 'static int sol::stack::pusher<char16_t [N]>::push(lua_State*, const char16_t (&)[N], std::size_t) [with long long unsigned int N = 2; lua_State = lua_State; std::size_t = long long unsigned int]':
../../../../../3rdparty/sol2/sol/stack_core.hpp:173:48:   required from 'int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char16_t (&)[2]; Args = {int}; lua_State = lua_State]'
../../../../../3rdparty/sol2/sol/stack_push.hpp:587:33:   required from here
../../../../../3rdparty/sol2/sol/stack_push.hpp:560:40: error: Compiling src/mame/drivers/fidel_desdis.cpp...
call of overloaded 'push<const char16_t*>(lua_State*&, const char16_t [2], const char16_t*)' is ambiguous
  560 |     return stack::push<const char16_t*>(L, str, str + sz);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from ../../../../../3rdparty/sol2/sol/stack.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/object.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/proxy.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/table_core.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/table.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/state_view.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/state.hpp:25,
                 from ../../../../../3rdparty/sol2/sol.hpp:45,
                 from ../../../../../src/frontend/mame/luaengine.h:27,
                 from ../../../../../src/frontend/mame/clifront.cpp:19:
../../../../../3rdparty/sol2/sol/stack_core.hpp:172:14: note: candidate: 'int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char16_t*; Args = {const char16_t*}; lua_State = lua_State]'
  172 |   inline int push(lua_State* L, T&& t, Args&&... args) {
      |              ^~~~
../../../../../3rdparty/sol2/sol/stack_core.hpp:178:14: note: candidate: 'int sol::stack::push(lua_State*, Arg&&, Args&& ...) [with T = const char16_t*; Arg = const char16_t (&)[2]; Args = {const char16_t*}; <template-parameter-1-4> = void; lua_State = lua_State]'
  178 |   inline int push(lua_State* L, Arg&& arg, Args&&... args) {
      |              ^~~~
In file included from ../../../../../3rdparty/sol2/sol/stack.hpp:30,
                 from ../../../../../3rdparty/sol2/sol/object.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/proxy.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/table_core.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/table.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/state_view.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/state.hpp:25,
                 from ../../../../../3rdparty/sol2/sol.hpp:45,
                 from ../../../../../src/frontend/mame/luaengine.h:27,
                 from ../../../../../src/frontend/mame/clifront.cpp:19:
../../../../../3rdparty/sol2/sol/stack_push.hpp: In instantiation of 'static int sol::stack::pusher<char32_t [N]>::push(lua_State*, const char32_t (&)[N], std::size_t) [with long long unsigned int N = 2; lua_State = lua_State; std::size_t = long long unsigned int]':
../../../../../3rdparty/sol2/sol/stack_core.hpp:173:48:   required from 'int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char32_t (&)[2]; Args = {int}; lua_State = lua_State]'
../../../../../3rdparty/sol2/sol/stack_push.hpp:595:33:   required from here
../../../../../3rdparty/sol2/sol/stack_push.hpp:571:40:Compiling src/mame/drivers/fidel_eag68k.cpp...
 error: call of overloaded 'push<const char32_t*>(lua_State*&, const char32_t [2], const char32_t*)' is ambiguous
  571 |     return stack::push<const char32_t*>(L, str, str + sz);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from ../../../../../3rdparty/sol2/sol/stack.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/object.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/proxy.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/table_core.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/table.hpp:25,
                 from ../../../../../3rdparty/sol2/sol/state_view.hpp:26,
                 from ../../../../../3rdparty/sol2/sol/state.hpp:25,
                 from ../../../../../3rdparty/sol2/sol.hpp:45,
                 from ../../../../../src/frontend/mame/luaengine.h:27,
                 from ../../../../../src/frontend/mame/clifront.cpp:19:
../../../../../3rdparty/sol2/sol/stack_core.hpp:172:14: note: candidate: 'int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char32_t*; Args = {const char32_t*}; lua_State = lua_State]'
  172 |   inline int push(lua_State* L, T&& t, Args&&... args) {
      |              ^~~~
../../../../../3rdparty/sol2/sol/stack_core.hpp:178:14: note: candidate: 'int sol::stack::push(lua_State*, Arg&&, Args&& ...) [with T = const char32_t*; Arg = const char32_t (&)[2]; Args = {const char32_t*}; <template-parameter-1-4> = void; lua_State = lua_State]'
  178 |   inline int push(lua_State* L, Arg&& arg, Args&&... args) {
      |              ^~~~
Compiling src/mame/drivers/fmtowns.cpp...
frontend.make:685: recipe for target '../../../../mingw-gcc/obj/x64/Release/src/frontend/mame/clifront.o' failed
make[2]: *** [../../../../mingw-gcc/obj/x64/Release/src/frontend/mame/clifront.o] Error 1
makefile:100: recipe for target 'frontend' failed
make[1]: *** [frontend] Error 2
make[1]: *** Waiting for unfinished jobs....


Any seggestion?
TIA
------
Ciao
f205v
Robert
Posts: 99
Joined: Thu Nov 06, 2014 12:44 pm

Re: problem compiling

(deleted)
Last edited by Robert on Fri Sep 23, 2022 2:39 am, edited 1 time in total.
User avatar
f205v
Posts: 22
Joined: Tue Nov 11, 2014 10:31 pm
Location: Switzerland
Contact: Website

Re: problem compiling

Thank you for the quick answer!
I have no idea how to solve the problem, I'll wait for the software to be update and become compilable again.
------
Ciao
f205v
User avatar
Tafoid
Posts: 351
Joined: Thu Nov 06, 2014 12:50 pm
Location: USA
Contact: Website

Re: problem compiling

f205v wrote: Tue Jul 28, 2020 5:13 pm Thank you for the quick answer!
I have no idea how to solve the problem, I'll wait for the software to be update and become compilable again.

Here are some instructions posted by Lord_Nightmare which should allow you to revert your GCC to 10.1.0 assuming you constantly update your compile environ.
If you updated the mingw32-w64 local repository to the latest version of all packages using pacman -Syuu since July 24, 2020 10:40UTC ( https://github.com/msys2/MINGW-packages ... 6b347be5f3 ) you have the gcc 10.2.0-1 package installed, and due to something with gcc 10.2.0-1 interacting with the current version of 3rdparty/sol2 in the MAME tree it makes compiling MAME impossible.

To roll back to gcc 10.1.0-3, execute at the msys prompt:

pacman -U
/var/cache/pacman/pkg/mingw-w64-i686-gcc-10.1.0-3-any.pkg.tar.zst
/var/cache/pacman/pkg/mingw-w64-i686-gcc-libs-10.1.0-3-any.pkg.tar.zst
/var/cache/pacman/pkg/mingw-w64-x86_64-gcc-10.1.0-3-any.pkg.tar.zst
/var/cache/pacman/pkg/mingw-w64-x86_64-gcc-libs-10.1.0-3-any.pkg.tar.zst

and that should roll it back (temporarily, until `pacman -Syuu` is run
again), which will fix compilation.

I've tested this, and it works.
User avatar
f205v
Posts: 22
Joined: Tue Nov 11, 2014 10:31 pm
Location: Switzerland
Contact: Website

Re: problem compiling

Thank you Tafoid, very detailed explanation.
Unfortunately I'm running into a spaghetti jam of
warning: cannot resolve "mingw-w64-i686-gcc-libs=10.1.0-3", a dependency of "mingw-w64-i686-gcc"
:: The following package cannot be upgraded due to unresolvable dependencies:
mingw-w64-i686-gcc
and so on....

Do not worry, I'll wait. It's the safest option for me.
:(
------
Ciao
f205v
Lord Nightmare
Posts: 4
Joined: Thu Nov 06, 2014 1:21 pm

Re: problem compiling

You may have a 64-bit only installation of mingw32-w64 then.
Try this:

Code: Select all

pacman -U /var/cache/pacman/pkg/mingw-w64-x86_64-gcc-10.1.0-3-any.pkg.tar.zst /var/cache/pacman/pkg/mingw-w64-x86_64-gcc-libs-10.1.0-3-any.pkg.tar.zst
and assuming you had gcc 10.1.0-3 installed, that should work to downgrade you to it.

LN
Robert
Posts: 99
Joined: Thu Nov 06, 2014 12:44 pm

Re: problem compiling

(deleted)
Last edited by Robert on Fri Sep 23, 2022 2:40 am, edited 1 time in total.
User avatar
f205v
Posts: 22
Joined: Tue Nov 11, 2014 10:31 pm
Location: Switzerland
Contact: Website

Re: problem compiling

Robert wrote: Wed Jul 29, 2020 4:21 am A change was put in that might fix the compile with 10.2

Can you pull down latest Mame source and try again?
THIS!
Now it works and compile is successful!

Thank you for your help.
:D
------
Ciao
f205v
Mordor
Posts: 2
Joined: Thu Jun 30, 2016 4:17 am
Location: Chicago
Contact: Website

Re: problem compiling

Hello, I am just experiencing this problem myself trying to compile v0.224.
I have tried both fix posts from Tafoid and Lord Nightmare without success to downgrade... however, accidentally upgrading caused me to see this (if this helps in anyway):

Code: Select all

error: mingw32: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: mingw64: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: msys: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
:: Synchronizing package databases...
 mingw32                                     537.8 KiB  1992 KiB/s 00:00 [#######################################] 100%
 mingw32.sig                                 438.0   B  0.00   B/s 00:00 [#######################################] 100%
error: mingw32: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to update mingw32 (invalid or corrupted database (PGP signature))
 mingw64                                     539.5 KiB  4.58 MiB/s 00:00 [#######################################] 100%
 mingw64.sig                                 438.0   B  26.7 KiB/s 00:00 [#######################################] 100%
error: mingw64: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to update mingw64 (invalid or corrupted database (PGP signature))
 msys                                        213.4 KiB  0.00   B/s 00:00 [#######################################] 100%
 msys.sig                                    438.0   B  0.00   B/s 00:00 [#######################################] 100%
error: msys: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
After all that, I have then deleted and re-installed the MAME build tools (msys64-32-2019-12-23.exe), and re-set that up like usual... (without success as well). Any suggestions on how I may be able to fix this.... or should I just wait?

Thanks,
Mordor
User avatar
cuavas
Posts: 125
Joined: Tue Nov 11, 2014 1:04 pm
Location: Sydney, Australia
Contact: Website

Re: problem compiling

You need to follow the instructions to add the new packagers’ GPG signatures as detailed here: https://www.msys2.org/news/#2020-06-29-new-packagers

The key part to follow is these commands:

Code: Select all

curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
pacman -U msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
The “curl” commands download the latest keyring package and signature, you verify the signature of the downloaded package, then manually install it. After that, you should be able to update again.

If the final “pacman” command there fails, you can try to make it completely ignore signatures when installing the keyring package like this:

Code: Select all

pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz

Return to “MAME Discussion”