pkgsrc-Users archive

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

Re: firefox fails to build on netbsd-8 amd64



nia <nia%NetBSD.org@localhost> writes:

> On Mon, Jun 22, 2020 at 06:17:27PM +0000, maya%NetBSD.org@localhost wrote:
>> On Mon, Jun 22, 2020 at 06:16:47PM +0000, maya%NetBSD.org@localhost wrote:
>> > https://mail-index.netbsd.org/tech-userlevel/2018/09/08/msg011381.html
>> > Probably this. It's fixed in newer NetBSD.
>> 
>> Also graphics/MesaLib/patches/patch-src_compiler_builtin__type__macros.h
>> is the hack for it.
>
> Ah, yeah, thanks for the hint.
>
> glsl-optimizer is basically embedding a small part of Mesa, so gdt can
> apply that same patch to:
>
> ./work/firefox-77.0.1/third_party/rust/glslopt/glsl-optimizer/src/compiler/builtin_type_macros.h

So after applying that patch, adusting cargo checksums, and setting
GCC_REQD to 7, I'm on to the next error.

At this point I feel like it will be easier to just deal with upgrading
all of my systems to 9 and to write a few lines for the 2020Q2
announcement that says that netbsd-8 is aging out of being desktop
capable, than to get this to work and keep it working.

I have attached my in-progress patch, in case someone wants to look for
the next bug.

? DIFF
? OUT
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/Makefile,v
retrieving revision 1.433
diff -u -p -r1.433 Makefile
--- Makefile	17 Jun 2020 17:54:26 -0000	1.433
+++ Makefile	24 Jun 2020 19:33:13 -0000
@@ -99,6 +99,10 @@ CKSUMS+=	efdada601d13c489451da9d65a78c42
 CKSUMS+=	34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db
 CKSUMS+=	e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe
 
+CKSUM_CRATES+=	third_party/rust/glslopt
+CKSUMS+=	5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff
+CKSUMS+=	0334d491b01d7e2135b27d4662ddb6153748f4721117a1f38c3f347646a934db
+
 SUBST_CLASSES+=		cksum
 SUBST_STAGE.cksum=	pre-configure
 .for crate in ${CKSUM_CRATES}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/distinfo,v
retrieving revision 1.399
diff -u -p -r1.399 distinfo
--- distinfo	17 Jun 2020 17:54:26 -0000	1.399
+++ distinfo	24 Jun 2020 19:33:13 -0000
@@ -30,6 +30,7 @@ SHA1 (patch-media_libtheora_lib_info.c) 
 SHA1 (patch-media_libvorbis_lib_vorbis__info.c) = b6b1a84a095db8459bdff24c04f4d56886ddbe45
 SHA1 (patch-nsprpub_pr_src_pthreads_ptsynch.c) = 13e512c7ee9fa1e14ba415d62fa853e5fbfc91c0
 SHA1 (patch-security_nss_lib_freebl_mpi_mpi.c) = a7cd867916524770609d1c307a65b315b88456f4
+SHA1 (patch-third__party_rust_glslopt_glsl-optimizer_src_compiler_builtin__type__macros.h) = 554da69dbc097ca1b54a5dac81c4436014865c74
 SHA1 (patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs) = 3755f32fea84900cc0f00af3d9f53ed5fcfb0b4b
 SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = 5a516d377d491e0504aaf2d7aed04bb9ebeccc56
 SHA1 (patch-toolkit_modules_subprocess_subprocess__shared__unix.js) = 22a39e54e042ab2270a3cb54e4e307c8900cad12
Index: mozilla-common.mk
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/mozilla-common.mk,v
retrieving revision 1.171
diff -u -p -r1.171 mozilla-common.mk
--- mozilla-common.mk	17 Jun 2020 17:54:26 -0000	1.171
+++ mozilla-common.mk	24 Jun 2020 19:33:13 -0000
@@ -36,6 +36,8 @@ UNLIMIT_RESOURCES+=	datasize virtualsize
 # will depend on and use clang, doing so outside the normal compiler
 # selection framework.
 USE_LANGUAGES+=		c99 c++
+# For gnu++17, demand 7.
+GCC_REQD+=		7
 
 TOOL_DEPENDS+=		cbindgen>=0.14.2:../../devel/cbindgen
 .if ${MACHINE_ARCH} == "sparc64"
@@ -229,6 +231,7 @@ BUILDLINK_API_DEPENDS.nss+=	nss>=3.53
 .include "../../devel/nss/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 #.include "../../mk/jpeg.buildlink3.mk"
+BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=17.2.0
 .include "../../graphics/MesaLib/buildlink3.mk"
 #BUILDLINK_API_DEPENDS.cairo+=	cairo>=1.10.2nb4
 #.include "../../graphics/cairo/buildlink3.mk"
