Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw build failure on z8000 using gcc 6.2 #2347

Closed
JoakimLarsson opened this issue May 30, 2017 · 3 comments
Closed

mingw build failure on z8000 using gcc 6.2 #2347

JoakimLarsson opened this issue May 30, 2017 · 3 comments

Comments

@JoakimLarsson
Copy link
Contributor

Compiling src/devices/cpu/z8000/z8000.cpp...
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h: In instantiation of 'void std::unique_ptr<_Tp [], _Dp>::reset(_Up) [with _Up = z8002_device::Z8000_exec*; = void; _Tp = const z8002_device::Z8000_exec; _Dp = std::default_delete<const z8002_device::Z8000_exec []>]':
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:539:9: required from 'typename std::enable_if<std::_and<std::_and<std::is_array<_Up>, std::is_same<typename std::unique_ptr<_Tp [], _Dp>::_Pointer::type, _Tp*>, std::is_same<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Up, _Ep>::element_type*>, std::is_convertible<typename std::unique_ptr<_Up, _Ep>::element_type ()[], _Tp ()[]>, std::_or<std::_and<std::is_reference<_Dp>, std::is_same<_Dp, _Ep> >, std::_and<std::_not<std::is_reference<_Dp> >, std::is_convertible<_Ep, _Dp> > > >, std::is_assignable<_Dp&, _Ep&&> >::value, std::unique_ptr<_Tp [], _Dp>&>::type std::unique_ptr<_Tp [], _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = z8002_device::Z8000_exec []; _Ep = std::default_delete<z8002_device::Z8000_exec []>; _Tp = const z8002_device::Z8000_exec; _Dp = std::default_delete<const z8002_device::Z8000_exec []>; typename std::enable_if<std::_and<std::_and<std::is_array<_Up>, std::is_same<typename std::unique_ptr<_Tp [], _Dp>::_Pointer::type, _Tp*>, std::is_same<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Up, _Ep>::element_type*>, std::is_convertible<typename std::unique_ptr<_Up, _Ep>::element_type ()[], _Tp ()[]>, std::_or<std::_and<std::is_reference<_Dp>, std::is_same<_Dp, _Ep> >, std::_and<std::_not<std::is_reference<_Dp> >, std::is_convertible<_Ep, _Dp> > > >, std::is_assignable<_Dp&, _Ep&&> >::value, std::unique_ptr<_Tp [], _Dp>&>::type = std::unique_ptr<const z8002_device::Z8000_exec []>&]'
../../../../../src/devices/cpu/z8000/z8000tbl.hxx:578:29: required from here
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: error: no matching function for call to 'swap(const z8002_device::Z8000_exec*&, z8002_device::Z8000_exec*&)'
swap(std::get<0>(_M_t), __p);

