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

Cross-compile on Linux, target i686-pc-windows-gnu fails. #31

Closed
John-Nagle opened this issue Mar 11, 2022 · 5 comments
Closed

Cross-compile on Linux, target i686-pc-windows-gnu fails. #31

John-Nagle opened this issue Mar 11, 2022 · 5 comments

Comments

@John-Nagle
Copy link

Compiling a program that uses Tracy and works on Linux.
Trying a compile with target cargo build --target i686-pc-windows-gnu. Compile time errors.

Looks like a missing dependency at the C++ level, or wrong version, or something like that.

System doing the compile is 20.04 LTS.

Program being compiled is "Rend3": Location: https://github.com/BVE-Reborn/rend3

The following warnings were emitted during compilation:

warning: In file included from tracy/client/TracyProfiler.hpp:17,
warning:                  from tracy/client/TracyScoped.hpp:11,
warning:                  from tracy/client/TracyProfiler.cpp:71,
warning:                  from tracy/TracyClient.cpp:23:
warning: tracy/client/../common/TracyMutex.hpp:19:25: error: ‘mutex’ in namespace ‘std’ does not name a type
warning:    19 | using TracyMutex = std::mutex;
warning:       |                         ^~~~~
warning: tracy/client/../common/TracyMutex.hpp:16:1: note: ‘std::mutex’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
warning:    15 | #include <mutex>
warning:   +++ |+#include <mutex>
warning:    16 | 
warning: In file included from tracy/client/TracyScoped.hpp:11,
warning:                  from tracy/client/TracyProfiler.cpp:71,
warning:                  from tracy/TracyClient.cpp:23:
warning: tracy/client/TracyProfiler.hpp:795:5: error: ‘TracyMutex’ does not name a type
warning:   795 |     TracyMutex m_serialLock;
warning:       |     ^~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:799:5: error: ‘TracyMutex’ does not name a type
warning:   799 |     TracyMutex m_fiLock;
warning:       |     ^~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static tracy::QueueItem* tracy::Profiler::QueueSerial()’:
warning: tracy/client/TracyProfiler.hpp:170:11: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   170 |         p.m_serialLock.lock();
warning:       |           ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static tracy::QueueItem* tracy::Profiler::QueueSerialCallstack(void*)’:
warning: tracy/client/TracyProfiler.hpp:177:11: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   177 |         p.m_serialLock.lock();
warning:       |           ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::QueueSerialFinish()’:
warning: tracy/client/TracyProfiler.hpp:186:11: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   186 |         p.m_serialLock.unlock();
warning:       |           ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::SendFrameImage(const void*, uint16_t, uint16_t, uint8_t, bool)’:
warning: tracy/client/TracyProfiler.hpp:226:18: error: ‘class tracy::Profiler’ has no member named ‘m_fiLock’; did you mean ‘m_sock’?
warning:   226 |         profiler.m_fiLock.lock();
warning:       |                  ^~~~~~~~
warning:       |                  m_sock
warning: tracy/client/TracyProfiler.hpp:234:18: error: ‘class tracy::Profiler’ has no member named ‘m_fiLock’; did you mean ‘m_sock’?
warning:   234 |         profiler.m_fiLock.unlock();
warning:       |                  ^~~~~~~~
warning:       |                  m_sock
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemAlloc(const void*, size_t, bool)’:
warning: tracy/client/TracyProfiler.hpp:398:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   398 |         GetProfiler().m_serialLock.lock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:400:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   400 |         GetProfiler().m_serialLock.unlock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemFree(const void*, bool)’:
warning: tracy/client/TracyProfiler.hpp:411:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   411 |         GetProfiler().m_serialLock.lock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:413:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   413 |         GetProfiler().m_serialLock.unlock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemAllocCallstack(const void*, size_t, int, bool)’:
warning: tracy/client/TracyProfiler.hpp:429:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   429 |         profiler.m_serialLock.lock();
warning:       |                  ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:432:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   432 |         profiler.m_serialLock.unlock();
warning:       |                  ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemFreeCallstack(const void*, int, bool)’:
warning: tracy/client/TracyProfiler.hpp:451:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   451 |         profiler.m_serialLock.lock();
warning:       |                  ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:454:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   454 |         profiler.m_serialLock.unlock();
warning:       |                  ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemAllocNamed(const void*, size_t, bool, const char*)’:
warning: tracy/client/TracyProfiler.hpp:468:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   468 |         GetProfiler().m_serialLock.lock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:471:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   471 |         GetProfiler().m_serialLock.unlock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemFreeNamed(const void*, bool, const char*)’:
warning: tracy/client/TracyProfiler.hpp:482:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   482 |         GetProfiler().m_serialLock.lock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:485:23: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   485 |         GetProfiler().m_serialLock.unlock();
warning:       |                       ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemAllocCallstackNamed(const void*, size_t, int, bool, const char*)’:
warning: tracy/client/TracyProfiler.hpp:501:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   501 |         profiler.m_serialLock.lock();
warning:       |                  ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:505:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   505 |         profiler.m_serialLock.unlock();
warning:       |                  ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp: In static member function ‘static void tracy::Profiler::MemFreeCallstackNamed(const void*, int, bool, const char*)’:
warning: tracy/client/TracyProfiler.hpp:524:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   524 |         profiler.m_serialLock.lock();
warning:       |                  ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.hpp:528:18: error: ‘class tracy::Profiler’ has no member named ‘m_serialLock’
warning:   528 |         profiler.m_serialLock.unlock();
warning:       |                  ^~~~~~~~~~~~
warning: In file included from tracy/TracyClient.cpp:23:
warning: tracy/client/TracyProfiler.cpp: At global scope:
warning: tracy/client/TracyProfiler.cpp:141:10: error: ‘once_flag’ in namespace ‘std’ does not name a type
warning:   141 |     std::once_flag once_flag;
warning:       |          ^~~~~~~~~
warning: In file included from tracy/TracyClient.cpp:23:
warning: tracy/client/TracyProfiler.cpp:99:1: note: ‘std::once_flag’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
warning:    98 | #  include <lmcons.h>
warning:   +++ |+#include <mutex>
warning:    99 | extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
warning: In file included from tracy/TracyClient.cpp:23:
warning: tracy/client/TracyProfiler.cpp: In constructor ‘tracy::RPMallocInit::RPMallocInit()’:
warning: tracy/client/TracyProfiler.cpp:154:14: error: ‘call_once’ is not a member of ‘std’
warning:   154 |         std::call_once( once_flag, InitOnceCallback );
warning:       |              ^~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:154:25: error: ‘once_flag’ was not declared in this scope
warning:   154 |         std::call_once( once_flag, InitOnceCallback );
warning:       |                         ^~~~~~~~~
warning: In file included from tracy/TracyClient.cpp:23:
warning: tracy/client/TracyProfiler.cpp: In function ‘const char* tracy::GetHostInfo()’:
warning: tracy/client/TracyProfiler.cpp:531:50: error: ‘std::thread’ has not been declared
warning:   531 |     ptr += sprintf( ptr, "CPU cores: %i\n", std::thread::hardware_concurrency() );
warning:       |                                                  ^~~~~~
warning: tracy/client/TracyProfiler.cpp: In function ‘LONG tracy::CrashFilter(PEXCEPTION_POINTERS)’:
warning: tracy/client/TracyProfiler.cpp:702:10: error: ‘std::this_thread’ has not been declared
warning:   702 |     std::this_thread::sleep_for( std::chrono::milliseconds( 500 ) );
warning:       |          ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:704:58: error: ‘std::this_thread’ has not been declared
warning:   704 |     while( !GetProfiler().HasShutdownFinished() ) { std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) ); };
warning:       |                                                          ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp: In member function ‘void tracy::Profiler::SpawnWorkerThreads()’:
warning: tracy/client/TracyProfiler.cpp:1271:14: error: ‘std::this_thread’ has not been declared
warning:  1271 |         std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
warning:       |              ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp: In member function ‘void tracy::Profiler::Worker()’:
warning: tracy/client/TracyProfiler.cpp:1372:70: error: ‘std::this_thread’ has not been declared
warning:  1372 |     while( m_timeBegin.load( std::memory_order_relaxed ) == 0 ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
warning:       |                                                                      ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:1492:18: error: ‘std::this_thread’ has not been declared
warning:  1492 |             std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
warning:       |                  ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:1682:26: error: ‘std::this_thread’ has not been declared
warning:  1682 |                     std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
warning:       |                          ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:1815:18: error: ‘std::this_thread’ has not been declared
warning:  1815 |             std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
warning:       |                  ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp: In member function ‘void tracy::Profiler::CompressWorker()’:
warning: tracy/client/TracyProfiler.cpp:1826:70: error: ‘std::this_thread’ has not been declared
warning:  1826 |     while( m_timeBegin.load( std::memory_order_relaxed ) == 0 ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
warning:       |                                                                      ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:1834:21: error: ‘m_fiLock’ was not declared in this scope; did you mean ‘m_sock’?
warning:  1834 |             while( !m_fiLock.try_lock() )
warning:       |                     ^~~~~~~~
warning:       |                     m_sock
warning: tracy/client/TracyProfiler.cpp:1845:17: error: ‘m_fiLock’ was not declared in this scope; did you mean ‘m_sock’?
warning:  1845 |                 m_fiLock.unlock();
warning:       |                 ^~~~~~~~
warning:       |                 m_sock
warning: tracy/client/TracyProfiler.cpp:1878:18: error: ‘std::this_thread’ has not been declared
warning:  1878 |             std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
warning:       |                  ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp: In member function ‘void tracy::Profiler::ClearSerial()’:
warning: tracy/client/TracyProfiler.cpp:1980:13: error: ‘m_serialLock’ was not declared in this scope
warning:  1980 |     while( !m_serialLock.try_lock() )
warning:       |             ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:1992:9: error: ‘m_serialLock’ was not declared in this scope
warning:  1992 |         m_serialLock.unlock();
warning:       |         ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp: In member function ‘tracy::Profiler::DequeueStatus tracy::Profiler::DequeueSerial()’:
warning: tracy/client/TracyProfiler.cpp:2283:17: error: ‘m_serialLock’ was not declared in this scope
warning:  2283 |         while( !m_serialLock.try_lock() )
warning:       |                 ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:2294:13: error: ‘m_serialLock’ was not declared in this scope
warning:  2294 |             m_serialLock.unlock();
warning:       |             ^~~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp: In member function ‘void tracy::Profiler::HandleDisconnect()’:
warning: tracy/client/TracyProfiler.cpp:2808:22: error: ‘std::this_thread’ has not been declared
warning:  2808 |                 std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
warning:       |                      ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp:2837:18: error: ‘std::this_thread’ has not been declared
warning:  2837 |             std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
warning:       |                  ^~~~~~~~~~~
warning: tracy/client/TracyProfiler.cpp: In member function ‘void tracy::Profiler::CalibrateTimer()’:
warning: tracy/client/TracyProfiler.cpp:2849:10: error: ‘std::this_thread’ has not been declared
warning:  2849 |     std::this_thread::sleep_for( std::chrono::milliseconds( 200 ) );
warning:       |          ^~~~~~~~~~~
warning: In file included from tracy/TracyClient.cpp:26:
warning: tracy/client/TracySysTrace.cpp: In function ‘bool tracy::SysTraceStart(int64_t&)’:
warning: tracy/client/TracySysTrace.cpp:396:37: error: ‘TraceSetInformation’ was not declared in this scope; did you mean ‘HeapSetInformation’?
warning:   396 |         const auto intervalStatus = TraceSetInformation( 0, TraceSampledProfileIntervalInfo, &interval, sizeof( interval ) );
warning:       |                                     ^~~~~~~~~~~~~~~~~~~
warning:       |                                     HeapSetInformation
warning: tracy/client/TracySysTrace.cpp:422:35: error: ‘std::thread’ has not been declared
warning:   422 |     s_prop->MinimumBuffers = std::thread::hardware_concurrency() * 4;
warning:       |                                   ^~~~~~
warning: tracy/client/TracySysTrace.cpp:423:35: error: ‘std::thread’ has not been declared
warning:   423 |     s_prop->MaximumBuffers = std::thread::hardware_concurrency() * 6;
warning:       |                                   ^~~~~~
warning: tracy/client/TracySysTrace.cpp:453:34: error: ‘TraceSetInformation’ was not declared in this scope; did you mean ‘HeapSetInformation’?
warning:   453 |         const auto stackStatus = TraceSetInformation( s_traceHandle, TraceStackTracingInfo, &stackId, sizeof( stackId ) );
warning:       |                                  ^~~~~~~~~~~~~~~~~~~
warning:       |                                  HeapSetInformation
warning: tracy/client/TracySysTrace.cpp: In function ‘void tracy::SysTraceSendExternalName(uint64_t)’:
warning: tracy/client/TracySysTrace.cpp:536:26: error: ‘GetProcessIdOfThread’ was not declared in this scope
warning:   536 |         const auto pid = GetProcessIdOfThread( hnd );
warning:       |                          ^~~~~~~~~~~~~~~~~~~~
warning: In file included from tracy/TracyClient.cpp:27:
warning: tracy/common/TracySocket.cpp: In member function ‘int tracy::Socket::Recv(void*, int, int)’:
warning: tracy/common/TracySocket.cpp:342:19: error: aggregate ‘tracy::Socket::Recv(void*, int, int)::pollfd fd’ has incomplete type and cannot be defined
warning:   342 |     struct pollfd fd;
warning:       |                   ^~
warning: tracy/common/TracySocket.cpp:344:17: error: ‘POLLIN’ was not declared in this scope
warning:   344 |     fd.events = POLLIN;
warning:       |                 ^~~~~~
warning: tracy/common/TracySocket.cpp:23:16: error: ‘WSAPoll’ was not declared in this scope
warning:    23 | #  define poll WSAPoll
warning:       |                ^~~~~~~
warning: tracy/common/TracySocket.cpp:346:9: note: in expansion of macro ‘poll’
warning:   346 |     if( poll( &fd, 1, timeout ) > 0 )
warning:       |         ^~~~
warning: tracy/common/TracySocket.cpp: In member function ‘bool tracy::Socket::HasData()’:
warning: tracy/common/TracySocket.cpp:425:19: error: aggregate ‘tracy::Socket::HasData()::pollfd fd’ has incomplete type and cannot be defined
warning:   425 |     struct pollfd fd;
warning:       |                   ^~
warning: tracy/common/TracySocket.cpp:427:17: error: ‘POLLIN’ was not declared in this scope
warning:   427 |     fd.events = POLLIN;
warning:       |                 ^~~~~~
warning: tracy/common/TracySocket.cpp:23:16: error: ‘WSAPoll’ was not declared in this scope
warning:    23 | #  define poll WSAPoll
warning:       |                ^~~~~~~
warning: tracy/common/TracySocket.cpp:429:12: note: in expansion of macro ‘poll’
warning:   429 |     return poll( &fd, 1, 0 ) > 0;
warning:       |            ^~~~
warning: tracy/common/TracySocket.cpp: In member function ‘tracy::Socket* tracy::ListenSocket::Accept()’:
warning: tracy/common/TracySocket.cpp:515:19: error: aggregate ‘tracy::ListenSocket::Accept()::pollfd fd’ has incomplete type and cannot be defined
warning:   515 |     struct pollfd fd;
warning:       |                   ^~
warning: tracy/common/TracySocket.cpp:517:17: error: ‘POLLIN’ was not declared in this scope
warning:   517 |     fd.events = POLLIN;
warning:       |                 ^~~~~~
warning: tracy/common/TracySocket.cpp:23:16: error: ‘WSAPoll’ was not declared in this scope
warning:    23 | #  define poll WSAPoll
warning:       |                ^~~~~~~
warning: tracy/common/TracySocket.cpp:519:9: note: in expansion of macro ‘poll’
warning:   519 |     if( poll( &fd, 1, 10 ) > 0 )
warning:       |         ^~~~
warning: tracy/common/TracySocket.cpp: In member function ‘bool tracy::UdpBroadcast::Open(const char*, uint16_t)’:
warning: tracy/common/TracySocket.cpp:607:5: error: ‘inet_pton’ was not declared in this scope; did you mean ‘inet_ntoa’?
warning:   607 |     inet_pton( AF_INET, addr, &m_addr );
warning:       |     ^~~~~~~~~
warning:       |     inet_ntoa
warning: tracy/common/TracySocket.cpp: In member function ‘void tracy::IpAddress::Set(const sockaddr&)’:
warning: tracy/common/TracySocket.cpp:651:5: error: ‘inet_ntop’ was not declared in this scope; did you mean ‘inet_ntoa’?
warning:   651 |     inet_ntop( AF_INET, &ai->sin_addr, m_text, 17 );
warning:       |     ^~~~~~~~~
warning:       |     inet_ntoa
warning: tracy/common/TracySocket.cpp: In member function ‘const char* tracy::UdpListen::Read(size_t&, tracy::IpAddress&, int)’:
warning: tracy/common/TracySocket.cpp:736:19: error: aggregate ‘tracy::UdpListen::Read(size_t&, tracy::IpAddress&, int)::pollfd fd’ has incomplete type and cannot be defined
warning:   736 |     struct pollfd fd;
warning:       |                   ^~
warning: tracy/common/TracySocket.cpp:738:17: error: ‘POLLIN’ was not declared in this scope
warning:   738 |     fd.events = POLLIN;
warning:       |                 ^~~~~~
warning: tracy/common/TracySocket.cpp:23:16: error: ‘WSAPoll’ was not declared in this scope
warning:    23 | #  define poll WSAPoll
warning:       |                ^~~~~~~
warning: tracy/common/TracySocket.cpp:739:9: note: in expansion of macro ‘poll’
warning:   739 |     if( poll( &fd, 1, timeout ) <= 0 ) return nullptr;
warning:       |         ^~~~
warning: tracy/common/TracySocket.cpp: In member function ‘int tracy::Socket::Recv(void*, int, int)’:
warning: tracy/common/TracySocket.cpp:354:1: warning: control reaches end of non-void function [-Wreturn-type]
warning:   354 | }
warning:       | ^
warning: tracy/common/TracySocket.cpp: In member function ‘tracy::Socket* tracy::ListenSocket::Accept()’:
warning: tracy/common/TracySocket.cpp:537:1: warning: control reaches end of non-void function [-Wreturn-type]
warning:   537 | }
warning:       | ^

