PDA

View Full Version : svn Compiler Error


vobie
2008-08-14, 22:30
Compiler Error svn 14924

ILE_OFFSET_BITS=64 -DHAS_XRANDR -DHAS_PCRE -DHAL_HANDLEMOUNT -D'SVN_REV="14924M"' -DINSTALL_PATH="\"/usr/share/xbmc\"" -I. -I../../ -I../../linux -I../../../guilib -I../../utils XBMChttp.cpp -o XBMChttp.o
In file included from ../../Util.h:25,
from XBMChttp.cpp:20:
/usr/include/c++/4.3/limits:287:22: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:289:22: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:317:23: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:319:23: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:371:23: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:373:23: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:422:30: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:424:30: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:473:32: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:475:32: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:524:26: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:526:26: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:575:24: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:577:24: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:626:33: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:628:33: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:677:22: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:679:22: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:728:31: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:730:31: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:779:23: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:781:23: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:830:32: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:832:32: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:881:28: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:883:28: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:932:37: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:934:37: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:983:24: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:985:24: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:1040:25: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:1042:25: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:1097:30: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.3/limits:1099:30: error: macro "max" requires 2 arguments, but only 1 given
In file included from ../../Util.h:25,
from XBMChttp.cpp:20:
/usr/include/c++/4.3/limits:287: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:289: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:289: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:292: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:317: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:319: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:319: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:322: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:371: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:373: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:373: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:376: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:422: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:424: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:424: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:427: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:473: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:475: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:475: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:478: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:524: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:526: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:526: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:529: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:575: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:577: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:577: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:580: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:626: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:628: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:628: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:631: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:677: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:679: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:679: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:682: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:728: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:730: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:730: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:733: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:779: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:781: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:781: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:784: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:830: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:832: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:832: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:835: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:881: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:883: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:883: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:886: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:932: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:934: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:934: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:937: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:983: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:985: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:985: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:988: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:1040: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:1042: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:1042: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:1045: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:1097: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:1099: error: expected `;' before ‘static’
/usr/include/c++/4.3/limits:1099: error: expected ‘;’ before ‘throw’
/usr/include/c++/4.3/limits:1102: error: expected `;' before ‘static’
make[2]: *** [XBMChttp.o] Fehler 1
make[2]: Leaving directory `/XBMC/xbmc/lib/libGoAhead'

Debian Lenny
Compiler Error with gcc / g++ 4.1 or 4.3 :no:

vobie

tslayer
2008-08-14, 23:00
Can you try without the include <limits> in Util.h?

MPauley73
2008-08-14, 23:11
I just compiled 14925 with no errors.

tslayer
2008-08-14, 23:12
MPauley73, you are on Debian as well?

Ubuntu compiles no problem... That we know :)

Zeqad1ous
2008-08-15, 03:02
With both Atlantis latest SVN and regular SVN, removing the line:
#include <limits>
from xbmc/Util.h (line 25)
after having the above posted problem results in the following compile error:

g++ -MD -c -g -D_DEBUG -Wall -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal -I/usr/include/lzo -D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAS_SDL_JOYSTICK -DHAS_XRANDR -DHAS_PCRE -DHAL_HANDLEMOUNT -D'SVN_REV="14925"' -DINSTALL_PATH="\"/usr/share/xbmc\"" -I. -Icommon -I../xbmc -I../xbmc/cores -I../xbmc/linux -I../xbmc/utils -I/usr/include/freetype2 -I/usr/include/SDL GUIAudioManager.cpp -o GUIAudioManager.o
In file included from GUIAudioManager.cpp:30:
../xbmc/Util.h: In function ‘int MathUtils::round_int(double)’:
../xbmc/Util.h:72: error: ‘numeric_limits’ is not a member of ‘std’
../xbmc/Util.h:72: error: expected primary-expression before ‘double’
../xbmc/Util.h:72: error: expected `)' before ‘double’
../xbmc/Util.h:74: error: ‘numeric_limits’ is not a member of ‘std’
../xbmc/Util.h:74: error: expected primary-expression before ‘double’
../xbmc/Util.h:74: error: expected `)' before ‘double’
../xbmc/Util.h: In function ‘int MathUtils::ceil_int(double)’:
../xbmc/Util.h:108: error: ‘numeric_limits’ is not a member of ‘std’
../xbmc/Util.h:108: error: expected primary-expression before ‘double’
../xbmc/Util.h:108: error: expected `)' before ‘double’
../xbmc/Util.h:110: error: ‘numeric_limits’ is not a member of ‘std’
../xbmc/Util.h:110: error: expected primary-expression before ‘double’
../xbmc/Util.h:110: error: expected `)' before ‘double’
../xbmc/Util.h: In function ‘int MathUtils::truncate_int(double)’:
../xbmc/Util.h:146: error: ‘numeric_limits’ is not a member of ‘std’
../xbmc/Util.h:146: error: expected primary-expression before ‘double’
../xbmc/Util.h:146: error: expected `)' before ‘double’
../xbmc/Util.h:148: error: ‘numeric_limits’ is not a member of ‘std’
../xbmc/Util.h:148: error: expected primary-expression before ‘double’
../xbmc/Util.h:148: error: expected `)' before ‘double’
make[1]: *** [GUIAudioManager.o] Error 1
make[1]: Leaving directory `/var/abs/local/xbmc-svn/src/XBMC/guilib'
make: *** [guilib] Error 2

Zeq

tslayer
2008-08-15, 03:09
And are you on Debian as well?

Zeqad1ous
2008-08-15, 03:18
I am on Arch Linux.

Zeq

spiff
2008-08-15, 03:24
iow; an unsupported distro - you're on your own. tell IF you figure how to make it compile NOT if you dont

jmarshall
2008-08-15, 03:52
You need <limits> so don't remove that.

The problem that <limits> is having is due to min/max being #define'd in some place. On win32 there's a NOMINMAX precompiler define that kills this behaviour off. I don't think we define them anywhere in XBMC (other than the top of GUIFontTTF.cpp, which shouldn't be affecting you - feel free to remove them and replace with std::min/max throughout though) but that would be a good place to start looking.

Good luck.

xmltok
2008-08-15, 03:53
I have the same problem on debian. FWIW if you go back to r13964 of Util.h it will get past that step :)

althekiller
2008-08-15, 07:47
Anyone using gcc 4.3 is going to probably need to added headers. The newer version of GCC is more pedantic about including and very few devs have an environment available. Also, min and max are macroed in GUIFontTTF.cpp.

Zeqad1ous
2008-08-15, 17:06
I have the same problem on debian. FWIW if you go back to r13964 of Util.h it will get past that step :)

Thanks xmltok, I was never able to fix the problem 'properly', but I was able to write a quick patch based on r13964 of Util.h to fix this problem for now. Thanks again!

Zeq

succo
2008-08-18, 01:34
today i ran into this same problem after an upgrade to intrepid

what i did to solve the problem was launch configure with CXX=/usr/bin/g++-4.2 and it solved all the errors
i guess that simply xbmc isn't gcc-4.3 compliant, someway :)