In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_pair.h:59:0,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_algobase.h:64,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/list:60,
               from ../../../../../src/emu/emu.h:21:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/move.h:179:5: note: candidate: template<class _Tp> typename std::enable_if<std::__and_<std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&)
   swap(_Tp& __a, _Tp& __b)
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/move.h:179:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   deduced conflicting types for parameter '_Tp' ('const z8002_device::Z8000_exec*' and 'z8002_device::Z8000_exec*')
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_pair.h:59:0,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_algobase.h:64,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/list:60,
               from ../../../../../src/emu/emu.h:21:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/move.h:202:5: note: candidate: template<class _Tp, long long unsigned int _Nm> typename std::enable_if<std::__is_swappable<_Tp>::value>::type std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])
   swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/move.h:202:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types '_Tp [_Nm]' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_algobase.h:64:0,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/list:60,
               from ../../../../../src/emu/emu.h:21:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_pair.h:403:5: note: candidate: template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)
   swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_pair.h:403:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types 'std::pair<_T1, _T2>' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/list:63:0,
               from ../../../../../src/emu/emu.h:21:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_list.h:1918:5: note: candidate: template<class _Tp, class _Alloc> void std::swap(std::__cxx11::list<_Tp, _Alloc>&, std::__cxx11::list<_Tp, _Alloc>&)
   swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_list.h:1918:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types 'std::__cxx11::list<_Tp, _Alloc>' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/vector:64:0,
               from ../../../../../src/emu/emu.h:22:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_vector.h:1557:5: note: candidate: template<class _Tp, class _Alloc> void std::swap(std::vector<_Tp, _Alloc>&, std::vector<_Tp, _Alloc>&)
   swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_vector.h:1557:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types 'std::vector<_Tp, _Alloc>' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/vector:65:0,
               from ../../../../../src/emu/emu.h:22:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_bvector.h:112:3: note: candidate: void std::swap(std::_Bit_reference, std::_Bit_reference)
 swap(_Bit_reference __x, _Bit_reference __y) noexcept
 ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_bvector.h:112:3: note:   no known conversion for argument 1 from 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}' to 'std::_Bit_reference'
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_bvector.h:120:3: note: candidate: void std::swap(std::_Bit_reference, bool&)
 swap(_Bit_reference __x, bool& __y) noexcept
 ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_bvector.h:120:3: note:   no known conversion for argument 1 from 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}' to 'std::_Bit_reference'
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_bvector.h:128:3: note: candidate: void std::swap(bool&, std::_Bit_reference)
 swap(bool& __x, _Bit_reference __y) noexcept
 ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/stl_bvector.h:128:3: note:   no known conversion for argument 2 from 'z8002_device::Z8000_exec*' to 'std::_Bit_reference'
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/string:52:0,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/stdexcept:39,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/array:39,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/tuple:39,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/functional:55,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:79,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/basic_string.h:5287:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> void std::swap(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
   swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/basic_string.h:5287:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/tuple:39:0,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/functional:55,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:79,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/array:275:5: note: candidate: template<class _Tp, long long unsigned int _Nm> void std::swap(std::array<_Tp, _Nm>&, std::array<_Tp, _Nm>&)
   swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/array:275:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types 'std::array<_Tp, _Nm>' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/functional:55:0,
               from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:79,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/tuple:1546:5: note: candidate: template<class ... _Elements> void std::swap(std::tuple<_Elements ...>&, std::tuple<_Elements ...>&)
   swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/tuple:1546:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types 'std::tuple<_Elements ...>' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:79:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/functional:2238:5: note: candidate: template<class _Res, class ... _Args> void std::swap(std::function<_Res(_ArgTypes ...)>&, std::function<_Res(_ArgTypes ...)>&)
   swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y)
   ^~~~
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/functional:2238:5: note:   template argument deduction/substitution failed:
In file included from C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/memory:81:0,
               from ../../../../../src/emu/emu.h:23:
C:/Users/jolar/Downloads/msys64/mingw64/include/c++/6.2.0/bits/unique_ptr.h:614:6: note:   mismatched types 'std::function<_Res(_ArgTypes ...)>' and 'std::__tuple_element_t<0ull, std::tuple<const z8002_device::Z8000_exec*, std::default_delete<const z8002_device::Z8000_exec []> > > {aka const z8002_device::Z8000_exec*}'
swap(std::get<0>(_M_t), __p);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
optional.make:15578: recipe for target '../../../../mingw-gcc/obj/x64/Release/src/devices/cpu/z8000/z8000.o' failed
make[2]: *** [../../../../mingw-gcc/obj/x64/Release/src/devices/cpu/z8000/z8000.o] Error 1
makefile:88: recipe for target 'optional' failed
make[1]: *** [optional] Error 2
makefile:993: recipe for target 'windows_x64' failed
make: *** [windows_x64] Error 2

jolar@STOW0004  ~/work/mame
@cuavas
Copy link
Member

cuavas commented May 30, 2017

Well, it's working fine on GCC 6.3 on Windows and Linux, GCC 5.1 on Linux, clang 3.9 on OSX, VS2015 Update 3 on Windows, and whatever other versions of clang @smf- is using on Windows. I'd say your best bet is to update GCC.

@cracyc
Copy link
Member

cracyc commented May 30, 2017

This is a compiler bug fixed in 6.3. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77987

@rb6502 rb6502 closed this as completed May 30, 2017
@JoakimLarsson
Copy link
Contributor Author

Thx, I, ll update to 6.3

belegdol pushed a commit to belegdol/mame that referenced this issue May 8, 2021
(cherry picked from commit 8c4cc84c628c5668de736ebe473bed87aeb3a113)
belegdol pushed a commit to belegdol/mame that referenced this issue Jul 24, 2021
(cherry picked from commit 8c4cc84c628c5668de736ebe473bed87aeb3a113)
belegdol pushed a commit to belegdol/mame that referenced this issue Jul 25, 2021
(cherry picked from commit 8c4cc84c628c5668de736ebe473bed87aeb3a113)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants