NetBSD Problem Report #54563

From www@netbsd.org  Mon Sep 23 06:05:35 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B4DB67A1A2
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 23 Sep 2019 06:05:35 +0000 (UTC)
Message-Id: <20190923060534.801247A1F0@mollari.NetBSD.org>
Date: Mon, 23 Sep 2019 06:05:34 +0000 (UTC)
From: ng0@n0.is
Reply-To: ng0@n0.is
To: gnats-bugs@NetBSD.org
Subject: firefox 69.0.1 fails to build with clang
X-Send-Pr-Version: www-1.0

>Number:         54563
>Category:       toolchain
>Synopsis:       libc++ headers have issues with #define isinf in netbsd headers (firefox 69.0.1 fails to build with clang)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 23 06:10:00 +0000 2019
>Last-Modified:  Tue Sep 24 09:35:01 +0000 2019
>Originator:     ng0
>Release:        current
>Organization:
>Environment:
NetBSD uptimegirl 9.99.11 NetBSD 9.99.11 (GENERIC) amd64
>Description:
on a system with clang from base and pkgsrc with clang, www/firefox fails to build with:

/usr/work/www/firefox/work/.cwrapper/bin/clang++ -o Decimal.o -c  -I/usr/work/www/firefox/work/build/dist/stl_wrappers -I/usr/work/www/firefox/work/build/dist/system_wrappers -include /usr/work/www/firefox/work/firefox-69.0.1/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DIMPL_MFBT -I/usr/work/www/firefox/work/firefox-69.0.1/mozglue/misc -I/usr/work/www/firefox/work/build/mozglue/misc -I/usr/work/www/firefox/work/build/dist/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss -I/usr/pkg/include/nspr -I/usr/work/www/firefox/work/build/dist/include/nss -I/usr/X11R7/include/pixman-1 -fPIC -DPIC -DMOZILLA_CLIENT -include /usr/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/X11R7/include/freetype2 -U
 _FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -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 -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-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 -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -O2 -I/usr/pkg/include/nspr -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS -I/usr/pkg/includ
 e -I/usr/include -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/X11R7/include/freetype2 -D__HAVE_INLINE___ISINF -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -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  -MD -MP -MF .deps/Decimal.o.pp  -Wno-implicit-fallthrough /usr/work/www/firefox/work/firefox-69.0.1/mozglue/misc/decimal/Decimal.cpp
In file included from /usr/work/www/firefox/work/firefox-69.0.1/mozglue/misc/decimal/Decimal.cpp:32:
In file included from /usr/work/www/firefox/work/firefox-69.0.1/mozglue/misc/decimal/moz-decimal-utils.h:16:
In file included from /usr/work/www/firefox/work/build/dist/include/mozilla/FloatingPoint.h:15:
In file included from /usr/work/www/firefox/work/build/dist/include/mozilla/MathAlgorithms.h:15:
In file included from /usr/work/www/firefox/work/build/dist/stl_wrappers/cmath:44:
In file included from /usr/work/www/firefox/work/build/dist/system_wrappers/cmath:3:
/usr/include/c++/cmath:393:12: error: use of undeclared identifier '__isinf'
    return isinf(__lcpp_x);
           ^
/usr/include/math.h:484:20: note: expanded from macro 'isinf'
#define isinf(__x)      __isinf(__x)
                        ^
/usr/include/c++/cmath:403:12: note: in instantiation of function template specialization '__libcpp_isinf<double>' requested here
    return __libcpp_isinf((typename std::__promote<_A1>::type)__lcpp_x);
           ^
/usr/work/www/firefox/work/firefox-69.0.1/mozglue/misc/decimal/Decimal.cpp:698:14: note: in instantiation of function template specialization 'isinf<double>' requested here
    if (std::isinf(doubleValue))
             ^
