Post
by User923005 » Sat Dec 22, 2012 6:49 am
The clang compiler fared no better:
$ clang --version
clang version 3.1 (branches/release_31)
Target: x86_64-w64-mingw32
Thread model: posix
$ make profile-build ARCH=x86-64-modern COMP=clang
make ARCH=x86-64-modern COMP=clang config-sanity
make[1]: Entering directory `/c/project/Stockfish-c-11/src'
Config:
debug: 'no'
optimize: 'yes'
arch: 'x86_64'
os: 'any'
bits: '64'
prefetch: 'yes'
bsfq: 'yes'
popcnt: 'yes'
sse: 'yes'
Flags:
CXX: clang++
CXXFLAGS: -g -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BS
FQ -msse3 -DUSE_POPCNT
LDFLAGS: -lpthread
Testing config sanity. If this fails, try 'make help' ...
make[1]: Leaving directory `/c/project/Stockfish-c-11/src'
Step 0/4. Preparing for profile build.
make ARCH=x86-64-modern COMP=clang gcc-profile-prepare
make[1]: Entering directory `/c/project/Stockfish-c-11/src'
make ARCH=x86-64-modern COMP=clang gcc-profile-clean
make[2]: Entering directory `/c/project/Stockfish-c-11/src'
make[2]: Leaving directory `/c/project/Stockfish-c-11/src'
make[1]: Leaving directory `/c/project/Stockfish-c-11/src'
Step 1/4. Building executable for benchmark ...
make ARCH=x86-64-modern COMP=clang gcc-profile-make
make[1]: Entering directory `/c/project/Stockfish-c-11/src'
make ARCH=x86-64-modern COMP=clang \
EXTRACXXFLAGS='-fprofile-generate' \
EXTRALDFLAGS='-lgcov' \
all
make[2]: Entering directory `/c/project/Stockfish-c-11/src'
clang++ -g -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -fprofile-generate -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BI
T -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o benchmark.o benchmark.cpp
In file included from benchmark.cpp:27:
In file included from ./search.h:24:
In file included from c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\memory:75:
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\ext/concurrence.h:228:2: error: no matching function for call to '_S_destroy'
_S_destroy(&_M_mutex);
^~~~~~~~~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\ext/concurrence.h:273:7: note: candidate template ignored: substitution failure
[with _Rm = __gthread_recursive_mutex_t]
_S_destroy(_Rm* __mx)
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\ext/concurrence.h:282:7: note: candidate template ignored: substitution failure
[with _Rm = __gthread_recursive_mutex_t]
_S_destroy(_Rm* __mx)
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\ext/concurrence.h:290:7: note: candidate template ignored: substitution failure
[with _Rm = __gthread_recursive_mutex_t]
_S_destroy(_Rm* __mx)
^
In file included from benchmark.cpp:28:
In file included from ./thread.h:23:
In file included from c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\condition_variable:37:
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:240:10: error: cannot cast from lvalue of type 'const long long' to rvalue
reference type 'rep' (aka 'long long &&'); types are not compatible
: __r(static_cast<rep>(__rep)) { }
^~~~~~~~~~~~~~~~~~~~~~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:128:13: note: in instantiation of function template specialization
'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, void>' requested here
return _ToDur(static_cast<__to_rep>(__d.count()));
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:182:9: note: in instantiation of function template specialization
'std::chrono::__duration_cast_impl<std::chrono::duration<long long &&, std::ratio<1, 1000000> >, std::ratio<1, 1>, long long &&, true,
true>::__cast<long long, std::ratio<1, 1000000> >' requested here
return __dc::__cast(__d);
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:247:10: note: in instantiation of function template specialization
'std::chrono::duration_cast<std::chrono::duration<long long &&, std::ratio<1, 1000000> >, long long, std::ratio<1, 1000000> >' requested here
: __r(duration_cast<duration>(__d).count()) { }
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:466:9: note: in instantiation of function template specialization
'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>' requested here
return __ct(__lhs).count() < __ct(__rhs).count();
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:667:7: note: in instantiation of function template specialization
'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
< system_clock::duration::zero(),
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:128:13: error: call to implicitly-deleted copy constructor of
'std::chrono::duration<long long &&, std::ratio<1, 1000000> >'
return _ToDur(static_cast<__to_rep>(__d.count()));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:182:9: note: in instantiation of function template specialization
'std::chrono::__duration_cast_impl<std::chrono::duration<long long &&, std::ratio<1, 1000000> >, std::ratio<1, 1>, long long &&, true,
true>::__cast<long long, std::ratio<1, 1000000> >' requested here
return __dc::__cast(__d);
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:247:10: note: in instantiation of function template specialization
'std::chrono::duration_cast<std::chrono::duration<long long &&, std::ratio<1, 1000000> >, long long, std::ratio<1, 1000000> >' requested here
: __r(duration_cast<duration>(__d).count()) { }
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:466:9: note: in instantiation of function template specialization
'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>' requested here
return __ct(__lhs).count() < __ct(__rhs).count();
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:667:7: note: in instantiation of function template specialization
'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
< system_clock::duration::zero(),
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:233:12: note: explicitly defaulted function was implicitly deleted here
constexpr duration(const duration&) = default;
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:349:6: note: copy constructor of 'duration<long long &&, std::ratio<1, 1000000> >'
is implicitly deleted because field '__r' is of rvalue reference type 'rep' (aka 'long long &&')
rep __r;
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:182:9: error: call to implicitly-deleted copy constructor of 'typename
enable_if<__is_duration<duration<long long &&, ratio<1, 1000000> > >::value, duration<long long &&, ratio<1, 1000000> > >::type' (aka
'std::chrono::duration<long long &&, std::ratio<1, 1000000> >')
return __dc::__cast(__d);
^~~~~~~~~~~~~~~~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:247:10: note: in instantiation of function template specialization
'std::chrono::duration_cast<std::chrono::duration<long long &&, std::ratio<1, 1000000> >, long long, std::ratio<1, 1000000> >' requested here
: __r(duration_cast<duration>(__d).count()) { }
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:466:9: note: in instantiation of function template specialization
'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>' requested here
return __ct(__lhs).count() < __ct(__rhs).count();
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:667:7: note: in instantiation of function template specialization
'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
< system_clock::duration::zero(),
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:233:12: note: explicitly defaulted function was implicitly deleted here
constexpr duration(const duration&) = default;
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:349:6: note: copy constructor of 'duration<long long &&, std::ratio<1, 1000000> >'
is implicitly deleted because field '__r' is of rvalue reference type 'rep' (aka 'long long &&')
rep __r;
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:255:11: error: rvalue reference to type 'long long' cannot bind to lvalue of type
'long long'
{ return __r; }
^~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:247:39: note: in instantiation of member function 'std::chrono::duration<long long
&&, std::ratio<1, 1000000> >::count' requested here
: __r(duration_cast<duration>(__d).count()) { }
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:466:9: note: in instantiation of function template specialization
'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>' requested here
return __ct(__lhs).count() < __ct(__rhs).count();
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:667:7: note: in instantiation of function template specialization
'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
< system_clock::duration::zero(),
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:666:21: error: static_assert expression is not an integral constant expression
static_assert(system_clock::duration::min()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:666:21: note: undefined function 'operator<<long long, std::ratio<1, 1000000>, long
long, std::ratio<1, 1000000> >' cannot be used in a constant expression
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:460:7: note: declared here
operator<(const duration<_Rep1, _Period1>& __lhs,
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:141:40: error: cannot cast from lvalue of type 'const intmax_t'
(aka 'const long long') to rvalue reference type 'long long &&'; types are not compatible
static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den)));
^~~~~~~~~~~~~~~~~~~~~~~~~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:182:9: note: in instantiation of function template specialization
'std::chrono::__duration_cast_impl<std::chrono::duration<long long, std::ratio<1, 1> >, std::ratio<1, 1000000>, long long &&, true,
false>::__cast<long long, std::ratio<1, 1000000> >' requested here
return __dc::__cast(__d);
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:679:21: note: in instantiation of function template specialization
'std::chrono::duration_cast<std::chrono::duration<long long, std::ratio<1, 1> >, long long, std::ratio<1, 1000000> >' requested here
return std::time_t(duration_cast<chrono::seconds>
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:154:40: error: cannot cast from lvalue of type 'const intmax_t'
(aka 'const long long') to rvalue reference type 'long long &&'; types are not compatible
static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num)));
^~~~~~~~~~~~~~~~~~~~~~~~~~
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:182:9: note: in instantiation of function template specialization
'std::chrono::__duration_cast_impl<std::chrono::duration<long long, std::ratio<1, 1000000> >, std::ratio<1000000, 1>, long long &&, false,
true>::__cast<long long, std::ratio<1, 1> >' requested here
return __dc::__cast(__d);
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:577:22: note: in instantiation of function template specialization
'std::chrono::duration_cast<std::chrono::duration<long long, std::ratio<1, 1000000> >, long long, std::ratio<1, 1> >' requested here
return __time_point(duration_cast<_ToDur>(__t.time_since_epoch()));
^
c:/mingw64/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\chrono:687:9: note: in instantiation of function template specialization
'std::chrono::time_point_cast<std::chrono::duration<long long, std::ratio<1, 1000000> >, std::chrono::system_clock, std::chrono::duration<long
long, std::ratio<1, 1> > >' requested here
return time_point_cast<system_clock::duration>
^
In file included from benchmark.cpp:28:
./thread.h:55:10: error: no type named 'mutex' in namespace 'std'
std::mutex mutex;
~~~~~^
./thread.h:93:10: error: no type named 'thread' in namespace 'std'
std::thread nativeThread;
~~~~~^
./thread.h:94:10: error: no type named 'mutex' in namespace 'std'
std::mutex mutex;
~~~~~^
./thread.h:95:10: error: no type named 'condition_variable' in namespace 'std'
std::condition_variable sleepCondition;
~~~~~^
./thread.h:148:10: error: no type named 'mutex' in namespace 'std'
std::mutex mutex;
~~~~~^
./thread.h:149:10: error: no type named 'condition_variable' in namespace 'std'
std::condition_variable sleepCondition;
~~~~~^
benchmark.cpp:80:34: error: use of undeclared identifier 'stoi'; did you mean 'atoi'?
limits.movetime = 1000 * stoi(limit); // movetime is in ms
^~~~
atoi
c:/mingw64/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\stdlib.h:342:15: note: 'atoi' declared here
int __cdecl atoi(const char *_Str);
^
benchmark.cpp:80:39: error: no viable conversion from 'string' (aka 'basic_string<char>') to 'const char *'
limits.movetime = 1000 * stoi(limit); // movetime is in ms
^~~~~
c:/mingw64/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\stdlib.h:342:32: note: passing argument to parameter '_Str' here
int __cdecl atoi(const char *_Str);
^
benchmark.cpp:83:24: error: use of undeclared identifier 'stoi'; did you mean 'atoi'?
limits.nodes = stoi(limit);
^~~~
atoi
c:/mingw64/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\stdlib.h:342:15: note: 'atoi' declared here
int __cdecl atoi(const char *_Str);
^
benchmark.cpp:83:29: error: no viable conversion from 'string' (aka 'basic_string<char>') to 'const char *'
limits.nodes = stoi(limit);
^~~~~
c:/mingw64/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\stdlib.h:342:32: note: passing argument to parameter '_Str' here
int __cdecl atoi(const char *_Str);
^
benchmark.cpp:86:24: error: use of undeclared identifier 'stoi'; did you mean 'atoi'?
limits.depth = stoi(limit);
^~~~
atoi
c:/mingw64/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\stdlib.h:342:15: note: 'atoi' declared here
int __cdecl atoi(const char *_Str);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [benchmark.o] Error 1
make[2]: Leaving directory `/c/project/Stockfish-c-11/src'
make[1]: *** [gcc-profile-make] Error 2
make[1]: Leaving directory `/c/project/Stockfish-c-11/src'
make: *** [profile-build] Error 2
$