Previous Thread
Next Thread
Print Thread
#112312 - 01/24/18 11:07 AM Build issues with 'git latest'  
Joined: May 2008
Posts: 4,892
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,892
Germany
FYI: I encountered two build issues with the latest code from git that I could fix by adding #include "emu.h" to src/emu/attotime.cpp and src/emu/xtal.cpp (not sure if that's the right fix, though). I'm on openSUSE Tumbleweed x86_64.

Code
rene@marvin:~/src/mame-git> gitrevision 
a071fc2d5339a3802bdcf54a22e6e8c13e111636

rene@marvin:~/src/mame-git> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/6/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada,go --enable-offload-targets=hsa --enable-checking=release --with-gxx-include-dir=/usr/include/c++/6 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --enable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-6 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 6.4.1 20170704 [gcc-6-branch revision 249958] (SUSE Linux)

First issue:

Code
Compiling src/emu/attotime.cpp...
In file included from ../../../../../src/emu/attotime.cpp:13:0:
../../../../../src/emu/attotime.h:72:56: error: ‘XTAL’ does not name a type
 inline constexpr attoseconds_t HZ_TO_ATTOSECONDS(const XTAL &x) { return attoseconds_t(ATTOSECONDS_PER_SECOND / x.dvalue()); }
                                                        ^~~~
../../../../../src/emu/attotime.h: In function ‘constexpr attoseconds_t HZ_TO_ATTOSECONDS(const int&)’:
../../../../../src/emu/attotime.h:72:115: error: request for member ‘dvalue’ in ‘x’, which is of non-class type ‘const int’
 inline constexpr attoseconds_t HZ_TO_ATTOSECONDS(const XTAL &x) { return attoseconds_t(ATTOSECONDS_PER_SECOND / x.dvalue()); }
                                                                                                                   ^~~~~~
../../../../../src/emu/attotime.h: At global scope:
../../../../../src/emu/attotime.h:73:50: error: ‘HZ_TO_ATTOSECONDS’ declared as an ‘inline’ variable
 inline constexpr attoseconds_t HZ_TO_ATTOSECONDS(XTAL &&x) { return attoseconds_t(ATTOSECONDS_PER_SECOND / x.dvalue()); }
                                                  ^~~~
../../../../../src/emu/attotime.h:73:50: error: ‘constexpr const attoseconds_t HZ_TO_ATTOSECONDS’ redeclared as different kind of symbol
../../../../../src/emu/attotime.h:72:32: note: previous declaration ‘constexpr attoseconds_t HZ_TO_ATTOSECONDS(const int&)’
 inline constexpr attoseconds_t HZ_TO_ATTOSECONDS(const XTAL &x) { return attoseconds_t(ATTOSECONDS_PER_SECOND / x.dvalue()); }
                                ^~~~~~~~~~~~~~~~~
../../../../../src/emu/attotime.h:73:50: error: ‘XTAL’ was not declared in this scope
 inline constexpr attoseconds_t HZ_TO_ATTOSECONDS(XTAL &&x) { return attoseconds_t(ATTOSECONDS_PER_SECOND / x.dvalue()); }
                                                  ^~~~
../../../../../src/emu/attotime.h:73:57: error: ‘x’ was not declared in this scope
 inline constexpr attoseconds_t HZ_TO_ATTOSECONDS(XTAL &&x) { return attoseconds_t(ATTOSECONDS_PER_SECOND / x.dvalue()); }
                                                         ^
../../../../../src/emu/attotime.h:116:21: error: ‘XTAL’ does not name a type
  u64 as_ticks(const XTAL &xtal) const { return as_ticks(xtal.value()); }
                     ^~~~
../../../../../src/emu/attotime.h:127:46: error: ‘XTAL’ does not name a type
  static attotime from_ticks(u64 ticks, const XTAL &xtal) { return from_ticks(ticks, xtal.value()); }
                                              ^~~~
../../../../../src/emu/attotime.h:140:32: error: ‘XTAL’ does not name a type
  static attotime from_hz(const XTAL &xtal) { return from_hz(xtal.dvalue()); }
                                ^~~~
../../../../../src/emu/attotime.h: In member function ‘osd::u64 attotime::as_ticks(const int&) const’:
../../../../../src/emu/attotime.h:116:62: error: request for member ‘value’ in ‘xtal’, which is of non-class type ‘const int’
  u64 as_ticks(const XTAL &xtal) const { return as_ticks(xtal.value()); }
                                                              ^~~~~
../../../../../src/emu/attotime.h: In static member function ‘static attotime attotime::from_ticks(osd::u64, const int&)’:
../../../../../src/emu/attotime.h:127:90: error: request for member ‘value’ in ‘xtal’, which is of non-class type ‘const int’
  static attotime from_ticks(u64 ticks, const XTAL &xtal) { return from_ticks(ticks, xtal.value()); }
                                                                                          ^~~~~