1 error generated.
gmake[3]: *** [/usr/work/www/firefox/work/firefox-69.0.1/config/rules.mk:803: Decimal.o] Error 1
gmake[3]: Leaving directory '/usr/work/www/firefox/work/build/mozglue/misc'
gmake[2]: *** [/usr/work/www/firefox/work/firefox-69.0.1/config/recurse.mk:74: mozglue/misc/target] Error 2
gmake[2]: Leaving directory '/usr/work/www/firefox/work/build'
gmake[1]: *** [/usr/work/www/firefox/work/firefox-69.0.1/config/recurse.mk:34: compile] Error 2
gmake[1]: Leaving directory '/usr/work/www/firefox/work/build'
gmake: *** [/usr/work/www/firefox/work/firefox-69.0.1/config/rules.mk:391: all] Error 2
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/www/firefox
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/www/firefox

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: N <ng0@n0.is>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Subject: Re: pkg/54563
Date: Mon, 23 Sep 2019 07:21:41 +0000

 I found this old workaround, probably handed to me
 by someone else in NetBSD. It applied to 68.0.1,
 no idea if it still applies to 69.0.1:


 --- config/make-system-wrappers.py.orig 2019-01-24 18:48:39.000000000 +0000
  +++ config/make-system-wrappers.py
  @@ -6,6 +6,7 @@ import os
   from mozbuild.util import FileAvoidWrite

   header_template = '''#pragma GCC system_header
  +#define __isinf(x) __builtin_isinf(x)
   #pragma GCC visibility push(default)
   {includes}
   #pragma GCC visibility pop


From: N <ng0@n0.is>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/54563
Date: Mon, 23 Sep 2019 07:43:19 +0000

 I should mention that this is with clang from base, and therefore the problem is the use of libc++.
 might be libc++ vs. netbsd's headers.

Responsible-Changed-From-To: pkg-manager->toolchain-manager
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Tue, 24 Sep 2019 07:29:36 +0000
Responsible-Changed-Why:
also assign to toolchain, change subject etc.
Requesting preprocessed source :-) (the .ii file resulting from running the build command with -save-temps)


From: N <ng0@n0.is>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/54563 (libc++ headers have issues with #define isinf
 in netbsd headers (firefox 69.0.1 fails to build with clang))
Date: Tue, 24 Sep 2019 08:57:00 +0000

 maya@NetBSD.org transcribed 458 bytes:
 > Synopsis: libc++ headers have issues with #define isinf in netbsd headers (firefox 69.0.1 fails to build with clang)
 > 
 > Responsible-Changed-From-To: pkg-manager->toolchain-manager
 > Responsible-Changed-By: maya@NetBSD.org
 > Responsible-Changed-When: Tue, 24 Sep 2019 07:29:36 +0000
 > Responsible-Changed-Why:
 > also assign to toolchain, change subject etc.
 > Requesting preprocessed source :-) (the .ii file resulting from running the build command with -save-temps)
 > 
 .ii file is here: https://d.n0.is/pub/tmp/ff6901/Decimal.ii 

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@netbsd.org
Cc: toolchain-manager@netbsd.org, pkg-manager@netbsd.org,
	netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, maya@NetBSD.org,
	ng0@n0.is
Subject: Re: toolchain/54563 (libc++ headers have issues with #define isinf
 in netbsd headers (firefox 69.0.1 fails to build with clang))
Date: Tue, 24 Sep 2019 11:34:39 +0200

 On Tue, Sep 24, 2019 at 07:29:37AM +0000, maya@NetBSD.org wrote:
 > Synopsis: libc++ headers have issues with #define isinf in netbsd headers (firefox 69.0.1 fails to build with clang)
 > 
 > Responsible-Changed-From-To: pkg-manager->toolchain-manager
 > Responsible-Changed-By: maya@NetBSD.org
 > Responsible-Changed-When: Tue, 24 Sep 2019 07:29:36 +0000
 > Responsible-Changed-Why:
 > also assign to toolchain, change subject etc.
 > Requesting preprocessed source :-) (the .ii file resulting from running the build command with -save-temps)

 Better would be "-frewrite-includes -E -o something.ii" and the full
 command line.

 Joerg

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.