Last Comment Bug 619324 - cff.cc failing to build on Solaris with native Sun compiler
: cff.cc failing to build on Solaris with native Sun compiler
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: 1.9.2 Branch
: Other Other
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-15 06:34 PST by The Written Word
Modified: 2011-11-15 21:00 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
workaround (5.45 KB, patch)
2010-12-15 21:42 PST, Ginn Chen
no flags Details | Diff | Splinter Review
patch, add typecasts to fix the build failure (2.50 KB, patch)
2010-12-15 21:52 PST, Jonathan Kew (:jfkthame)
no flags Details | Diff | Splinter Review
workaround revised (5.91 KB, patch)
2010-12-15 22:30 PST, Ginn Chen
no flags Details | Diff | Splinter Review

Description The Written Word 2010-12-15 06:34:18 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101212 Remi/fc12 Firefox/3.6.13
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101212 Remi/fc12 Firefox/3.6.13

mozilla/gfx/ots/src/cff.cc fails to build on Solaris 8, 9, and 10 with the native Sun C++ compiler:
"cff.cc", line 190: Error: Formal argument x of type const std::pair<unsigned,::DICT_OPERAND_TYPE>& in call to std::vector<std::pair<unsigned,::DICT_OPERAND_TYPE> >::push_back(const std::pair<unsigned,::DICT_OPERAND_TYPE>&) is being passed std::pair<int,::DICT_OPERAND_TYPE>.
"cff.cc", line 196: Error: Formal argument x of type const std::pair<unsigned,::DICT_OPERAND_TYPE>& in call to std::vector<std::pair<unsigned,::DICT_OPERAND_TYPE> >::push_back(const std::pair<unsigned,::DICT_OPERAND_TYPE>&) is being passed std::pair<int,::DICT_OPERAND_TYPE>.
"cff.cc", line 265: Error: Formal argument x of type const std::pair<unsigned,::DICT_OPERAND_TYPE>& in call to std::vector<std::pair<unsigned,::DICT_OPERAND_TYPE> >::push_back(const std::pair<unsigned,::DICT_OPERAND_TYPE>&) is being passed std::pair<int,::DICT_OPERAND_TYPE>.
"cff.cc", line 276: Error: Formal argument x of type const std::pair<unsigned,::DICT_OPERAND_TYPE>& in call to std::vector<std::pair<unsigned,::DICT_OPERAND_TYPE> >::push_back(const std::pair<unsigned,::DICT_OPERAND_TYPE>&) is being passed std::pair<int,::DICT_OPERAND_TYPE>.
"cff.cc", line 318: Error: Formal argument x of type const std::pair<unsigned,::DICT_OPERAND_TYPE>& in call to std::vector<std::pair<unsigned,::DICT_OPERAND_TYPE> >::push_back(const std::pair<unsigned,::DICT_OPERAND_TYPE>&) is being passed std::pair<unsigned char,::DICT_OPERAND_TYPE>.

Reproducible: Always
Comment 1 Ginn Chen 2010-12-15 21:42:48 PST
Created attachment 498028 [details] [diff] [review]
workaround

I use this workaround to make it compile.
Comment 2 Jonathan Kew (:jfkthame) 2010-12-15 21:52:25 PST
Created attachment 498031 [details] [diff] [review]
patch, add typecasts to fix the build failure

Seems like this should be easy to fix with a sprinkling of typecasts (but I don't have a Solaris box to try it).
Comment 3 Jonathan Kew (:jfkthame) 2010-12-15 21:55:03 PST
Oops, sorry, didn't see that you'd already posted a patch!

It would be good to report this upstream (http://code.google.com/p/ots/).
Comment 4 Ginn Chen 2010-12-15 22:30:50 PST
Created attachment 498038 [details] [diff] [review]
workaround revised

Revise the workaround with more accurate type name.

Reported at http://code.google.com/p/chromium/issues/detail?id=67121
Comment 5 The Written Word 2010-12-16 04:33:36 PST
(In reply to comment #4)
> Created attachment 498038 [details] [diff] [review]
> workaround revised
> 
> Revise the workaround with more accurate type name.
> 
> Reported at http://code.google.com/p/chromium/issues/detail?id=67121

This patch works for me.
Comment 6 Benoit Girard (:BenWa) 2011-11-15 20:03:47 PST
Are these patches still good? If so I'll find a reviewer for them.
Comment 7 Ginn Chen 2011-11-15 21:00:44 PST
The patch is integrated in latest mozilla-central.

Note You need to log in before you can comment on or make changes to this bug.