Unable to install Firefox 22: Compilation Error in CheckedInt.h

I am running FreeBSD 9.0-RELEASE and was attempting to upgrade to Firefox. pkg_version -L gives me:
Code:
firefox-20.0,1                      <   needs updating (index has 22.0,1)

I am able to install all related packages but I get a compile time error when building Firefox.The error message I get is displayed below:
Code:
In file included from ../../dist/include/mozilla/gfx/Blur.h:12:
../../dist/include/mozilla/CheckedInt.h:179:31: error: non-type template argument of type 'const bool' is not an
      integral constant expression
    static const bool value = IntegerType(-1) <= IntegerType(0);
                              ^
../../dist/include/mozilla/CheckedInt.h:343:28: note: while checking a default template argument used here
  return IsInRangeImpl<T, U>::run(x);
         ~~~~~~~~~~~~~~~~~~^
../../dist/include/mozilla/CheckedInt.h:578:18: note: in instantiation of function template specialization
      'mozilla::detail::IsInRange<int, float>' requested here
        mIsValid(detail::IsInRange<T>(value))
                 ^
/usr/ports/www/firefox/work/mozilla-release/gfx/2d/Blur.cpp:404:37: note: in instantiation of function template
      specialization 'mozilla::CheckedInt<int>::CheckedInt<float>' requested here
  CheckedInt<int32_t> minDataSize = CheckedInt<int32_t>(aRect.width)*aRect.height;
                                    ^
1 error generated.
gmake[4]: *** [Blur.o] Error 1
gmake[4]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.0/gfx/2d'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.0/gfx'
gmake[2]: *** [libs_tier_platform] Error 2
gmake[2]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.0'
gmake[1]: *** [tier_platform] Error 2
gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.0'
gmake: *** [default] Error 2
*** Error code 1

Stop in /usr/ports/www/firefox.
*** Error code 1

Any suggestions on how I could fix this would be greatly appreciated?

Thanks
 
It's good to stick with supported releases, but that is probably not the problem here. Most likely it is a ports problem, possibly something that the Firefox compile depends on not being the needed version. Have all ports been updated? See Upgrading FreeBSD Ports.
 
Firstly, all my ports were updated so I am pretty sure that was not the source of the problem. However, I did go ahead and upgrade to 9.1-RELEASE and the problem just went away.

Thanks for all the help
 
Back
Top