• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux Ubuntu 12.04.0-64 - ERROR COMPILATION

Natan Beckman

Well-Known Member
Joined
Aug 1, 2010
Messages
548
Reaction score
52
Location
Teresina-PI/Br
View error:

root@tibiamax:/home/3926# make
make all-am
make[1]: Entering directory `/home/3926'
g++ -dhave_config_h -i. -i/usr/include/libxml2 -o2 -fomit-frame-pointer -d__use_mysql__ -d__war_system__ -d__alt_lua_path__ -d_thread_safe -d_reentrant -wall -wextra -werror -wno-strict-aliasing -pipe -mt game.o -md -mp -mf .deps/game.tpo -c -o game.o game.cpp
game.cpp: In constructor 'game::game()':
Game.cpp:80:22: Error: Array subscript is above array bounds [-werror=array-bounds]
game.h: In member function 'void game: :globalsave()':
Game.h:623:76: Error: Array subscript is above array bounds [-werror=array-bounds]
game.cpp: In member function 'void game:: prepareglobalsave()':
Game.cpp:6255:30: Error: Array subscript is above array bounds [-werror=array-bounds]
game.cpp:6257:22: Error: Array subscript is above array bounds [-werror=array-bounds]
cc1plus: All warnings being treated as errors
make[1]: *** [game.o] error 1
make[1]: Leaving directory `/home/3926'
make: *** [all] error 2
root@tibiamax:/home/3926#

solution?
Please

When compiled this source in Ubuntu 10 without problems.
Today compiled on windows and also no problems.
 
view:

root@tibiamax:/home/3926# make
cd . && /bin/bash /home/3926/missing --run automake-1.11 --foreign Makefile
cd . && /bin/bash ./config.status Makefile depfiles
config.status: creating Makefile
config.status: executing depfiles commands
make all-am
make[1]: Entering directory `/home/3926'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT game.o -MD -MP -MF .deps/game.Tpo -c -o game.o game.cpp
game.cpp: In constructor 'Game::Game()':
game.cpp:80:22: warning: array subscript is above array bounds [-Warray-bounds]
game.h: In member function 'void Game::globalSave()':
game.h:623:76: warning: array subscript is above array bounds [-Warray-bounds]
game.cpp: In member function 'void Game:: prepareGlobalSave()':
game.cpp:6255:30: warning: array subscript is above array bounds [-Warray-bounds]
game.cpp:6257:22: warning: array subscript is above array bounds [-Warray-bounds]
mv -f .deps/game.Tpo .deps/game.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
luascript.cpp: In member function 'bool LuaInterface::loadDirectory(const string&, Npc*, bool)':
luascript.cpp:741:23: error: 'class boost::filesystem3::directory_entry' has no member named 'leaf'
luascript.cpp:744:61: error: no match for 'operator+' in 'boost::filesystem3:: path::filename() const() + "/"'
make[1]: *** [luascript.o] Error 1
make[1]: Leaving directory `/home/3926'
make: *** [all] Error 2
root@tibiamax:/home/3926#
 
I installed:

apt-get install libboost1.46-dev
apt-get install libboost-system1.46-dev
apt-get install libboost-filesystem1.46-dev
apt-get install libboost-date-time1.46-dev
apt-get install libboost-regex1.46-dev
apt-get install libboost-thread1.46-dev

Continue one error:

root@tibiamax:/home/3926# make
make all-am
make[1]: Entering directory `/home/3926'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
luascript.cpp: In member function 'bool LuaInterface::loadDirectory(const string&, Npc*, bool)':
luascript.cpp:741:23: error: 'class boost::filesystem3::directory_entry' has no member named 'leaf'
luascript.cpp:744:61: error: no match for 'operator+' in 'boost::filesystem3:: path::filename() const() + "/"'
make[1]: *** [luascript.o] Error 1
make[1]: Leaving directory `/home/3926'
make: *** [all] Error 2
root@tibiamax:/home/3926#

- - - Updated - - -

Utilizing command ./build.sh:

