https://bugs.winehq.org/show_bug.cgi?id=46293
Bug ID: 46293 Summary: winegcc: stdlib.h and math.h not found when including C++'s <cstdlib> or <cmath> Product: Wine Version: 3.21 Hardware: x86 URL: https://forum.cockos.com/showthread.php?p=2070238#post 2070238 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: tools Assignee: wine-bugs@winehq.org Reporter: cfillion30@gmail.com Regression SHA1: 0e279d26b8386fc878f17bd6768e46e1cf9c5128 Distribution: ArchLinux
Created attachment 63015 --> https://bugs.winehq.org/attachment.cgi?id=63015 wineg++ -v test.cpp
<cstdlib> and <cmath> of the C++ standard library fail to find <stdlib.h> and <math.h> (with #include_next) when using wineg++ since Wine 3.21.
This seems to be because wineg++ (built with --prefix=/usr) now adds -isystem /usr/include to GCC's command line. This changes the order directories are searched (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129).
https://bugs.winehq.org/show_bug.cgi?id=46293
--- Comment #1 from Christian Fillion cfillion30@gmail.com --- Created attachment 63016 --> https://bugs.winehq.org/attachment.cgi?id=63016 test.cpp
https://bugs.winehq.org/show_bug.cgi?id=46293
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |a.heider@gmail.com Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=46293
--- Comment #2 from Andre Heider a.heider@gmail.com --- Created attachment 63017 --> https://bugs.winehq.org/attachment.cgi?id=63017 winegcc.patch
Cannot reproduce with debian packages, the prefix is differently set up there.
Does this patch help?
https://bugs.winehq.org/show_bug.cgi?id=46293
Christian Fillion cfillion30@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=70129
--- Comment #3 from Christian Fillion cfillion30@gmail.com --- (In reply to Andre Heider from comment #2)
Does this patch help?
Yes, that patch fixes it. Thanks!
/usr/include is back to its original position in the search path.
https://bugs.winehq.org/show_bug.cgi?id=46293
--- Comment #4 from Christian Fillion cfillion30@gmail.com --- Created attachment 63021 --> https://bugs.winehq.org/attachment.cgi?id=63021 wineg++ -v test.cpp (with patch applied)
https://bugs.winehq.org/show_bug.cgi?id=46293
--- Comment #5 from Andre Heider a.heider@gmail.com --- Thanks for the confirmation! Patch sent: https://source.winehq.org/patches/data/155933
https://bugs.winehq.org/show_bug.cgi?id=46293
--- Comment #6 from Andre Heider a.heider@gmail.com --- Fix will be part of the upcoming 4.0-rc3: https://source.winehq.org/git/wine.git/commitdiff/9bb21d11352783307a978d777d...
Bug can be closed as FIXED.
https://bugs.winehq.org/show_bug.cgi?id=46293
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9bb21d11352783307a978d777dc | |0ab5d474c09c1 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- Thanks, marking fixed.
https://bugs.winehq.org/show_bug.cgi?id=46293
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.0-rc3.
https://bugs.winehq.org/show_bug.cgi?id=46293
MarkW chopinbig@tutanota.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |chopinbig@tutanota.com
--- Comment #9 from MarkW chopinbig@tutanota.com --- It seems to be back with Wine 6.6 and Manjaro.
using wineg++ and including cstdlib causes a cstdlib:75:15: fatal error: stdlib.h: No such file or directory