NetBSD Problem Report #52594

From www@NetBSD.org  Wed Oct  4 18:33:00 2017
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 9AF117A173
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  4 Oct 2017 18:33:00 +0000 (UTC)
Message-Id: <20171004183259.155447A287@mollari.NetBSD.org>
Date: Wed,  4 Oct 2017 18:32:59 +0000 (UTC)
From: scole_mail@gmx.com
Reply-To: scole_mail@gmx.com
To: gnats-bugs@NetBSD.org
Subject: firefox 55.0.3 fails to build on i386
X-Send-Pr-Version: www-1.0

>Number:         52594
>Category:       pkg
>Synopsis:       firefox 55.0.3 fails to build on i386
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ryoon
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 04 18:35:00 +0000 2017
>Closed-Date:    Tue Feb 20 09:00:36 +0000 2018
>Last-Modified:  Tue Feb 20 09:00:36 +0000 2018
>Originator:     scole_mail
>Release:        pkgsrc-2017Q3
>Organization:
none
>Environment:
NetBSD dstar 7.1.0_PATCH NetBSD 7.1.0_PATCH (GENERIC) #0: Fri Sep  8 20:45:12 PDT 2017  scole@dstar:/home/scole/nbsd/cvs/7_0/obj/sys/arch/i386/compile/GENERIC i386
>Description:
firefox from pkgsrc-2017Q3 55.0.3 is failing to build for me with an undefined reference to __stack_chk_fail_local


[snipped ...]
rm -f libmozsqlite3.so
/usr/pkgsrc/www/firefox/work/build/_virtualenv/bin/python /usr/pkgsrc/www/firefox/work/firefox-55.0.3/config/expandlibs_exec.py --uselist --  /usr/pkgsrc/www/firefox/work/.cwrapper/bin/c++ -std=gnu++11 -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/X11R7/include/freetype2 -I/usr/pkg/include/ffmpeg3  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -O2 -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/X11R7/include/freetype2 -I/usr/pkg/include/ffmpeg3 -march=i586 -mstackrealign -fno-exceptions -fno-strict-aliasing -Dunix -fno-rtt
 i -fno-exceptions -fno-math-errno -pthread -pipe -I/usr/pkg/include  -O2 -fomit-frame-pointer  -fPIC -DPIC -shared -Wl,-soname,libmozsqlite3.so -o libmozsqlite3.so     -lpthread -Wl,-R/usr/pkg/lib/firefox -Wl,-R/usr/pkg/lib -L/usr/pkg/gcc49/lib/gcc/i486--netbsdelf/4.9.4 -Wl,-R/usr/pkg/gcc49/lib/gcc/i486--netbsdelf/4.9.4 -L/usr/pkg/gcc49/lib -Wl,-R/usr/pkg/gcc49/lib -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib/nspr -Wl,-R/usr/pkg/lib/nspr -L/usr/pkg/lib/nss -Wl,-R/usr/pkg/lib/nss -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/pkg/lib/ffmpeg3 -Wl,-R/usr/pkg/lib/ffmpeg3 -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id   -Wl,-rpath-link,/usr/pkgsrc/www/firefox/work/build/dist/bin -Wl,-rpath-link,/usr/pkg/lib   ../../../db/sqlite3/src/libdb_sqlite3_src.a   -Wl,--version-script,libmozsqlite3.so.symbols    
Executing: ../../../../.cwrapper/bin/c++ -std=gnu++11 -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/X11R7/include/freetype2 -I/usr/pkg/include/ffmpeg3 -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -O2 -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/X11R7/include/freetype2 -I/usr/pkg/include/ffmpeg3 -march=i586 -mstackrealign -fno-exceptions -fno-strict-aliasing -Dunix -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -I/usr/pkg/include -O2 -fomit-frame-pointer -fPIC -DPIC -shared -Wl,-soname,libmozsqlite3.so -o libm
 ozsqlite3.so -lpthread -Wl,-R/usr/pkg/lib/firefox -Wl,-R/usr/pkg/lib -L/usr/pkg/gcc49/lib/gcc/i486--netbsdelf/4.9.4 -Wl,-R/usr/pkg/gcc49/lib/gcc/i486--netbsdelf/4.9.4 -L/usr/pkg/gcc49/lib -Wl,-R/usr/pkg/gcc49/lib -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib/nspr -Wl,-R/usr/pkg/lib/nspr -L/usr/pkg/lib/nss -Wl,-R/usr/pkg/lib/nss -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/pkg/lib/ffmpeg3 -Wl,-R/usr/pkg/lib/ffmpeg3 -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -Wl,-rpath-link,/usr/pkgsrc/www/firefox/work/build/dist/bin -Wl,-rpath-link,/usr/pkg/lib /usr/pkgsrc/www/firefox/work/build/config/external/sqlite/tmpwWcwaj.list -Wl,--version-script,libmozsqlite3.so.symbols