root@tibiamax:/home/3926# ./build.sh
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 24 cores, using 25 processes
make all-am
make[1]: Entering directory `/home/3926'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT monster.o -MD -MP -MF .deps/monster.Tpo -c -o monster.o monster.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT otserv.o -MD -MP -MF .deps/otserv.Tpo -c -o otserv.o otserv.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT scriptmanager.o -MD -MP -MF .deps/scriptmanager.Tpo -c -o scriptmanager.o scriptmanager.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ALT_LUA_PATH__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT vocation.o -MD -MP -MF .deps/vocation.Tpo -c -o vocation.o vocation.cpp
monster.cpp: In member function 'virtual void Monster::doAttacking(uint32_t)':
monster.cpp:626:26: warning: variable 'outOfRange' set but not used [-Wunused-but-set-variable]
otserv.cpp: In function 'void signalHandler(int32_t)':
otserv.cpp:188:8: error: 'SIGHUP' was not declared in this scope
otserv.cpp:193:8: error: 'SIGTRAP' was not declared in this scope
otserv.cpp:197:8: error: 'SIGCHLD' was not declared in this scope
otserv.cpp:201:8: error: 'SIGUSR1' was not declared in this scope
otserv.cpp:206:8: error: 'SIGUSR2' was not declared in this scope
otserv.cpp:210:8: error: 'SIGCONT' was not declared in this scope
otserv.cpp:215:8: error: 'SIGQUIT' was not declared in this scope
otserv.cpp:220:8: error: 'SIGTERM' was not declared in this scope
otserv.cpp: In function 'int main(int, char**)':
otserv.cpp:282:19: error: aggregate 'main(int, char**)::sigaction sigh' has incomplete type and cannot be defined
otserv.cpp:283:20: error: 'SIG_IGN' was not declared in this scope
otserv.cpp:286:27: error: 'sigemptyset' was not declared in this scope
otserv.cpp:287:12: error: 'SIGPIPE' was not declared in this scope
otserv.cpp:287:32: error: invalid use of incomplete type 'struct main(int, char**)::sigaction'
otserv.cpp:282:9: error: forward declaration of 'struct main(int, char**)::sigaction'
otserv.cpp:290:9: error: 'SIGHUP' was not declared in this scope
otserv.cpp:290:30: error: 'signal' was not declared in this scope
otserv.cpp:291:9: error: 'SIGTRAP' was not declared in this scope
otserv.cpp:292:9: error: 'SIGCHLD' was not declared in this scope
otserv.cpp:293:9: error: 'SIGUSR1' was not declared in this scope
otserv.cpp:294:9: error: 'SIGUSR2' was not declared in this scope
otserv.cpp:295:9: error: 'SIGCONT' was not declared in this scope
otserv.cpp:296:9: error: 'SIGQUIT' was not declared in this scope
otserv.cpp:297:9: error: 'SIGTERM' was not declared in this scope
scriptmanager.cpp: In member function 'bool ScriptManager::loadMods()':
scriptmanager.cpp:130:23: error: 'class boost::filesystem3::directory_entry' has no member named 'leaf'
luascript.cpp: In member function 'bool LuaInterface::loadDirectory(const string&, Npc*, bool)':
luascript.cpp:741:23: error: 'class boost::filesystem3::directory_entry' has no member named 'leaf'
luascript.cpp:744:61: error: no match for 'operator+' in 'boost::filesystem3::path::filename() const() + "/"'
mv -f .deps/vocation.Tpo .deps/vocation.Po
make[1]: *** [scriptmanager.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [otserv.o] Error 1
make[1]: *** [luascript.o] Error 1
mv -f .deps/monster.Tpo .deps/monster.Po
make[1]: Leaving directory `/home/3926'
make: *** [all] Error 2
root@tibiamax:/home/3926#
 
