rmagick / rmagick

Ruby bindings for ImageMagick
https://rmagick.github.io/
MIT License
696 stars 140 forks source link

Compile error with GCC 14 #1615

Closed Watson1978 closed 2 weeks ago

Watson1978 commented 2 weeks ago

Description

See https://github.com/rmagick/rmagick/actions/runs/9055850186/job/24877851876?pr=1614

Steps to Reproduce

  1. Install Ruby 3.3.1 using https://rubyinstaller.org/
  2. Update gcc to 14 with pacman -Syyu command

System Configuration

Watson1978 commented 2 weeks ago

I checked briefly on archlinux and no problems occurred.

# ruby -v
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.1 20240507 (GCC) 

# ruby extconf.rb 
checking for brew... no
checking for pacman... yes
checking for Ruby version >= 3.0.0... yes
checking for outdated ImageMagick version (<= 6.8.9)... no
checking for g++... yes

Warning: Found a partial ImageMagick installation. Your operating
system likely has some built-in ImageMagick libraries but not all of
ImageMagick. This will most likely cause problems at both compile and
runtime.
Found partial installation at: /usr

checking for MagickCore/MagickCore.h... yes
checking for malloc.h... yes
checking for rb_io_path() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for posix_memalign() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
checking for malloc_usable_size() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
checking for malloc_size() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for _aligned_msize() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for GetImageChannelEntropy() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for SetImageGray() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
checking for SetMagickAlignedMemoryMethods() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
creating extconf.h
creating Makefile
======================================================================
Mon 13 May 24 02:52:14
This installation of RMagick 6.0.0 is configured for
Ruby 3.0.6 (x86_64-linux) and ImageMagick 7.1.1
======================================================================

Configured compile options: {:magick_version=>"7.1.1", :local_libs=>"  -lMagickCore-7.Q16HDRI", :cppflags=>" $(DEFS) $(cppflags)  -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register $(optflags) $(debugflags)", :ldflags=>"-L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed  -lMagickCore-7.Q16HDRI ", :defs=>["-DHAVE_MAGICKCORE_MAGICKCORE_H", "-DHAVE_MALLOC_H", "-DHAVE_POSIX_MEMALIGN", "-DHAVE_MALLOC_USABLE_SIZE", "-DHAVE_SETIMAGEGRAY", "-DHAVE_SETMAGICKALIGNEDMEMORYMETHODS", "-DRUBY_VERSION_STRING=\"ruby 3.0.6\"", "-DRMAGICK_VERSION_STRING=\"RMagick 6.0.0\"", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_6_9_0=1", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_6_9_10=1", "-DIMAGEMAGICK_7=1", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_7_0_8=1", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_7_0_10=1"], :config_h=>"Makefile"}

# make V=1
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmagick.o -c rmagick.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmdraw.o -c rmdraw.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmenum.o -c rmenum.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmfill.o -c rmfill.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmilist.o -c rmilist.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmimage.o -c rmimage.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rminfo.o -c rminfo.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmkinfo.o -c rmkinfo.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmmain.o -c rmmain.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmmontage.o -c rmmontage.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmpixel.o -c rmpixel.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmstruct.o -c rmstruct.cpp
g++ -I. -I/usr/include/ruby-3.0.0/x86_64-linux -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\"     -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -I/usr/include/ImageMagick-7 -x c++ -std=c++11 -Wno-register -O3 -ggdb3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/ruby/src=/usr/src/debug/ruby  -o rmutil.o -c rmutil.cpp
rm -f RMagick2.so
g++ -shared -o RMagick2.so rmagick.o rmdraw.o rmenum.o rmfill.o rmilist.o rmimage.o rminfo.o rmkinfo.o rmmain.o rmmontage.o rmpixel.o rmstruct.o rmutil.o -L. -L/usr/lib -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed  -lMagickCore-7.Q16HDRI  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,--compress-debug-sections=zlib   -lMagickCore-7.Q16HDRI -lruby  -lm   -lc
Watson1978 commented 2 weeks ago

On windows

> gcc -v
Using built-in specs.
COLLECT_GCC=C:\Ruby33-x64\msys64\ucrt64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/Ruby33-x64/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-14.1.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,rust,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev2, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --enable-plugin --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.0 (Rev2, Built by MSYS2 project)