/usr/pkgsrc/www/firefox/work/build/config/external/sqlite/tmpwWcwaj.list:
    INPUT("../../../db/sqlite3/src/sqlite3.o")

../../../db/sqlite3/src/sqlite3.o: In function `putVarint64':
sqlite3.c:(.text+0x140f): undefined reference to `__stack_chk_fail_local'
../../../db/sqlite3/src/sqlite3.o: In function `remove_diacritic':
sqlite3.c:(.text+0x7a67): undefined reference to `__stack_chk_fail_local'
../../../db/sqlite3/src/sqlite3.o: In function `readMasterJournal':
sqlite3.c:(.text+0xad0d): undefined reference to `__stack_chk_fail_local'
../../../db/sqlite3/src/sqlite3.o: In function `vdbePmaWriteVarint':
sqlite3.c:(.text+0xe5c5): undefined reference to `__stack_chk_fail_local'
../../../db/sqlite3/src/sqlite3.o: In function `readJournalHdr':
sqlite3.c:(.text+0xfcd1): undefined reference to `__stack_chk_fail_local'
../../../db/sqlite3/src/sqlite3.o:sqlite3.c:(.text+0x1777d): more undefined references to `__stack_chk_fail_local' follow
/usr/bin/ld: libmozsqlite3.so: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/usr/pkgsrc/www/firefox/work/firefox-55.0.3/config/rules.mk:783: recipe for target 'libmozsqlite3.so' failed
gmake[3]: *** [libmozsqlite3.so] Error 1
gmake[3]: Leaving directory '/usr/pkgsrc/www/firefox/work/build/config/external/sqlite'
/usr/pkgsrc/www/firefox/work/firefox-55.0.3/config/recurse.mk:73: recipe for target 'config/external/sqlite/target' failed
gmake[2]: *** [config/external/sqlite/target] Error 2
gmake[2]: Leaving directory '/usr/pkgsrc/www/firefox/work/build'
/usr/pkgsrc/www/firefox/work/firefox-55.0.3/config/recurse.mk:32: recipe for target 'compile' failed
gmake[1]: *** [compile] Error 2
gmake[1]: Leaving directory '/usr/pkgsrc/www/firefox/work/build'
/usr/pkgsrc/www/firefox/work/firefox-55.0.3/config/rules.mk:519: recipe for target 'all' failed
gmake: *** [all] Error 2
*** Error code 2

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

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




>How-To-Repeat:
cd pkgsrc/www/firefox && bmake install
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Thu, 05 Oct 2017 07:15:34 +0000
Responsible-Changed-Why:
Over to maintainer.


From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52594 (firefox 55.0.3 fails to build on i386)
Date: Fri, 06 Oct 2017 13:29:13 -0700

 This problem seems to be related to ssp.  I see one place
 __stack_chk_fail_local is defined here:
 https://nxr.netbsd.org/xref/src/lib/libc/misc/stack_protector.c#120

 This version of firefox apparently requires gcc4.9 to build, from
 pkgsrc/www/firefox/mozilla-commmon.mk
 GCC_REQD+=		4.9

 but it looks like gcc49 doesn't get built with ssp? from
 pkgsrc/lang/gcc49/Makefile
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-*)
 # native SSP conflicts with gcc's libssp
 CONFIGURE_ARGS+=	--disable-libssp
 ...

 But, using nm, I see there is lots of stuff in /usr/pkg/lib/*.a
 containing
  "U __stack_chk_fail_local"
 that I guess firefox's build would pull in.

 I tried building with "-fno-stack-protector", but that didn't help.

 If I sprinkle
  "int __stack_chk_fail_local;"
 in enough files, firefox builds and runs fine, but I am not sure of a
 proper fix.

 Thanks

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/52594 (firefox 55.0.3 fails to build on i386)
Date: Sat, 21 Oct 2017 10:33:40 +0900

 Fixed by the following lang/gcc49 change:
  http://mail-index.netbsd.org/pkgsrc-changes/2017/10/14/msg165312.html

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 20 Feb 2018 09:00:36 +0000
State-Changed-Why:
fixed in gcc


>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.