Bug 196772

Summary: www/firefox: Build failed for i386
Product: Ports & Packages Reporter: woot-woot
Component: Individual Port(s)Assignee: freebsd-gecko (Nobody) <gecko>
Status: Closed FIXED    
Severity: Affects Only Me CC: bar, parv.0zero9+freebsd
Priority: --- Keywords: patch, patch-ready
Version: LatestFlags: bugzilla: maintainer-feedback? (gecko)
Hardware: i386   
OS: Any   
See Also: https://bugzilla.mozilla.org/show_bug.cgi?id=1122586
https://bugzilla.mozilla.org/show_bug.cgi?id=1122547
Attachments:
Description Flags
patch MediaDecoderStateMachine.cpp
jbeich: maintainer-approval+
seamonkey log for 9.3R i386
none
firefox log for 9.3R i386
none
firefox log for 10.0R amd64 none

Description woot-woot 2015-01-15 18:11:45 UTC
I have two systems, both updated today - ports and base system
firefox was successfully builded for amd64, but for i386 i have an error:

clang++ -o Unified_cpp_content_media2.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /usr/ports/www/firefox/work/mozilla-release/config/gcc_hidden.h -DOS_POSIX=1 -DOS_FREEBSD=1 -DOS_BSD=1 -DMOZILLA_INTERNAL_API -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_GLUE_IN_PROGRAM -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/usr/ports/www/firefox/work/mozilla-release/content/media -I. -I/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd9.3/ipc/ipdl/_ipdlheaders -I/usr/ports/www/firefox/work/mozilla-release/ipc/chromium/src -I/usr/ports/www/firefox/work/mozilla-release/ipc/glue -I/usr/ports/www/firefox/work/mozilla-release/content/base/src -I/usr/ports/www/firefox/work/mozilla-release/layout/generic -I/usr/ports/www/firefox/work/mozilla-release/layout/xul -I/usr/ports/www/firefox/work/mozilla-release/netwerk/base/src -I../../dist/include   -I/usr/local/include/nspr -I/usr/local/include/nss -I/usr/local/include/nss/nss -I/usr/local/include -I/usr/local/include  -I/usr/local/include/pixman-1     -fPIC  -Qunused-arguments -isystem/usr/local/include  -I/usr/local/include -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/Unified_cpp_content_media2.o.pp -Qunused-arguments -isystem/usr/local/include  -I/usr/local/include -Qunused-arguments -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Werror=endif-labels -Werror=int-to-pointer-cast -Werror=missing-braces -Werror=pointer-arith -Werror=return-type -Werror=sequence-point -Werror=unused-label -Werror=trigraphs -Werror=type-limits -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -O2 -pipe -march=prescott -fno-strict-aliasing -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pipe  -DNDEBUG -DTRIMMED -fno-omit-frame-pointer   -I/usr/local/include/gstreamer-1.0 -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/opus -I/usr/local/include/soundtouch    /usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd9.3/content/media/Unified_cpp_content_media2.cpp
In file included from /usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd9.3/content/media/Unified_cpp_content_media1.cpp:29:
/usr/ports/www/firefox/work/mozilla-release/content/media/MediaDecoderStateMachine.cpp:1315:7: error: call to 'abs' is ambiguous
      std::abs(aDuration - duration) > ESTIMATED_DURATION_FUZZ_FACTOR_USECS) {
      ^~~~~~~~
/usr/include/stdlib.h:83:6: note: candidate function
int      abs(int) __pure2;
         ^
/usr/include/c++/4.2/cmath:89:3: note: candidate function
  abs(double __x)
  ^
/usr/include/c++/4.2/cmath:93:3: note: candidate function
  abs(float __x)
  ^
/usr/include/c++/4.2/cmath:97:3: note: candidate function
  abs(long double __x)
  ^
/usr/include/c++/4.2/cstdlib:143:3: note: candidate function
  abs(long __i) { return labs(__i); }
  ^
1 error generated.
/usr/ports/www/firefox/work/mozilla-release/config/rules.mk:948: ошибка выполнения рецепта для цели «Unified_cpp_content_media1.o»
gmake[5]: *** [Unified_cpp_content_media1.o] Ошибка 1

Same error with removed /etc/make.conf
FreeBSD 9.3-STABLE #0 r277178
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-15 18:11:45 UTC
Auto-assigned to maintainer gecko@FreeBSD.org
Comment 2 Barbara Guida freebsd_committer freebsd_triage 2015-01-15 23:13:39 UTC
Created attachment 151714 [details]
patch MediaDecoderStateMachine.cpp
Comment 3 Barbara Guida freebsd_committer freebsd_triage 2015-01-15 23:14:25 UTC
Could you try putting the attached patch in /usr/ports/www/firefox/files?
Comment 4 woot-woot 2015-01-16 04:02:16 UTC
patch works, thank you!
Comment 5 Jan Beich freebsd_committer freebsd_triage 2015-01-16 16:37:48 UTC
Comment on attachment 151714 [details]
patch MediaDecoderStateMachine.cpp

Thanks. Forwarded upstream with a similar bug in Firefox 36.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2015-01-17 03:38:59 UTC
Can you test and land the following change? Skip firefox-nightly as it's not in ports.

https://trillian.chruetertee.ch/freebsd-gecko/changeset/1805
Comment 7 Bill E 2015-01-18 14:44:10 UTC
Patch tested successfully using poudriere, 9.3-RELEASE-p8  i386.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2015-01-19 13:09:30 UTC
*** Bug 196883 has been marked as a duplicate of this bug. ***
Comment 9 Jan Beich freebsd_committer freebsd_triage 2015-01-20 19:42:49 UTC
Created attachment 151920 [details]
seamonkey log for 9.3R i386
Comment 10 Jan Beich freebsd_committer freebsd_triage 2015-01-20 19:43:46 UTC
Created attachment 151921 [details]
firefox log for 9.3R i386
Comment 11 Jan Beich freebsd_committer freebsd_triage 2015-01-20 21:37:39 UTC
Created attachment 151930 [details]
firefox log for 10.0R amd64
Comment 12 commit-hook freebsd_committer freebsd_triage 2015-01-20 22:50:04 UTC
A commit references this bug:

Author: jbeich
Date: Tue Jan 20 22:49:42 UTC 2015
New revision: 377551
URL: https://svnweb.freebsd.org/changeset/ports/377551

Log:
  Unbreak build with base libstdc++ on i386 and powerpc

  std::abs(int64_t) for 32bit archs or std::llabs are not available in
  base libstdc++ from forked GCC 4.2.1 or before 10.0-RELEASE (r255294)
  for libstdc++ in lang/gcc47 and earlier (upstream PR libstdc++/54686).
  To avoid the build error use mozilla::Abs which implements overloads
  for all signed natural types but has unsigned return value.

  This change won't be requried for Firefox 36 et al.

  PR:		196772
  Reported by:	many
  Submitted by:	bar (initial version)
  Obtained from:	https://github.com/mozilla/gecko-dev/commit/e664fe8
  Differential Revision:	https://reviews.freebsd.org/D1569
  Approved by:	flo (mentor)
  MFH:		2015Q1

Changes:
  head/www/firefox/files/patch-bug1122586
  head/www/seamonkey/files/patch-bug1122586
Comment 13 commit-hook freebsd_committer freebsd_triage 2015-01-21 04:48:48 UTC
A commit references this bug:

Author: jbeich
Date: Wed Jan 21 04:47:49 UTC 2015
New revision: 377575
URL: https://svnweb.freebsd.org/changeset/ports/377575

Log:
  MFH: r377551

  Unbreak build with base libstdc++ on i386 and powerpc

  std::abs(int64_t) for 32bit archs or std::llabs are not available in
  base libstdc++ from forked GCC 4.2.1 or before 10.0-RELEASE (r255294)
  for libstdc++ in lang/gcc47 and earlier (upstream PR libstdc++/54686).
  To avoid the build error use mozilla::Abs which implements overloads
  for all signed natural types but has unsigned return value.

  This change won't be requried for Firefox 36 et al.

  PR:		196772
  Reported by:	many
  Submitted by:	bar (initial version)
  Obtained from:	https://github.com/mozilla/gecko-dev/commit/e664fe8
  Differential Revision:	https://reviews.freebsd.org/D1569
  Approved by:	bapt, flo (mentors)
  Approved by:	portmgr (bapt)

Changes:
_U  branches/2015Q1/
  branches/2015Q1/www/firefox/files/patch-bug1122586
  branches/2015Q1/www/seamonkey/files/patch-bug1122586