../../../../../src/emu/attotime.h: In static member function ‘static attotime attotime::from_hz(const int&)’:
../../../../../src/emu/attotime.h:140:66: error: request for member ‘dvalue’ in ‘xtal’, which is of non-class type ‘const int’
  static attotime from_hz(const XTAL &xtal) { return from_hz(xtal.dvalue()); }
                                                                  ^~~~~~
make[2]: *** [emu.make:842: ../../../../linux_gcc/obj/x64/Release/src/emu/attotime.o] Error 1
make[1]: *** [Makefile:82: emu] Error 2
make[1]: *** Waiting for unfinished jobs....

Second issue:

Code
Compiling src/emu/xtal.cpp...
../../../../../src/emu/xtal.cpp:50:14: error: ‘XTAL’ has not been declared
 const double XTAL::known_xtals[] = {
              ^~~~
../../../../../src/emu/xtal.cpp:343:8: error: ‘XTAL’ has not been declared
 double XTAL::last_correct_value = -1;
        ^~~~
../../../../../src/emu/xtal.cpp:344:8: error: ‘XTAL’ has not been declared
 double XTAL::xtal_error_low = 0;
        ^~~~
../../../../../src/emu/xtal.cpp:345:8: error: ‘XTAL’ has not been declared
 double XTAL::xtal_error_high = 0;
        ^~~~
../../../../../src/emu/xtal.cpp:347:6: error: ‘XTAL’ has not been declared
 bool XTAL::validate(double base_clock)
      ^~~~
../../../../../src/emu/xtal.cpp:400:6: error: ‘XTAL’ has not been declared
 void XTAL::validate(const char *message) const
      ^~~~
../../../../../src/emu/xtal.cpp:400:42: error: non-member function ‘void validate(const char*)’ cannot have cv-qualifier
 void XTAL::validate(const char *message) const
                                          ^~~~~
../../../../../src/emu/xtal.cpp: In function ‘void validate(const char*)’:
../../../../../src/emu/xtal.cpp:402:15: error: ‘m_base_clock’ was not declared in this scope
  if(!validate(m_base_clock))
               ^~~~~~~~~~~~
../../../../../src/emu/xtal.cpp:403:29: error: ‘fail’ was not declared in this scope
   fail(m_base_clock, message);
                             ^
../../../../../src/emu/xtal.cpp: At global scope:
../../../../../src/emu/xtal.cpp:406:6: error: ‘XTAL’ has not been declared
 void XTAL::validate(const std::string &message) const
      ^~~~
../../../../../src/emu/xtal.cpp:406:32: error: ‘string’ in namespace ‘std’ does not name a type
 void XTAL::validate(const std::string &message) const
                                ^~~~~~
../../../../../src/emu/xtal.cpp:406:49: error: non-member function ‘void validate(const int&)’ cannot have cv-qualifier
 void XTAL::validate(const std::string &message) const
                                                 ^~~~~
../../../../../src/emu/xtal.cpp: In function ‘void validate(const int&)’:
../../../../../src/emu/xtal.cpp:408:15: error: ‘m_base_clock’ was not declared in this scope
  if(!validate(m_base_clock))
               ^~~~~~~~~~~~
../../../../../src/emu/xtal.cpp:409:29: error: ‘fail’ was not declared in this scope
   fail(m_base_clock, message);
                             ^
../../../../../src/emu/xtal.cpp: At global scope:
../../../../../src/emu/xtal.cpp:412:6: error: ‘XTAL’ has not been declared
 void XTAL::fail(double base_clock, std::string message)
      ^~~~
../../../../../src/emu/xtal.cpp:412:41: error: ‘std::string’ has not been declared
 void XTAL::fail(double base_clock, std::string message)
                                         ^~~~~~
../../../../../src/emu/xtal.cpp: In function ‘void fail(double, int)’:
../../../../../src/emu/xtal.cpp:414:2: error: ‘string’ is not a member of ‘std’
  std::string full_message = util::string_format("Unknown crystal value %.0f. ", base_clock);
  ^~~
../../../../../src/emu/xtal.cpp:416:3: error: ‘full_message’ was not declared in this scope
   full_message += util::string_format(" Did you mean %.0f or %.0f?", xtal_error_low, xtal_error_high);
   ^~~~~~~~~~~~
../../../../../src/emu/xtal.cpp:416:19: error: ‘util’ has not been declared
   full_message += util::string_format(" Did you mean %.0f or %.0f?", xtal_error_low, xtal_error_high);
                   ^~~~
../../../../../src/emu/xtal.cpp:418:3: error: ‘full_message’ was not declared in this scope
   full_message += util::string_format(" Did you mean %.0f?", xtal_error_low ? xtal_error_low : xtal_error_high);
   ^~~~~~~~~~~~
../../../../../src/emu/xtal.cpp:418:19: error: ‘util’ has not been declared
   full_message += util::string_format(" Did you mean %.0f?", xtal_error_low ? xtal_error_low : xtal_error_high);
                   ^~~~
../../../../../src/emu/xtal.cpp:419:2: error: ‘full_message’ was not declared in this scope
  full_message += util::string_format(" Context: %s\n", message);
  ^~~~~~~~~~~~
../../../../../src/emu/xtal.cpp:419:18: error: ‘util’ has not been declared
  full_message += util::string_format(" Context: %s\n", message);
                  ^~~~
../../../../../src/emu/xtal.cpp:420:41: error: ‘fatalerror’ was not declared in this scope
  fatalerror("%s\n", full_message.c_str());
                                         ^
make[2]: *** [emu.make:1198: ../../../../linux_gcc/obj/x64/Release/src/emu/xtal.o] Error 1
make[2]: *** Waiting for unfinished jobs....



A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112338 - 01/25/18 09:53 AM Re: Build issues with 'git latest' [Re: qmc2]  
Joined: May 2008
Posts: 4,892
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,892
Germany
Update: OK, the second issue was fixed by Vas meanwhile. The first one (with attotime.cpp) still exists, though.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112362 - 01/26/18 09:35 AM Re: Build issues with 'git latest' [Re: qmc2]  
Joined: May 2008
Posts: 4,892
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,892
Germany
Update 2: Above issues are fixed, thanks. However, now I get a new one (at several places):

Code
Compiling src/frontend/mame/clifront.cpp...
In file included from /usr/include/c++/6/x86_64-suse-linux/bits/c++allocator.h:33:0,
                 from /usr/include/c++/6/bits/allocator.h:46,
                 from /usr/include/c++/6/list:61,
                 from ../../../../../src/emu/emu.h:21,
                 from ../../../../../src/frontend/mame/clifront.cpp:11:
/usr/include/c++/6/ext/new_allocator.h: In instantiation of ‘class __gnu_cxx::new_allocator<const std::__cxx11::basic_string<char> >’:
/usr/include/c++/6/bits/allocator.h:108:11:   required from ‘class std::allocator<const std::__cxx11::basic_string<char> >’
/usr/include/c++/6/bits/stl_list.h:506:58:   required from ‘class std::__cxx11::list<const std::__cxx11::basic_string<char> >’
../../../../../src/frontend/mame/pluginopts.h:30:31:   required from here
/usr/include/c++/6/ext/new_allocator.h:93:7: error: ‘const _Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::const_reference) const [with _Tp = const std::__cxx11::basic_string<char>; __gnu_cxx::new_allocator<_Tp>::const_pointer = const std::__cxx11::basic_string<char>*; __gnu_cxx::new_allocator<_Tp>::const_reference = const std::__cxx11::basic_string<char>&]’ cannot be overloaded
       address(const_reference __x) const _GLIBCXX_NOEXCEPT
       ^~~~~~~