me too
[CPP]
root@********:/tfs3859# ./build.sh
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 2 cores, using 3 processes
make all-am
make[1]: Entrando no diretório `/tfs3859'
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT monster.o -MD -MP -MF .deps/monster.Tpo -c -o monster.o monster.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT otserv.o -MD -MP -MF .deps/otserv.Tpo -c -o otserv.o otserv.cpp
monster.cpp: Na função membro ‘virtual void Monster::doAttacking(uint32_t)’:
monster.cpp:626:26: erro: variable ‘outOfRange’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
make[1]: ** [monster.o] Erro 1
make[1]: ** Esperando que outros processos terminem.
otserv.cpp: Na função ‘void signalHandler(int32_t)’:
otserv.cpp:189:8: erro: ‘SIGHUP’ was not declared in this scope
otserv.cpp:194:8: erro: ‘SIGTRAP’ was not declared in this scope
otserv.cpp:198:8: erro: ‘SIGCHLD’ was not declared in this scope
otserv.cpp:202:8: erro: ‘SIGUSR1’ was not declared in this scope
otserv.cpp:207:8: erro: ‘SIGUSR2’ was not declared in this scope
otserv.cpp:211:8: erro: ‘SIGCONT’ was not declared in this scope
otserv.cpp:216:8: erro: ‘SIGQUIT’ was not declared in this scope
otserv.cpp:221:8: erro: ‘SIGTERM’ was not declared in this scope
otserv.cpp: Na função ‘int main(int, char**)’:
otserv.cpp:282:19: erro: aggregate ‘main(int, char**)::sigaction sigh’ has incomplete type and cannot be defined
otserv.cpp:283:20: erro: ‘SIG_IGN’ was not declared in this scope
otserv.cpp:286:27: erro: ‘sigemptyset’ was not declared in this scope
otserv.cpp:287:12: erro: ‘SIGPIPE’ was not declared in this scope
otserv.cpp:287:34: erro: invalid use of incomplete type ‘struct main(int, char**)::sigaction’
otserv.cpp:282:9: erro: forward declaration of ‘struct main(int, char**)::sigaction’
otserv.cpp:290:9: erro: ‘SIGHUP’ was not declared in this scope
otserv.cpp:290:30: erro: ‘signal’ was not declared in this scope
otserv.cpp:291:9: erro: ‘SIGTRAP’ was not declared in this scope
otserv.cpp:292:9: erro: ‘SIGCHLD’ was not declared in this scope
otserv.cpp:293:9: erro: ‘SIGUSR1’ was not declared in this scope
otserv.cpp:294:9: erro: ‘SIGUSR2’ was not declared in this scope
otserv.cpp:295:9: erro: ‘SIGCONT’ was not declared in this scope
otserv.cpp:296:9: erro: ‘SIGQUIT’ was not declared in this scope
otserv.cpp:297:9: erro: ‘SIGTERM’ was not declared in this scope
make[1]: ** [otserv.o] Erro 1
luascript.cpp: Na função membro ‘bool LuaInterface::loadDirectory(const string&, Npc*, bool)’:
luascript.cpp:741:23: erro: ‘class boost::filesystem3::directory_entry’ has no member named ‘leaf’
luascript.cpp:744:61: erro: no match for ‘operator+’ in ‘boost::filesystem3::path::filename() const() + "/"’
make[1]: ** [luascript.o] Erro 1
make[1]: Saindo do diretório `/tfs3859'
make: ** [all] Erro 2
[/CPP]
with make
[CPP]
root@********:/tfs3859# make
make all-am
make[1]: Entrando no diretório `/tfs3859'
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
luascript.cpp: Na função membro ‘bool LuaInterface::loadDirectory(const string&, Npc*, bool)’:
luascript.cpp:741:23: erro: ‘class boost::filesystem3::directory_entry’ has no member named ‘leaf’
luascript.cpp:744:61: erro: no match for ‘operator+’ in ‘boost::filesystem3::path::filename() const() + "/"’
make[1]: ** [luascript.o] Erro 1
make[1]: Saindo do diretório `/tfs3859'
make: ** [all] Erro 2
[/CPP]
 
Last edited:
Trying to compile 0.4(r3884) on ubuntu 12.04.
I removed -Werror from Makefile and Makefile.am, changed leaf() to path().filename(), inserted "#define BOOST_FILESYSTEM_VERSION 2" on definitions header, and put "#include <sys/signal.h>" before otsystem includes on otserv.cpp.