Index: patches/patch-third__party_rust_glslopt_glsl-optimizer_src_compiler_builtin__type__macros.h
===================================================================
RCS file: patches/patch-third__party_rust_glslopt_glsl-optimizer_src_compiler_builtin__type__macros.h
diff -N patches/patch-third__party_rust_glslopt_glsl-optimizer_src_compiler_builtin__type__macros.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-third__party_rust_glslopt_glsl-optimizer_src_compiler_builtin__type__macros.h	24 Jun 2020 19:33:13 -0000
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- third_party/rust/glslopt/glsl-optimizer/src/compiler/builtin_type_macros.h.orig	2020-06-02 23:37:31.000000000 +0000
++++ third_party/rust/glslopt/glsl-optimizer/src/compiler/builtin_type_macros.h
+@@ -28,6 +28,18 @@
+  * language version or extension might provide them.
+  */
+ 
++#ifdef __NetBSD__ /* XXX https://mail-index.netbsd.org/tech-userlevel/2018/09/08/msg011381.html */
++#undef uint8_t
++#undef uint16_t
++#undef uint32_t
++#undef uint64_t
++#undef int8_t
++#undef int16_t
++#undef int32_t
++#undef int64_t
++#endif
++
++
+ DECL_TYPE(error,  GL_INVALID_ENUM, GLSL_TYPE_ERROR, 0, 0)
+ DECL_TYPE(void,   GL_INVALID_ENUM, GLSL_TYPE_VOID,  0, 0)
+ 

/tmp/work/www/firefox/work/.cwrapper/bin/c++ -std=gnu++17 -o Unified_cpp_gfx_layers1.o -c  -I/tmp/work/www/firefox/work/build/dist/stl_wrappers -I/tmp/work/www/firefox/work/build/dist/system_wrappers -include /tmp/work/www/firefox/work/firefox-77.0.1/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DOS_POSIX=1 -DOS_NETBSD=1 -DOS_BSD=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/tmp/work/www/firefox/work/firefox-77.0.1/gfx/layers -I/tmp/work/www/firefox/work/build/gfx/layers -I/tmp/work/www/firefox/work/build/ipc/ipdl/_ipdlheaders -I/tmp/work/www/firefox/work/firefox-77.0.1/ipc/chromium/src -I/tmp/work/www/firefox/work/firefox-77.0.1/ipc/glue -I/tmp/work/www/firefox/work/firefox-77.0.1/docshell/base -I/tmp/work/www/firefox/work/firefox-77.0.1/layout/base -I/tmp/work/www/firefox/work/firefox-77.0.1/layout/generic -I/tmp/work/www/firefox/work/firefox-77.0.1/media/libyuv/libyuv/include -I/tmp/work/www/firefox/work/firefox-77.0.1/gfx/skia -I/tmp/work/www/firefox/work/firefox-77.0.1/gfx/skia/skia -I/tmp/work/www/firefox/work/build/dist/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss -I/usr/pkg/include/nspr -I/tmp/work/www/firefox/work/build/dist/include/nss -I/usr/X11R7/include/pixman-1 -fPIC -DPIC -DMOZILLA_CLIENT -include /tmp/work/www/firefox/work/build/mozilla-config.h -Qunused-arguments -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -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/pkg/include/freetype2 -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -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/pkg/include/freetype2 -fno-exceptions -fno-strict-aliasing -Dunix -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -I/usr/pkg/include -O2 -fomit-frame-pointer -funwind-tables -I/tmp/work/www/firefox/work/build/dist/include/cairo -I/tmp/work/www/firefox/work/firefox-77.0.1/widget/gtk/compat-gtk3 -I/usr/pkg/include/gtk-3.0 -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/freetype2 -I/usr/pkg/include/fribidi -I/usr/pkg/include/uuid -I/usr/X11R7/include -I/usr/pkg/include/cairo -I/usr/X11R7/include/pixman-1 -I/usr/pkg/include/libpng16 -I/usr/pkg/include/gdk-pixbuf-2.0 -D_REENTRANT -I/usr/pkg/include/gio-unix-2.0 -D_REENTRANT -I/usr/X11R7/include/libdrm -I/usr/pkg/include/atk-1.0 -I/usr/pkg/include/at-spi2-atk/2.0 -I/usr/pkg/include/at-spi-2.0 -I/usr/pkg/include/dbus-1.0 -I/usr/pkg/lib/dbus-1.0/include -I/usr/pkg/include/gtk-3.0/unix-print -D_REENTRANT -D_REENTRANT -D_REENTRANT -D_REENTRANT -D_REENTRANT -pthread -Wno-error=shadow -Wno-maybe-uninitialized -fexperimental-new-pass-manager  -MD -MP -MF .deps/Unified_cpp_gfx_layers1.o.pp   Unified_cpp_gfx_layers1.cpp
In file included from Unified_cpp_gfx_layers1.cpp:11:
In file included from /tmp/work/www/firefox/work/firefox-77.0.1/gfx/layers/LayerScope.cpp:56:
In file included from /tmp/work/www/firefox/work/firefox-77.0.1/gfx/layers/protobuf/LayerScopePacket.pb.h:26:
In file included from /tmp/work/www/firefox/work/build/dist/include/google/protobuf/generated_message_table_driven.h:34:
In file included from /tmp/work/www/firefox/work/build/dist/include/google/protobuf/map.h:49:
In file included from /tmp/work/www/firefox/work/build/dist/include/google/protobuf/map_type_handler.h:34:
/tmp/work/www/firefox/work/build/dist/include/google/protobuf/parse_context.h:258:3: error: no type named 'uintptr_t' in namespace 'std'; did you mean simply 'uintptr_t'?
  std::uintptr_t aliasing_ = kNoAliasing;
  ^~~~~~~~~~~~~~
  uintptr_t
/usr/include/sys/stdint.h:84:21: note: 'uintptr_t' declared here
typedef __uintptr_t     uintptr_t;
                        ^


Home | Main Index | Thread Index | Old Index