/usr/include/c++/6/ext/new_allocator.h:89:7: error: with ‘_Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::reference) const [with _Tp = const std::__cxx11::basic_string<char>; __gnu_cxx::new_allocator<_Tp>::pointer = const std::__cxx11::basic_string<char>*; __gnu_cxx::new_allocator<_Tp>::reference = const std::__cxx11::basic_string<char>&]’
       address(reference __x) const _GLIBCXX_NOEXCEPT
       ^~~~~~~
make[2]: *** [frontend.make:595: ../../../../linux_gcc/obj/x64/Release/src/frontend/mame/clifront.o] Error 1
make[2]: *** Waiting for unfinished jobs....

That one I could fix by this:

Code
rene@marvin:~/src/mame-git> git diff | cat
diff --git a/src/frontend/mame/pluginopts.h b/src/frontend/mame/pluginopts.h
index f306c925ce..27e5710429 100644
--- a/src/frontend/mame/pluginopts.h
+++ b/src/frontend/mame/pluginopts.h
@@ -27,7 +27,7 @@ public:
 
 private:
        static const options_entry s_option_entries[];
-       std::list<std::string const> m_descriptions;
+       std::list<std::string> m_descriptions;
 };
 
 #endif // MAME_FRONTEND_PLUGINOPTS_H

Code
rene@marvin:~/src/mame-git> gitrevision 
93cc49dfb8fc5de52969280022c50e32c70b0258


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112366 - 01/26/18 12:18 PM Re: Build issues with 'git latest' [Re: qmc2]  
Joined: Feb 2004
Posts: 1,961
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,961
Sydney, Australia
Some intermediate versions will always fail to build, particularly in unusual configurations. Also, not every developer tests every change with every supported platform, and most developers only have access to a subset of supported platforms.

#112367 - 01/26/18 12:22 PM Re: Build issues with 'git latest' [Re: qmc2]  
Joined: May 2008
Posts: 4,892
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,892
Germany
Sure. Also, I'm not "complaining", I just want to let you know... because I tested it smile.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!

Moderated by  R. Belmont 

Who's Online Now
1 registered members (Olivier Galibert), 15 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,543
Posts111,676
Members4,795
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.026s Queries: 14 (0.010s) Memory: 4.9718 MB (Peak: 5.1617 MB) Zlib enabled. Server Time: 2018-06-20 10:56:22 UTC