Bug 235153 - mail/thunderbird, www/firefox-esr: fails to build on 11.2 i386 since 60.5.0,1
Summary: mail/thunderbird, www/firefox-esr: fails to build on 11.2 i386 since 60.5.0,1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gecko (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2019-01-23 12:44 UTC by p5B2E9A8F
Modified: 2019-02-03 19:22 UTC (History)
2 users (show)

See Also:
jbeich: maintainer-feedback+
p5B2E9A8F: maintainer-feedback?


Attachments
Poudriere build log file (378.01 KB, text/plain)
2019-01-23 12:44 UTC, p5B2E9A8F
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description p5B2E9A8F 2019-01-23 12:44:31 UTC
Created attachment 201357 [details]
Poudriere build log file

Poudriere build fails with this:
/wrkdirs/usr/ports/www/firefox-esr/work/.build/_virtualenv/bin/python -m mozbuild.action.check_binary --target libxul.so
TEST-UNEXPECTED-FAIL | check_textrel | libxul.so | We do not want text relocations in libraries and programs
gmake[4]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/rules.mk:710: libxul.so] Error 1
gmake[4]: *** Deleting file 'libxul.so'
gmake[4]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build/toolkit/library'
gmake[3]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/recurse.mk:73: toolkit/library/target] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build'
gmake[2]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/recurse.mk:33: compile] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build'
gmake[1]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/rules.mk:442: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/www/firefox-esr
=>> Cleaning up wrkdir
===>  Cleaning for firefox-esr-60.5.0,1
build of www/firefox-esr | firefox-esr-60.5.0,1 ended at Wed Jan 23 05:45:40 CET 2019
build time: 00:42:42
!!! build failure encountered !!!

For complete build log see attachment.
Comment 1 Tobias Kortkamp freebsd_committer 2019-01-23 12:54:55 UTC
Once again please use 'category/port: short summary' as the format
for filling in the bug title, so that the Bugzilla auto-assigner
can work.  Everything else risks losing your bug submissions to the
void if nobody is there to correct it manually.
Comment 2 Jan Beich freebsd_committer 2019-01-23 14:39:41 UTC
Looks specific to 11.2 i386. I can't reproduce on 11.2 amd64 or 12.0 i386. As vanilla mozilla-esr60 builds fine on 11.2 i386 the cause is probably one of the patches or the port's build environment.

60.5 update had a few risky changes e.g., massive code churn from clang-format (including preparation) and check_textrel conversion from GNU Make to Python.
Comment 4 p5B2E9A8F 2019-01-26 13:43:41 UTC
firefox-esr-60.5.0_1,1 fails exactly as before:

TEST-UNEXPECTED-FAIL | check_textrel | libxul.so | We do not want text relocations in libraries and programs
gmake[4]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/rules.mk:710: libxul.so] Error 1
gmake[4]: *** Deleting file 'libxul.so'
gmake[4]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build/toolkit/library'
gmake[3]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/recurse.mk:73: toolkit/library/target] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build'
gmake[2]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/recurse.mk:33: compile] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build'
gmake[1]: *** [/wrkdirs/usr/ports/www/firefox-esr/work/firefox-60.5.0/config/rules.mk:442: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/www/firefox-esr/work/.build'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/www/firefox-esr
=>> Cleaning up wrkdir
===>  Cleaning for firefox-esr-60.5.0_1,1
build of www/firefox-esr | firefox-esr-60.5.0_1,1 ended at Sat Jan 26 13:35:34 UTC 2019
build time: 00:43:02
!!! build failure encountered !!!
Comment 5 John Hein 2019-01-31 17:01:03 UTC
The underlying issue is that libxul.so (produced by /usr/local/bin/clang++70) has a dynamic elf section with a TEXTREL tag.

 % readelf -d libxul.so | grep TEXTREL
 0x00000016 (TEXTREL)                    0x0
 0x0000001e (FLAGS)                      TEXTREL

check_binary.py in the thunderbird build tree looks for TEXTREL and that is treated as a build error.  But it boils down to the above readelf check.

I don't know yet what is different on 11/i386 (could be a llvm70 problem, for instance).
Comment 6 John Hein 2019-02-01 22:59:20 UTC
By the way, using binutils [1] from ports to use a different ld fails when linking libxul.so in a different way:

 .
 .
/usr/local/bin/ld: ../../js/src/js-dtrace.o: warning: relocation against `_ZN2js13ExecuteKernelEP9JSContextN2JS6HandleIP8JSScriptEER8JSObjectRKNS2_5ValueENS_16AbstractFramePtrEPS9_' in read-only section `.SUNW_dof'
/usr/local/bin/ld: read-only segment has dynamic relocations
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)


[1]
Index: Makefile
===================================================================
--- Makefile    (revision 491624)
+++ Makefile    (working copy)
@@ -28,6 +28,8 @@
                zip:archivers/zip

 SSP_UNSAFE=    yes
+USE_BINUTILS=  yes
+LDFLAGS+=-B/usr/local/bin
 USE_GECKO=     gecko
 USE_MOZILLA=   -webp
Comment 7 commit-hook freebsd_committer 2019-02-02 18:38:10 UTC
A commit references this bug:

Author: jbeich
Date: Sat Feb  2 18:37:40 UTC 2019
New revision: 491971
URL: https://svnweb.freebsd.org/changeset/ports/491971

Log:
  www/firefox-esr: disable DTRACE on i386 by default after r490962

  TEST-UNEXPECTED-FAIL | check_textrel | libxul.so | We do not want text relocations in libraries and programs

  PR:		235153

Changes:
  head/www/firefox/Makefile.options
Comment 8 commit-hook freebsd_committer 2019-02-02 18:39:14 UTC
A commit references this bug:

Author: jbeich
Date: Sat Feb  2 18:38:16 UTC 2019
New revision: 491973
URL: https://svnweb.freebsd.org/changeset/ports/491973

Log:
  MFH: r491971

  www/firefox-esr: disable DTRACE on i386 by default after r490962

  TEST-UNEXPECTED-FAIL | check_textrel | libxul.so | We do not want text relocations in libraries and programs

  PR:		235153
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2019Q1/
  branches/2019Q1/www/firefox/Makefile.options
Comment 9 Jan Beich freebsd_committer 2019-02-02 18:40:33 UTC
(In reply to John Hein from comment #6)
Thanks for testing devel/binutils which gave away DTRACE as the culprit.
Comment 10 John Hein 2019-02-03 18:43:04 UTC
Thanks.  I was going to look into the dtrace connection next.  Can you explain the interactions with i386 and dtrace that manifested the build failure(s) in this particular way?
Comment 11 Jan Beich freebsd_committer 2019-02-03 19:22:09 UTC
DTRACE is gone since ports r491972. I'm not interested in spending too much time on features only available in legacy branches.