But still got this error, that I believe to be same as yours:

Code:
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2   -O2 -fomit-frame-pointer -D__USE_MYSQL__     -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT npc.o -MD -MP -MF .deps/npc.Tpo -c -o npc.o npc.cpp
mv -f .deps/monster.Tpo .deps/monster.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2   -O2 -fomit-frame-pointer -D__USE_MYSQL__     -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT otserv.o -MD -MP -MF .deps/otserv.Tpo -c -o otserv.o otserv.cpp
mv -f .deps/monsters.Tpo .deps/monsters.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2   -O2 -fomit-frame-pointer -D__USE_MYSQL__     -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT outfit.o -MD -MP -MF .deps/outfit.Tpo -c -o outfit.o outfit.cpp
mv -f .deps/luascript.Tpo .deps/luascript.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2   -O2 -fomit-frame-pointer -D__USE_MYSQL__     -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT outputmessage.o -MD -MP -MF .deps/outputmessage.Tpo -c -o outputmessage.o outputmessage.cpp
mv -f .deps/movement.Tpo .deps/movement.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2   -O2 -fomit-frame-pointer -D__USE_MYSQL__     -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT party.o -MD -MP -MF .deps/party.Tpo -c -o party.o party.cpp
otserv.cpp: In function ‘void signalHandler(int32_t)’:
otserv.cpp:189:8: error: ‘SIGHUP’ was not declared in this scope
otserv.cpp:194:8: error: ‘SIGTRAP’ was not declared in this scope
otserv.cpp:198:8: error: ‘SIGCHLD’ was not declared in this scope
otserv.cpp:202:8: error: ‘SIGUSR1’ was not declared in this scope
otserv.cpp:207:8: error: ‘SIGUSR2’ was not declared in this scope
otserv.cpp:211:8: error: ‘SIGCONT’ was not declared in this scope
otserv.cpp:216:8: error: ‘SIGQUIT’ was not declared in this scope
otserv.cpp:221:8: error: ‘SIGTERM’ was not declared in this scope
otserv.cpp: In function ‘int main(int, char**)’:
otserv.cpp:282:19: error: aggregate ‘main(int, char**)::sigaction sigh’ has incomplete type and cannot be defined
otserv.cpp:283:20: error: ‘SIG_IGN’ was not declared in this scope
otserv.cpp:286:27: error: ‘sigemptyset’ was not declared in this scope
otserv.cpp:287:12: error: ‘SIGPIPE’ was not declared in this scope
otserv.cpp:287:32: error: invalid use of incomplete type ‘struct main(int, char**)::sigaction’
otserv.cpp:282:9: error: forward declaration of ‘struct main(int, char**)::sigaction’
otserv.cpp:290:9: error: ‘SIGHUP’ was not declared in this scope
otserv.cpp:290:30: error: ‘signal’ was not declared in this scope
otserv.cpp:291:9: error: ‘SIGTRAP’ was not declared in this scope
otserv.cpp:292:9: error: ‘SIGCHLD’ was not declared in this scope
otserv.cpp:293:9: error: ‘SIGUSR1’ was not declared in this scope
otserv.cpp:294:9: error: ‘SIGUSR2’ was not declared in this scope
otserv.cpp:295:9: error: ‘SIGCONT’ was not declared in this scope
otserv.cpp:296:9: error: ‘SIGQUIT’ was not declared in this scope
otserv.cpp:297:9: error: ‘SIGTERM’ was not declared in this scope
make[1]: *** [otserv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/outputmessage.Tpo .deps/outputmessage.Po
mv -f .deps/outfit.Tpo .deps/outfit.Po
mv -f .deps/party.Tpo .deps/party.Po
mv -f .deps/npc.Tpo .deps/npc.Po
make[1]: Leaving directory `/home/vader/Downloads/trunk.r3884'
make: *** [all] Error 2

How do I fix this?
 
Back
Top