Bug 244408 - lang/gjs: Fails to build when clang has assertions enabled
Summary: lang/gjs: Fails to build when clang has assertions enabled
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome mailing list
URL:
Keywords:
Depends on:
Blocks: 244251
  Show dependency treegraph
 
Reported: 2020-02-25 19:28 UTC by Dimitry Andric
Modified: 2020-02-25 19:28 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2020-02-25 19:28:32 UTC
As reported in bug 244251, with clang 10.0.0 the lang/gjs port fails to build with a clang assertion, if such assertions are enabled (they are only in FreeBSD head, not in stable or release branches):

Assertion failed: (!isValueDependent() && "Cannot get the length of a value-dependent pack size expression"), function getPackLength, file /poudriere/jails/headamd64244251/usr/src/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h, line 4170.
Stack dump:
0.	Program arguments: c++ -DHAVE_CONFIG_H -I. -DG_LOG_DOMAIN="Gjs" -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/gobject-introspection-1.0 -I/usr/local/lib/libffi-3.2.1/include -pthread -include /usr/local/include/mozjs-52/js/RequiredDefines.h -I/usr/local/include/mozjs-52 -I/usr/local/include/nspr -DGJS_TOP_SRCDIR="." -DGJS_TOP_BUILDDIR="." -DGJS_JS_DIR="/usr/local/share/gjs-1.0" -DPKGLIBDIR="/usr/local/lib/gjs" -I./gi -DGJS_COMPILATION -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -D_THREAD_SAFE -pthread -I/usr/local/include -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Warray-bounds -Wreturn-type -Wno-overloaded-virtual -Wswitch-enum -Wswitch-default -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=overloaded-virtual -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -DPIC -MT gi/libgjs_la-object.lo -MD -MP -MF gi/.deps/libgjs_la-object.Tpo -c gi/object.cpp -fPIC -DPIC -o gi/.libs/libgjs_la-object.o 
1.	./gjs/jsapi-util-args.h:410:5 <Spelling=/usr/local/include/glib-2.0/glib/gmacros.h:385:70>: current parser token ')'
2.	./gjs/jsapi-util-args.h:383:1: parsing function body 'gjs_parse_call_args'
3.	./gjs/jsapi-util-args.h:383:1: in compound statement ('{}')
4.	./gjs/jsapi-util-args.h:410:5 <Spelling=/usr/local/include/glib-2.0/glib/gtestutils.h:117:54>: in compound statement ('{}')

This has independently been reported upstream by Jörg Sonnenberger:
https://bugs.llvm.org/show_bug.cgi?id=44980

Adding this bug to track whenever we import a fix from upstream.