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

Error generating a full debug report using gcc 14.1.0-2 #20864

Closed
2 of 7 tasks
JaiSoone opened this issue May 10, 2024 · 7 comments · Fixed by #20884
Closed
2 of 7 tasks

Error generating a full debug report using gcc 14.1.0-2 #20864

JaiSoone opened this issue May 10, 2024 · 7 comments · Fixed by #20884

Comments

@JaiSoone
Copy link

JaiSoone commented May 10, 2024

Description / Steps to reproduce the issue

  1. download wxWidgets 3.2.4
  2. make the following changes to wxWidgets for compiling on a Microsoft windows 10 system:
diff -r 11c2f3533abe -r 71959affad03 build/msw/config.gcc
--- a/build/msw/config.gcc      Sun Feb 11 08:29:01 2024 -0800
+++ b/build/msw/config.gcc      Sun Feb 11 09:32:43 2024 -0800
@@ -23,10 +23,10 @@
 CXX = g++

 # Standard flags for CC
-CFLAGS ?=
+CFLAGS ?= -Wno-unused-local-typedefs -Wno-deprecated-declarations -fno-omit-frame-pointer -march=native -DwxUSE_OWNER_DRAWN -freport-bug

 # Standard flags for C++
-CXXFLAGS ?=
+CXXFLAGS ?= -Wno-unused-local-typedefs -Wno-deprecated-declarations -fno-omit-frame-pointer -march=native -DwxUSE_OWNER_DRAWN -freport-bug

 # Standard preprocessor flags (common for CC and CXX)
 CPPFLAGS ?=
diff -r 11c2f3533abe -r 71959affad03 build/msw/makefile.gcc
--- a/build/msw/makefile.gcc    Sun Feb 11 08:29:01 2024 -0800
+++ b/build/msw/makefile.gcc    Sun Feb 11 09:32:43 2024 -0800
@@ -5217,7 +5217,7 @@
 endif
 ifeq ($(BUILD),debug)
 ifeq ($(DEBUG_INFO),default)
-__DEBUGINFO = -g
+__DEBUGINFO = -ggdb3
 endif
 endif
 ifeq ($(BUILD),release)
@@ -5235,7 +5235,7 @@
 __OPTIMIZEFLAG = -O0
 endif
 ifeq ($(BUILD),release)
-__OPTIMIZEFLAG = -O2
+__OPTIMIZEFLAG = -O3
 endif
 ifeq ($(USE_THREADS),0)
 __THREADSFLAG =
diff -r 11c2f3533abe -r 71959affad03 include/wx/msw/setup.h
--- a/include/wx/msw/setup.h    Sun Feb 11 08:29:01 2024 -0800
+++ b/include/wx/msw/setup.h    Sun Feb 11 09:32:43 2024 -0800
@@ -1648,7 +1648,7 @@
 #if defined(_MSC_VER) && _MSC_VER >= 1600
     #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
 #else
-    #define wxUSE_GRAPHICS_DIRECT2D 0
+    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
 #endif

 // wxWebRequest backend based on WinHTTP.
diff -r 11c2f3533abe -r 71959affad03 include/wx/msw/setup_inc.h
--- a/include/wx/msw/setup_inc.h        Sun Feb 11 08:29:01 2024 -0800
+++ b/include/wx/msw/setup_inc.h        Sun Feb 11 09:32:43 2024 -0800
@@ -33,7 +33,7 @@
 #if defined(_MSC_VER) && _MSC_VER >= 1600
     #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
 #else
-    #define wxUSE_GRAPHICS_DIRECT2D 0
+    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
 #endif

 // wxWebRequest backend based on WinHTTP.

NateJoe@TinkeringAround UCRT64 ~/wxWidgets/clang/dbgTesting324/wxWidgets-3.2.4

  1. cd wxWidgets-3.2.4/build/msw

  2. mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 USE_OPENGL=0 BUILD=release clean

  3. mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 USE_OPENGL=0 BUILD=release

  4. This ends up with an error I think is being caused by trying to generate a bug report.
    Something about not being able to open a temporary directory:

gcc -c -o gcc_mswudll\wxjpeg_jfdctint.o  -O3 -mthreads -DNDEBUG -I..\..\lib\gcc_dll\mswu  -Wno-unused-local-typedefs -Wno-deprecated-declarations -fno-omit-frame-pointer -march=native -DwxUSE_OWNER_DRAWN=1 -freport-bug -MTgcc_mswudll\wxjpeg_jfdctint.o -MFgcc_mswudll\wxjpeg_jfdctint.o.d -MD -MP ../../src/jpeg/jfdctint.c
during RTL pass: final
../../src/jpeg/jfdctint.c: In function 'jpeg_fdct_6x6':
../../src/jpeg/jfdctint.c:577:1: internal compiler error: in seh_cfa_offset, at config/i386/winnt.cc:1137
  577 | }
      | ^
Please submit a full bug report, with preprocessed source.
See <https://github.com/msys2/MINGW-packages/issues> for instructions.
gcc: fatal error: cannot execute 'C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/cc1.exe': open temporary output file: No such file or directory
compilation terminated.
mingw32-make: *** [makefile.gcc:6341: gcc_mswudll\wxjpeg_jfdctint.o] Error 1

P.S. The only reason I'm specifying the -fno-omit-frame-pointer option is because drmingw, the post-mortem dumper used by Code::Blocks, requires it.

Expected behavior

Compiles without errors when using gcc-13.2.0

Actual behavior

gets an error trying to generate bug report.

Verification

Windows Version

MINGW64_NT-10.0-19045

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Are you willing to submit a PR?

No response

@JaiSoone JaiSoone added the bug label May 10, 2024
@JaiSoone
Copy link
Author

JaiSoone commented May 10, 2024

FWIW, native for me is 'haswell'.

@lazka
Copy link
Member

lazka commented May 10, 2024

See #20861

@Biswa96 Biswa96 added the GCC label May 10, 2024
@lazka
Copy link
Member

lazka commented May 11, 2024

I've c-reduced the wxwidget build error as well and added it to the upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115038#c1

@lazka
Copy link
Member

lazka commented May 12, 2024

There is a temporary workaround now by passing -fno-fold-mem-offsets

@JaiSoone
Copy link
Author

JaiSoone commented May 13, 2024 via email

@lazka
Copy link
Member

lazka commented May 13, 2024

hm, yeah, not sure. It's annoying that -freport-bug can only be tested if gcc crashes from what I see.

I've created #20894 so we don't forget at least.

btw. the fixed package is now in the repo

@JaiSoone
Copy link
Author

JaiSoone commented May 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants