tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: firefox build (again)



On Sun, Aug 15, 2021 at 07:07:52PM +0000, Emmanuel Dreyfus wrote:
> Latest issue with buidling Firefox on i386:
> 
>   cargo:warning=src/rasterize.h:782:20: internal compiler error: in convert_move
> , at expr.c:231

I was able to work it around with this patch, but I is probably not right
for general use. Opinions?

You will find below the offending cc invocation. Note the -m32 which 
is there because I build for i386 using pkg_comp on amd64, it may
cause some troubles.


--- gfx/wr/swgl/build.rs.orig   2021-08-18 23:37:01.361252026 +0000
+++ gfx/wr/swgl/build.rs        2021-08-19 00:16:03.727275233 +0000
@@ -195,8 +195,11 @@
                  .flag("-mrecip=none");
         }
     }
 
+    // Work around "internal compiler error: in convert_move, at expr.c:231"
+    build.flag("-O0");
+
     build.file("src/gl.cc")
         .define("_GLIBCXX_USE_CXX11_ABI", Some("0"))
         .include(shader_dir)
         .include("src")

The offending command with three -O2 to override in order to get it working:

/pkg_comp/obj/pkgsrc/www/firefox/default/.cwrapper/bin/c++ -O2 -ffunction-sections -fdata-sections -fPIC -m32 -std=gnu++17 -I/pkg_comp/obj/pkgsrc/www/firefox/default/build/dist/stl_wrappers -I/pkg_comp/obj/pkgsrc/www/firefox/default/build/dist/system_wrappers -include /pkg_comp/obj/pkgsrc/www/firefox/default/firefox-91.0/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -I/pkg_comp/obj/pkgsrc/www/firefox/default/firefox-91.0/toolkit/library/rust -I/pkg_comp/obj/pkgsrc/www/firefox/default/build/toolkit/library/rust -I/pkg_comp/obj/pkgsrc/www/firefox/default/build/dist/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss -I/usr/pkg/include/nspr -I/pkg_comp/obj/pkgsrc/www/firefox/default/build/dist/include/nss -I/usr/X11R7/include/pixman-1 -I/usr/pkg/include -DMOZILLA_CLIENT -include /pkg_comp/obj/pkgsrc/www/firefox/default/build/mozilla-config.h -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/nspr -I/usr/X11R7/include -I/usr/X11R7/include/libdrm -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/ffmpeg4 -I/usr/X11R7/include/freetype2 -I/usr/pkg/include/harfbuzz -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-error=unused-but-set-variable -Wformat -Wformat-overflow=2 -Wno-psabi -fno-sized-deallocation -fno-aligned-new -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS -march=i686 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/nspr -I/usr/X11R7/include -I/usr/X11R7/include/libdrm -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/ffmpeg4 -I/usr/X11R7/include/freetype2 -I/usr/pkg/include/harfbuzz -mstackrealign -fno-exceptions -fno-strict-aliasing -Dunix -fPIC -DPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -O2 -fomit-frame-pointer -funwind-tables -DMOZILLA_CONFIG_H -I /pkg_comp/obj/pkgsrc/www/firefox/default/firefox-91.0/gfx/wr/webrender/res -I src -I /pkg_comp/obj/pkgsrc/www/firefox/default/build/i586-unknown-netbsd/release/build/swgl-86645fb50aa8017e/out -std=c++17 -fno-exceptions -fno-rtti -fno-math-errno -UMOZILLA_CONFIG_H -D_GLIBCXX_USE_CXX11_ABI=0 -o /pkg_comp/obj/pkgsrc/www/firefox/default/build/i586-unknown-netbsd/release/build/swgl-86645fb50aa8017e/out/src/gl.o -c src/gl.cc

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index