https://bugs.winehq.org/show_bug.cgi?id=50996
--- Comment #19 from Patrick patrick+winehq.org@laimbock.com --- (In reply to Jacek Caban from comment #17)
You could also try if something like following command reproduces the problem: echo '#include <cstdlib>' |wineg++ -c -xc++ -o /tmp/test.o - -v
It does reproduce the problem. Output:
$ echo '#include <cstdlib>' |wineg++ -c -xc++ -o /tmp/test.o - -v /usr/bin/g++ -m64 -fshort-wchar -DWINE_UNICODE_NATIVE -D_REENTRANT -fPIC -DWIN64 -D_WIN64 -D__WIN64 -D__WIN64__ -DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -D__WINNT -D__WINNT__ -D__stdcall=__attribute__((ms_abi)) -D__cdecl=__stdcall -D__fastcall=__stdcall -D_stdcall=__stdcall -D_cdecl=__cdecl -D_fastcall=__fastcall -D__declspec(x)=__declspec_##x -D__declspec_align(x)=__attribute__((aligned(x))) -D__declspec_allocate(x)=__attribute__((section(x))) -D__declspec_deprecated=__attribute__((deprecated)) -D__declspec_dllimport=__attribute__((dllimport)) -D__declspec_dllexport=__attribute__((dllexport)) -D__declspec_naked=__attribute__((naked)) -D__declspec_noinline=__attribute__((noinline)) -D__declspec_noreturn=__attribute__((noreturn)) -D__declspec_nothrow=__attribute__((nothrow)) -D__declspec_novtable=__attribute__(()) -D__declspec_selectany=__attribute__((weak)) -D__declspec_thread=__thread -D__int8=char -D__int16=short -D__int32=int -D__int64=long -D__WINE__ -c -o /tmp/test.o -v -xc++ - -isystem/usr/bin/../include/wine/windows -isystem/usr/include/wine/windows -isystem/usr/local/include/wine/windows -isystem/usr/bin/../include -idirafter/usr/include -idirafter/usr/local/include Using built-in specs. COLLECT_GCC=/usr/bin/g++ OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.0.1-20210405/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.0.1 20210405 (Red Hat 11.0.1-0) (GCC) COLLECT_GCC_OPTIONS='-m64' '-fshort-wchar' '-D' 'WINE_UNICODE_NATIVE' '-D' '_REENTRANT' '-fPIC' '-D' 'WIN64' '-D' '_WIN64' '-D' '__WIN64' '-D' '__WIN64__' '-D' 'WIN32' '-D' '_WIN32' '-D' '__WIN32' '-D' '__WIN32__' '-D' '__WINNT' '-D' '__WINNT__' '-D' '__stdcall=__attribute__((ms_abi))' '-D' '__cdecl=__stdcall' '-D' '__fastcall=__stdcall' '-D' '_stdcall=__stdcall' '-D' '_cdecl=__cdecl' '-D' '_fastcall=__fastcall' '-D' '__declspec(x)=__declspec_##x' '-D' '__declspec_align(x)=__attribute__((aligned(x)))' '-D' '__declspec_allocate(x)=__attribute__((section(x)))' '-D' '__declspec_deprecated=__attribute__((deprecated))' '-D' '__declspec_dllimport=__attribute__((dllimport))' '-D' '__declspec_dllexport=__attribute__((dllexport))' '-D' '__declspec_naked=__attribute__((naked))' '-D' '__declspec_noinline=__attribute__((noinline))' '-D' '__declspec_noreturn=__attribute__((noreturn))' '-D' '__declspec_nothrow=__attribute__((nothrow))' '-D' '__declspec_novtable=__attribute__(())' '-D' '__declspec_selectany=__attribute__((weak))' '-D' '__declspec_thread=__thread' '-D' '__int8=char' '-D' '__int16=short' '-D' '__int32=int' '-D' '__int64=long' '-D' '__WINE__' '-c' '-o' '/tmp/test.o' '-v' '-isystem' '/usr/bin/../include/wine/windows' '-isystem' '/usr/include/wine/windows' '-isystem' '/usr/local/include/wine/windows' '-isystem' '/usr/bin/../include' '-idirafter' '/usr/include' '-idirafter' '/usr/local/include' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' '/tmp/' /usr/libexec/gcc/x86_64-redhat-linux/11/cc1plus -quiet -v -D_GNU_SOURCE -D WINE_UNICODE_NATIVE -D _REENTRANT -D WIN64 -D _WIN64 -D __WIN64 -D __WIN64__ -D WIN32 -D _WIN32 -D __WIN32 -D __WIN32__ -D __WINNT -D __WINNT__ -D __stdcall=__attribute__((ms_abi)) -D __cdecl=__stdcall -D __fastcall=__stdcall -D _stdcall=__stdcall -D _cdecl=__cdecl -D _fastcall=__fastcall -D __declspec(x)=__declspec_##x -D __declspec_align(x)=__attribute__((aligned(x))) -D __declspec_allocate(x)=__attribute__((section(x))) -D __declspec_deprecated=__attribute__((deprecated)) -D __declspec_dllimport=__attribute__((dllimport)) -D __declspec_dllexport=__attribute__((dllexport)) -D __declspec_naked=__attribute__((naked)) -D __declspec_noinline=__attribute__((noinline)) -D __declspec_noreturn=__attribute__((noreturn)) -D __declspec_nothrow=__attribute__((nothrow)) -D __declspec_novtable=__attribute__(()) -D __declspec_selectany=__attribute__((weak)) -D __declspec_thread=__thread -D __int8=char -D __int16=short -D __int32=int -D __int64=long -D __WINE__ -isystem /usr/bin/../include/wine/windows -isystem /usr/include/wine/windows -isystem /usr/local/include/wine/windows -isystem /usr/bin/../include -idirafter /usr/include -idirafter /usr/local/include - -quiet -dumpdir /tmp/ -dumpbase test -m64 -mtune=generic -march=x86-64 -version -fshort-wchar -fPIC -o /tmp/cc5objL4.s GNU C++17 (GCC) version 11.0.1 20210405 (Red Hat 11.0.1-0) (x86_64-redhat-linux) compiled by GNU C version 11.0.1 20210405 (Red Hat 11.0.1-0), GMP version 6.2.0, MPFR version 4.1.0-p9, MPC version 1.2.1, isl version isl-0.18-GMP
warning: MPFR header version 4.1.0-p9 differs from library version 4.1.0-p11. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring duplicate directory "/usr/include/wine/windows" ignoring nonexistent directory "/usr/local/include/wine/windows" ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/../../../../x86_64-redhat-linux/include" ignoring duplicate directory "/usr/include" ignoring duplicate directory "/usr/include" ignoring duplicate directory "/usr/local/include" #include "..." search starts here: #include <...> search starts here: /usr/bin/../include/wine/windows /usr/bin/../include /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/backward /usr/lib/gcc/x86_64-redhat-linux/11/include /usr/local/include End of search list. GNU C++17 (GCC) version 11.0.1 20210405 (Red Hat 11.0.1-0) (x86_64-redhat-linux) compiled by GNU C version 11.0.1 20210405 (Red Hat 11.0.1-0), GMP version 6.2.0, MPFR version 4.1.0-p9, MPC version 1.2.1, isl version isl-0.18-GMP
warning: MPFR header version 4.1.0-p9 differs from library version 4.1.0-p11. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 4f3028bfea29b99091114eff5870fb8a In file included from <stdin>:1: /usr/include/c++/11/cstdlib:75:15: fatal error: stdlib.h: No such file or directory 75 | #include_next <stdlib.h> | ^~~~~~~~~~ compilation terminated. winegcc: /usr/bin/g++ failed