> ruby .\extconf.rb
checking for Ruby version >= 3.0.0... yes
checking for magick... yes
checking for outdated ImageMagick version (<= 6.8.9)... no
checking for g++... yes
searching PATH for the ImageMagick library...
checking for MagickCore/MagickCore.h... yes
checking for malloc.h... yes
checking for rb_io_path() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
checking for posix_memalign() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for malloc_usable_size() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for malloc_size() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for _aligned_msize() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
checking for GetImageChannelEntropy() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... no
checking for SetImageGray() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
checking for SetMagickAlignedMemoryMethods() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,ruby.h,ruby/io.h,MagickCore/MagickCore.h,malloc.h... yes
creating extconf.h
creating Makefile
======================================================================
Mon 13 May 24 12:07:56
This installation of RMagick 6.0.0 is configured for
Ruby 3.3.1 (x64-mingw-ucrt) and ImageMagick 7.1.1
======================================================================

Configured compile options: {:magick_version=>"7.1.1", :local_libs=>"", :cppflags=>"-D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT $(DEFS) $(cppflags) -I\"C:\\Program Files\\ImageMagick-7.1.1-Q16-HDRI/include\" -x c++ -std=c++11 -Wno-register $(optflags) $(debugflags)", :ldflags=>"-L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed -L\"C:\\Program Files\\ImageMagick-7.1.1-Q16-HDRI\" -lucrt -lCORE_RL_MagickCore_", :defs=>["-DHAVE_MAGICKCORE_MAGICKCORE_H", "-DHAVE_MALLOC_H", "-DHAVE_RB_IO_PATH", "-DHAVE__ALIGNED_MSIZE", "-DHAVE_SETIMAGEGRAY", "-DHAVE_SETMAGICKALIGNEDMEMORYMETHODS", "-DRUBY_VERSION_STRING=\"ruby 3.3.1\"", "-DRMAGICK_VERSION_STRING=\"RMagick 6.0.0\"", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_6_9_0=1", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_6_9_10=1", "-DIMAGEMAGICK_7=1", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_7_0_8=1", "-DIMAGEMAGICK_GREATER_THAN_EQUAL_7_0_10=1"], :config_h=>"Makefile"}

> make V=1
g++ -I. -I/C/Ruby33-x64/include/ruby-3.3.0/x64-mingw-ucrt -I/C/Ruby33-x64/include/ruby-3.3.0/ruby/backward -I/C/Ruby33-x64/include/ruby-3.3.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -I"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI/include" -x c++ -std=c++11 -Wno-register -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3  -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong  -o rmagick.o -c rmagick.cpp
g++ -I. -I/C/Ruby33-x64/include/ruby-3.3.0/x64-mingw-ucrt -I/C/Ruby33-x64/include/ruby-3.3.0/ruby/backward -I/C/Ruby33-x64/include/ruby-3.3.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -I"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI/include" -x c++ -std=c++11 -Wno-register -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3  -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong  -o rmdraw.o -c rmdraw.cpp
g++ -I. -I/C/Ruby33-x64/include/ruby-3.3.0/x64-mingw-ucrt -I/C/Ruby33-x64/include/ruby-3.3.0/ruby/backward -I/C/Ruby33-x64/include/ruby-3.3.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -I"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI/include" -x c++ -std=c++11 -Wno-register -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3  -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong  -o rmenum.o -c rmenum.cpp
g++ -I. -I/C/Ruby33-x64/include/ruby-3.3.0/x64-mingw-ucrt -I/C/Ruby33-x64/include/ruby-3.3.0/ruby/backward -I/C/Ruby33-x64/include/ruby-3.3.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -I"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI/include" -x c++ -std=c++11 -Wno-register -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3  -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong  -o rmfill.o -c rmfill.cpp
g++ -I. -I/C/Ruby33-x64/include/ruby-3.3.0/x64-mingw-ucrt -I/C/Ruby33-x64/include/ruby-3.3.0/ruby/backward -I/C/Ruby33-x64/include/ruby-3.3.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -I"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI/include" -x c++ -std=c++11 -Wno-register -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3  -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong  -o rmilist.o -c rmilist.cpp
g++ -I. -I/C/Ruby33-x64/include/ruby-3.3.0/x64-mingw-ucrt -I/C/Ruby33-x64/include/ruby-3.3.0/ruby/backward -I/C/Ruby33-x64/include/ruby-3.3.0 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -I"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI/include" -x c++ -std=c++11 -Wno-register -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3  -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong  -o rmimage.o -c rmimage.cpp
during RTL pass: dwarf2
rmimage.cpp: In function 'VALUE Image_total_ink_density(VALUE)':
rmimage.cpp:14667:1: internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2cfi.cc:2112
14667 | }
      | ^
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://github.com/msys2/MINGW-packages/issues> for instructions.
make: *** [Makefile:240: rmimage.o] Error 1
Watson1978 commented 2 weeks ago

If I remove -fno-omit-frame-pointer flag, it can be able to compile.