[mythtv-commits] Ticket #1885: Mac OS X compile error with abs(long long)

MythTV mythtv at cvs.mythtv.org
Sun May 28 10:38:02 UTC 2006


#1885: Mac OS X compile error with abs(long long)
--------------------+-------------------------------------------------------
 Reporter:  nigel   |        Owner:  nigel
     Type:  defect  |       Status:  new  
 Priority:  minor   |    Milestone:  0.20 
Component:  mythtv  |      Version:  head 
 Severity:  medium  |   Resolution:       
--------------------+-------------------------------------------------------
Old description:

> My first backend build in a while does:
> {{{g++ -c -pipe -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt -faltivec -Wall
> -W -O3 -Wall -Wno-switch -I/Volumes/MythOSXbuild/.osx-
> packager/build/include -no-cpp-precomp -pipe -fomit-frame-pointer
> -force_cpusubtype_ALL -Wno-sign-compare -fno-inline-functions
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/Volumes/MythOSXbuild
> /.osx-packager/build\" -DLIBDIR=\"/Volumes/MythOSXbuild/.osx-
> packager/build/lib\" -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED
> -DQT_ACCESSIBILITY_SUPPORT -I/Volumes/MythOSXbuild/.osx-packager/src/qt-
> mac-free-3.3.5/mkspecs/default -I. -I../../../../../build/include
> -I../../../../../build/include -I../../libs -I../../libs/libmyth
> -I../../libs/libmythtv -I../.. -I../../libs/libavutil
> -I../../libs/libavformat -I../../libs/libavcodec -I/Volumes/MythOSXbuild
> /.osx-packager/src/qt-mac-free-3.3.5/include
> -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers
> -I/System/Library/Frameworks/AGL.framework/Versions/A/Headers -o
> mainserver.o mainserver.cpp
> In file included from mainserver.h:17,
>                  from mainserver.cpp:41:
> filetransfer.h:19: warning: `class FileTransfer' only defines a private
>    destructor and has no friends
> mainserver.cpp: In member function `void
>    MainServer::FillStatusXML(QDomDocument*)':
> mainserver.cpp:3998: error: call of overloaded `abs(long long int)' is
>    ambiguous
> /usr/include/stdlib.h:126: error: candidates are: int abs(int)
> /usr/include/gcc/darwin/3.3/c++/cmath:95: error:                 long
> double
>    std::abs(long double)
> /usr/include/gcc/darwin/3.3/c++/cmath:91: error:                 float
>    std::abs(float)
> /usr/include/gcc/darwin/3.3/c++/cmath:87: error:                 double
>    std::abs(double)
> /usr/include/gcc/darwin/3.3/c++/cstdlib:119: error:                 long
> int
>    std::abs(long int)
> make[2]: *** [mainserver.o] Error 1}}}

New description:

 My first backend build in a while does:
 {{{
 g++ -c -pipe -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt -faltivec -Wall -W
 -O3 -Wall -Wno-switch -I/Volumes/MythOSXbuild/.osx-packager/build/include
 -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-
 sign-compare -fno-inline-functions  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
 -DPREFIX=\"/Volumes/MythOSXbuild/.osx-packager/build\"
 -DLIBDIR=\"/Volumes/MythOSXbuild/.osx-packager/build/lib\" -DQT_NO_DEBUG
 -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_ACCESSIBILITY_SUPPORT
 -I/Volumes/MythOSXbuild/.osx-packager/src/qt-mac-
 free-3.3.5/mkspecs/default -I. -I../../../../../build/include
 -I../../../../../build/include -I../../libs -I../../libs/libmyth
 -I../../libs/libmythtv -I../.. -I../../libs/libavutil
 -I../../libs/libavformat -I../../libs/libavcodec -I/Volumes/MythOSXbuild
 /.osx-packager/src/qt-mac-free-3.3.5/include
 -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers
 -I/System/Library/Frameworks/AGL.framework/Versions/A/Headers -o
 mainserver.o mainserver.cpp
 In file included from mainserver.h:17,
                  from mainserver.cpp:41:
 filetransfer.h:19: warning: `class FileTransfer' only defines a private
    destructor and has no friends
 mainserver.cpp: In member function `void
    MainServer::FillStatusXML(QDomDocument*)':
 mainserver.cpp:3998: error: call of overloaded `abs(long long int)' is
    ambiguous
 /usr/include/stdlib.h:126: error: candidates are: int abs(int)
 /usr/include/gcc/darwin/3.3/c++/cmath:95: error:                 long
 double
    std::abs(long double)
 /usr/include/gcc/darwin/3.3/c++/cmath:91: error:                 float
    std::abs(float)
 /usr/include/gcc/darwin/3.3/c++/cmath:87: error:                 double
    std::abs(double)
 /usr/include/gcc/darwin/3.3/c++/cstdlib:119: error:                 long
 int
    std::abs(long int)
 make[2]: *** [mainserver.o] Error 1}}}

-- 
Ticket URL: <http://cvs.mythtv.org/trac/ticket/1885>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list