error: failed to run custom build command for `tracy-client-sys v0.16.0`
@John-Nagle John-Nagle changed the title Cross-compile on Linux, target FOO fails. Cross-compile on Linux, target i686-pc-windows-gnu fails. Mar 11, 2022
@nagisa
Copy link
Owner

nagisa commented Mar 11, 2022

You should provide the entire output (i.e. include the environment variables etc. that come after the output you pasted.)

That said, you should confirm if your toolchain is able to build the upstream Tracy project at all. I myself find issues like EVENT_FILTER_EVENT_ID being absent from my mingw toolchain.

@John-Nagle
Copy link
Author

John-Nagle commented Mar 11, 2022

tracybuildbuild.txt
Entire output from compile.

This is with

rustc --version
rustc 1.59.0 (9d1b2106e 2022-02-23)

I know, mingw is a problem. i686-pc-windows-gnu is supposed to be a Rust "tier I target", so it's supposed to "just work". If something is missing from the Rust tool chain, that's a problem with the toolchain and should be reported.

The first error reported, with "<mutex>", is interesting. That's a known error in other packages.. It's enough of a known error that rustc has a special message for it.

warning: tracy/client/../common/TracyMutex.hpp:19:25: error: ‘mutex’ in namespace ‘std’ does not name a type
warning:    19 | using TracyMutex = std::mutex;
warning:       |                         ^~~~~
warning: tracy/client/../common/TracyMutex.hpp:16:1: note: ‘std::mutex’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
warning:    15 | #include <mutex>
warning:   +++ |+#include <mutex>
warning:    16 | 

