[mythtv-commits] Ticket #5906: Unable to compile SVN 19076 with Ubuntu 8.10

MythTV mythtv at cvs.mythtv.org
Thu May 13 04:01:48 UTC 2010


#5906: Unable to compile SVN 19076 with Ubuntu 8.10
--------------------------------------+-------------------------------------
 Reporter:  david.berry@…             |        Owner:  ijr       
     Type:  defect                    |       Status:  new       
 Priority:  minor                     |    Milestone:  unknown   
Component:  mythtv                    |      Version:  0.21-fixes
 Severity:  high                      |   Resolution:            
  Mlocked:  0                         |  
--------------------------------------+-------------------------------------
Changes (by jeffbowman@…):

  * status:  closed => new
  * resolution:  invalid =>


Comment:

 I apologize for reopening a two-year-old bug, but the resolution contains
 invalid information. This issue is still visible in the current trunk
 release. (I did not try compiling with my toolchain, but you can tell just
 by looking.)

 I had trouble compiling due to this error in mythtv-0.21 on an ARM GCC-4.3
 installation (on a Sheevaplug). As it turns out,
 [http://www.cplusplus.com/reference/clibrary/cmath/abs/ <cmath>] does NOT
 define int abs(int);
 [http://www.cplusplus.com/reference/clibrary/cstdlib/abs/ <cstdlib>] does.
 Apparently most versions of gcc are smart enough to figure this out, but
 some are not. (The suggested workaround didn't work for me, either.)

 For mythTV 0.21, I had to fix this in both "videooutbase.cpp" and
 "vsync.cpp" by adding the line "#include <cstdlib>" at the very top of the
 file. You may have to edit other files as well, if you have different
 config settings.

 It's beyond me how this works for everyone except a few, but in any case,
 pulling in <cstdlib> will allow your code to be properly C-compliant. :)

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5906#comment:6>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list