I broke it again

Forum where anything UOX3-related goes - including, but not limited to: newbie-support, ideas, general questions, comments, etc and-so-forth.
Post Reply
intodesi2
UOX3 Neophyte
Posts: 32
Joined: Wed Nov 19, 2008 9:45 am
Has thanked: 0
Been thanked: 0

I broke it again

Post by intodesi2 »

I rebuilt my Nix system, using ubuntu server 8.10

durring make, I get these errors off the back

Code: Select all

uox3@NixTestServer:~/projects/uox3/source$ make
if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKA                                                                         GE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"uox3\" -DVERSION=\"0.97\" -I                                                                         . -I.     -O2 -I./mozilla/js/src -MT ai.o -MD -MP -MF ".deps/ai.Tpo" -c -o ai.o                                                                          ai.cpp; \
        then mv -f ".deps/ai.Tpo" ".deps/ai.Po"; else rm -f ".deps/ai.Tpo"; exit                                                                          1; fi
In file included from Platform.h:150,
                 from Prerequisites.h:9,
                 from uox3.h:29,
                 from ai.cpp:18:
uoxlinux.h: In function âvoid GetCurrentDirectory(size_t, char*)â:
uoxlinux.h:26: warning: ignoring return value of âchar* getcwd(char*, size_t)â,                                                                          declared with attribute warn_unused_result
In file included from regions.h:9,
                 from ai.cpp:21:
mapstuff.h: In constructor âUOX::CMulHandler::MultiItemsIndex_st::MultiItemsInde                                                                         x_st()â:
mapstuff.h:101: error: âSHRT_MAXâ was not declared in this scope
mapstuff.h:101: error: âSHRT_MINâ was not declared in this scope
mapstuff.h:102: error: âSCHAR_MAXâ was not declared in this scope
mapstuff.h:102: error: âSCHAR_MINâ was not declared in this scope
make: *** [ai.o] Error 1
uox3@NixTestServer:~/projects/uox3/source$
intodesi2
UOX3 Neophyte
Posts: 32
Joined: Wed Nov 19, 2008 9:45 am
Has thanked: 0
Been thanked: 0

Post by intodesi2 »

Any Idea's to whats happening with my compile?
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

SHRT_MIN, SHRT_MAX, SCHAR_MIN, and SCHAR_MAX are part of limits.h

I've never seen Linux compiles have an issue with these not being defined before, looks like something might have changed in Ubuntu 8.10

Try tossing an include <limits.h> in the top of that header, and see if it clears up the issue.
intodesi2
UOX3 Neophyte
Posts: 32
Joined: Wed Nov 19, 2008 9:45 am
Has thanked: 0
Been thanked: 0

Post by intodesi2 »

Your right giwo it is a problem with Ubuntu server 8.10 specificically gcc's includes.
intodesi2
UOX3 Neophyte
Posts: 32
Joined: Wed Nov 19, 2008 9:45 am
Has thanked: 0
Been thanked: 0

Post by intodesi2 »

this is the exact problem I beleive to be causing the issues

Your package fails to build with GCC 4.3. Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning. In GCC 4.3, the C++ header
dependencies have been cleaned up. The advantage of this is that
programs will compile faster. The downside is that you actually
need to directly #include everything you use (but you really should
do this anyway, otherwise your program won't work with any compiler
other than GCC). Some background of this can be found at
intodesi2
UOX3 Neophyte
Posts: 32
Joined: Wed Nov 19, 2008 9:45 am
Has thanked: 0
Been thanked: 0

Post by intodesi2 »

ok I think i fixed this..

adding

#include <cstring>

and

#include <cstdlib>

to the problematic *.cpp that there where errors in.
Post Reply