But what rustc is suggesting, adding "#include <mutex>", seems to have already been done. So this may be a newer problem in the same area. If you can confirm that i686-pc-windows-gnu toolchain is broken here, this can be passed over to that group as a bug. The mingw environment I'm using is whatever shipped with Rust.

This looks like some kind of version problem.

Is there something else you would like me to build, as a test?

@nagisa
Copy link
Owner

nagisa commented Mar 11, 2022

Thank you for the full log.

I know, mingw is a problem. i686-pc-windows-gnu is supposed to be a Rust "tier I target", so it's supposed to "just work". If something is missing from the Rust tool chain, that's a problem with the toolchain and should be reported.

The first error reported, with "<mutex>", is interesting. That's a known error in other packages.. It's enough of a known error that rustc has a special message for it.

i686-pc-windows-gnu is indeed a T1 target, but that is only as far as Rust code is concerned. In this case the diagnostics in question come from a C++ toolchain that you have installed on your system (i686-w64-mingw32-g++) and which this crate invokes here to build a part of an upstream project implemented in C++. In that sense, the Rust toolchain and its tier levels are pretty much uninvolved here.

Unfortunately, I haven't much in terms of suggestions of what could be going wrong with the <mutex> include here. My only guess is that you may be missing some package on your system that would provide the header in question. I can't really say much else, as I'm unable to reproduce this specific problem locally. Though, as I mentioned earlier, I hit other issues building the Tracy code, even with a much more recent version of the mingw toolchain, so even if you resolve a problem with the mutex include, you won't be able to build this project using the -gnu target.

@John-Nagle
Copy link
Author

Possibly related: microsoft/STL#980

@John-Nagle
Copy link
Author

Does not seem to be a problem with current versions as of this date.

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

2 participants