Skip to content

[R-pkg-devel] failure on windows builder ("only Win32 target is supported")

3 messages · Miroslav Kratochvil, Ivan Krylov

#
Dear all,

I've been trying to submit a package update, and I found a completely
new issue that I'm failing to replicate locally: at
https://win-builder.r-project.org/incoming_pretest/EmbedSOM_2.2.1_20260308_225310/Windows/00install.out
the builder fails with this error:

d:/rtools45/x86_64-w64-mingw32.static.posix/include/sys/types.h:10:2:
error: #error Only Win32 target is supported!
   10 | #error Only Win32 target is supported!

The error is triggered by including a std c++ <thread> header from a
.cpp file. As far as I can tell this might be a compiler setup that
doesn't support #include<thread> at all. Is there any way to make the
threads work on windows? Notably, the source files seem to build right
with my local copy of mingw (but that one is likely different from the
one used at the build machine.)

The package in question is EmbedSOM, source is at
https://github.com/exaexa/EmbedSOM . I mirrored the build log to
https://pastebin.com/rmePqADD just to be sure it doesn't disappear too
early.

A skim through the packaging guide didn't reveal any obvious mistake
that I'd be doing. Any help or even hints on where to start logging is
very welcome.

Thanks a lot!
#
Dear Miroslav & Uwe,

On Mon, 9 Mar 2026 10:14:31 +0100
Miroslav Kratochvil <exa.exa at gmail.com> wrote:

            
        
Here's the strange part:
The currently available version of RTools 4.5 only has GCC 14.3 (and
compiles EmbedSOM without a problem).

Judging by the include paths containing /usr/lib/gcc/x86_64-pc-cygwin/,
it might be a %PATH% problem on Win-Builder, with the MSYS/Cygwin
toolchain being picked up instead of the desired UCRT one.
1 day later
#
Hello,
I see that Uwe has re-triggered the build, and now it looks like that
all went through just right. Thanks for help to both of you!
-mk
On Mon, 9 Mar 2026 at 16:31, Ivan Krylov <ikrylov at disroot.org> wrote: