• 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 Errors compiling 0.4 on linux.

Status
Not open for further replies.

dominique120

Science & Reason
Senator
Premium User
Joined
Jun 16, 2013
Messages
3,881
Solutions
3
Reaction score
1,043
Location
Númenor
I used Stians tutorial but I get the following errors:

Code:
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 1 cores, using 2 processes
make  all-am
make[1]: Entering directory `/home/dv/AeiaOTS/src'
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT actions.o -MD -MP -MF .deps/actions.Tpo -c -o actions.o actions.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT allocator.o -MD -MP -MF .deps/allocator.Tpo -c -o allocator.o allocator.cpp
mv -f .deps/allocator.Tpo .deps/allocator.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT baseevents.o -MD -MP -MF .deps/baseevents.Tpo -c -o baseevents.o baseevents.cpp
mv -f .deps/baseevents.Tpo .deps/baseevents.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT beds.o -MD -MP -MF .deps/beds.Tpo -c -o beds.o beds.cpp
mv -f .deps/actions.Tpo .deps/actions.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT chat.o -MD -MP -MF .deps/chat.Tpo -c -o chat.o chat.cpp
mv -f .deps/beds.Tpo .deps/beds.Po
chat.cpp: In member function ‘ChatChannel* Chat::getChannel(Player*, uint16_t)’:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’ [-Werror=conversion-null]
cc1plus: all warnings being treated as errors
make[1]: *** [chat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/dv/AeiaOTS/src'
make: *** [all] Error 2

I know this source works fine because I compiled it for windows with no errors what so ever.

I'm on debian 7 x64, I hope that is not the cause.
 
can't you just edit this line?
Code:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’
in chat.cpp and the compiler can't convert false to pointer *
 
can't you just edit this line?
Code:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’
in chat.cpp and the compiler can't convert false to pointer *

Works fine in windows so I dont know why its complaining about. And when I set it up with Travis CI I did not get this error.
 
Code:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’ [-Werror=conversion-null]
Just open file chat.cpp and change return false to return NULL in specified line.
 
Code:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’ [-Werror=conversion-null]
Just open file chat.cpp and change return false to return NULL in specified line.

It worked fine in windows. Could it bee that this is 3884 and for linux its recommended to use 3777? And what about the other stuff?

Thanks.
 
It worked fine in windows. Could it bee that this is 3884 and for linux its recommended to use 3777? And what about the other stuff?

Thanks.
That error is here because you compile on linux with option -Wall
----------------

g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT chat.o -MD -MP -MF .deps/chat.Tpo -c -o chat.o chat.cpp
----------------
so it blocks compilation after any 'warning' (without -Wall it blocks only on 'error')

Better fix your code, so it will compile on linux and windows.. or find line in which 'makefile' enables '-Wall' and remove it.
 
That error is here because you compile on linux with option -Wall
----------------

g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT chat.o -MD -MP -MF .deps/chat.Tpo -c -o chat.o chat.cpp
----------------
so it blocks compilation after any 'warning' (without -Wall it blocks only on 'error')

Better fix your code, so it will compile on linux and windows.. or find line in which 'makefile' enables '-Wall' and remove it.

In my makefile.am I have this line:
Code:
$(OPTIONAL_FLAGS) -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter

The code compiles fine in windows but I'm going to try that chat thing sn3ejk mentioned.
 
Last edited:
Looks like the problem is indeed in the chat because I get this after removing -Wall:

Code:
root@dhcppc8:/home/dv/AeiaOTS/src# sh build.sh
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 1 cores, using 2 processes
make  all-am
make[1]: Entering directory `/home/dv/AeiaOTS/src'
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT chat.o -MD -MP -MF .deps/chat.Tpo -c -o chat.o chat.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT combat.o -MD -MP -MF .deps/combat.Tpo -c -o combat.o combat.cpp
chat.cpp: In member function ‘ChatChannel* Chat::getChannel(Player*, uint16_t)’:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’ [-Werror=conversion-null]
cc1plus: all warnings being treated as errors
make[1]: *** [chat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/combat.Tpo .deps/combat.Po
make[1]: Leaving directory `/home/dv/AeiaOTS/src'
make: *** [all] Error 2
 
I tried an unedited 3777 but I still get errors.
Code:
root@dhcppc8:/home/dv/trunk.r3777# sh build.sh
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 1 cores, using 2 processes
cd . && /bin/bash /home/dv/trunk.r3777/missing automake-1.14 --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/dv/trunk.r3777'
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wextra -Werror -Wno-strict-aliasing -pipe -MT chat.o -MD -MP -MF .deps/chat.Tpo -c -o chat.o chat.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1  -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wextra -Werror -Wno-strict-aliasing -pipe -MT combat.o -MD -MP -MF .deps/combat.Tpo -c -o combat.o combat.cpp
chat.cpp: In member function ‘ChatChannel* Chat::getChannel(Player*, uint16_t)’:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’ [-Werror=conversion-null]
cc1plus: all warnings being treated as errors
make[1]: *** [chat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/combat.Tpo .deps/combat.Po
make[1]: Leaving directory `/home/dv/trunk.r3777'
make: *** [all] Error 2
 
Code:
chat.cpp:1144:10: error: converting ‘false’ to pointer type ‘ChatChannel*’ [-Werror=conversion-null]
Just open file chat.cpp and change return false to return NULL in specified line.

Still fails.
 
@Gesior.pl @sn3ejk I fixed most of the errors by getting a whole new rev(a 3777 "fixed bugs") But I get this now:

Code:
make[1]: Entering directory `/home/dv/sources'
  CXX      luascript.o
  CXX      manager.o
In file included from /usr/include/boost/filesystem.hpp:15:0,
                from luascript.cpp:21:
/usr/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
luascript.cpp: In member function ‘bool LuaInterface::loadDirectory(const string&, Npc*, bool)’:
luascript.cpp:742:23: error: ‘class boost::filesystem::directory_entry’ has no member named ‘leaf’
luascript.cpp:745:61: error: no match for ‘operator+’ in ‘boost::filesystem::path::filename() const() + "/"’
make[1]: *** [luascript.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/dv/sources'
make: *** [all] Error 2
 
@Gesior.pl @sn3ejk I fixed most of the errors by getting a whole new rev(a 3777 "fixed bugs") But I get this now:

Code:
make[1]: Entering directory `/home/dv/sources'
  CXX      luascript.o
  CXX      manager.o
In file included from /usr/include/boost/filesystem.hpp:15:0,
                from luascript.cpp:21:
/usr/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
luascript.cpp: In member function ‘bool LuaInterface::loadDirectory(const string&, Npc*, bool)’:
luascript.cpp:742:23: error: ‘class boost::filesystem::directory_entry’ has no member named ‘leaf’
luascript.cpp:745:61: error: no match for ‘operator+’ in ‘boost::filesystem::path::filename() const() + "/"’
make[1]: *** [luascript.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/dv/sources'
make: *** [all] Error 2
In luascript.cpp (and other files that show error " ... has no member named ‘leaf’ ")
Find:
leaf()
Replace with:
path().filename().string()
 
In luascript.cpp (and other files that show error " ... has no member named ‘leaf’ ")
Find:
leaf()
Replace with:
path().filename().string()

Alright, this works. But in map.cpp I get this.

Code:
In file included from /usr/include/boost/filesystem.hpp:15:0,
[LIST=1]
                 from luascript.cpp:21:
/usr/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
luascript.cpp: In member function ‘bool LuaInterface::loadDirectory(const string&, Npc*, bool)’:
luascript.cpp:745:61: error: no match for ‘operator+’ in ‘boost::filesystem::path::filename() const() + "/"’
make[1]: *** [luascript.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/dv/src.DEB'
make: *** [all] Error 2
[/LIST]
 
Status
Not open for further replies.
Back
Top