luisTJ / ghostplusplus

Automatically exported from code.google.com/p/ghostplusplus
Other
0 stars 0 forks source link

r567 Can't compile on Linux #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Root on Ubuntu 10.04 LTS (Lucid Lynx)
2. Download ghost from svn readonly
2. Apt-get GMP devs
3. Make BNCUtil
4. Apt-get libbz2 and zlib devs
5. Make Stormlib
6. Apt-get Mysql devs, and libboost devs (version 1.40 in distro)
7. Make Ghostplusplus.. error con bnet.cpp:

/opt/ghostplusplus/ghost# make
g++ -o bncsutilinterface.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ 
-I../StormLib/ -c bncsutilinterface.cpp
g++ -o bnet.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c 
bnet.cpp
bnet.cpp: In member function 'void 
CBNET::ProcessChatEvent(CIncomingChatEvent*)':
bnet.cpp:1666: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1667: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1677: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1679: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1695: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1777: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1778: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1788: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1790: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1806: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
make: *** [bnet.o] Error 1

As it says on the Readme, ghost requires libboost 1.39+, so i think it sould 
work.. right?.. strange thing.. 

My apt's where:
apt-get update
apt-get install build-essential
apt-get install libmpc-dev
apt-get install libbz2-dev zlib1g-dev
apt-get install libmysqlclient-dev libmysqld-dev libmysqld-pic
apt-get install libboost-dev libboost-system-dev libboost-filesystem-dev 
libboost-thread-dev libboost-date-time-dev libboost-regex-dev

Any help would be much appreciated!! thanks!

Original issue reported on code.google.com by daniel.a...@gmail.com on 30 Apr 2011 at 1:45

GoogleCodeExporter commented 9 years ago
Ok, i download, make and install last version of Boost (1.46.1).
Now it builds de bnet.cpp, so i guest the solve my problem..

Now i get to ghost++ final build and it says:

g++ -o ./ghost++ bncsutilinterface.o bnet.o bnetprotocol.o bnlsclient.o 
bnlsprotocol.o commandpacket.o config.o crc32.o csvparser.o game.o game_admin.o 
game_base.o gameplayer.o gameprotocol.o gameslot.o ghost.o ghostdb.o 
ghostdbmysql.o ghostdbsqlite.o gpsprotocol.o language.o map.o packed.o replay.o 
savegame.o sha1.o socket.o stats.o statsdota.o statsw3mmd.o util.o sqlite3.o 
-L. -L../bncsutil/src/bncsutil/ -L../StormLib/stormlib/ -lbncsutil -lpthread 
-ldl -lz -lStorm -lmysqlclient_r -lboost_date_time-mt -lboost_thread-mt 
-lboost_system-mt -lboost_filesystem-mt -lrt
/usr/bin/ld: cannot find -lboost_date_time-mt
collect2: ld returned 1 exit status
make: *** [ghost++] Error 1

So... maybe o forget something when building boost?..

Original comment by daniel.a...@gmail.com on 1 May 2011 at 2:18

GoogleCodeExporter commented 9 years ago
Well... i just modify the Makefile removing the '-mt' of all boost libraries, 
and it works!

So, this is just a "documentation issue", so if anyone has the same problem as 
me, here is the solution.. this should be closed, sorry if anyone has bothered..

Regards!

Original comment by daniel.a...@gmail.com on 1 May 2011 at 9:53

GoogleCodeExporter commented 9 years ago

Original comment by Absolute...@gmail.com on 14 Jun 2011 at 7:27

GoogleCodeExporter commented 9 years ago
Having still the problem:

g++ -o bnet.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c 
bnet.cpp
bnet.cpp: In member function 'void 
CBNET::ProcessChatEvent(CIncomingChatEvent*)':
bnet.cpp:1666: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1667: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1677: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1679: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1695: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1777: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1778: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1788: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1790: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
bnet.cpp:1806: error: 'struct std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >' has no member named 'string'
make: *** [bnet.o] Error 1

I also installed Boost 1.46.1 but i have still the problem. That s what i did.

1.Got the new svn ghost
2.Got the new Boost libary:
wget 
http://downloads.sourceforge.net/project/boost/boost/1.46.1/boost_1_46_1.tar.bz2
?r=&ts=1316903484&use_mirror=dfn
tar xjf boost_1_46_1.tar.bz2
cd boost_1_46_1.tar.bz2

 ./bootstrap.sh  --with-libraries=filesystem,program_options,system,regex,thread,date_time --libdir=/usr/lib/
 ./bjam
 ./bjam install

3. cd [...]ghost/bncsutil/src/bncsutil/
make
make install

cd [...]ghost/StormLib/stormlib/
make
make install

cd [...]ghost/ghost/
make

-> Problem, you see above
[...] means that i left there something

Things that may help to find a solution.

ls -l /usr/lib/libboost*.so
lrwxrwxrwx 1 root root 42 Aug 15 17:46 
/usr/lib/libboost_date_time-gcc44-mt-1_39.so -> 
libboost_date_time-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 42 Aug 15 17:46 /usr/lib/libboost_date_time-gcc44-mt.so 
-> libboost_date_time-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 28 Nov 12  2010 /usr/lib/libboost_date_time-mt.so -> 
libboost_date_time.so.1.42.0
lrwxrwxrwx 1 root root 28 Sep 25 02:01 /usr/lib/libboost_date_time.so -> 
libboost_date_time.so.1.46.1
lrwxrwxrwx 1 root root 43 Aug 15 17:46 
/usr/lib/libboost_filesystem-gcc44-mt-1_39.so -> 
libboost_filesystem-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 43 Aug 15 17:46 /usr/lib/libboost_filesystem-gcc44-mt.so 
-> libboost_filesystem-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 29 Nov 12  2010 /usr/lib/libboost_filesystem-mt.so -> 
libboost_filesystem.so.1.42.0
lrwxrwxrwx 1 root root 29 Sep 25 02:01 /usr/lib/libboost_filesystem.so -> 
libboost_filesystem.so.1.46.1
lrwxrwxrwx 1 root root 48 Aug 15 17:46 
/usr/lib/libboost_program_options-gcc44-mt-1_39.so -> 
libboost_program_options-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 48 Aug 15 17:46 
/usr/lib/libboost_program_options-gcc44-mt.so -> 
libboost_program_options-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 34 Sep 25 02:01 /usr/lib/libboost_program_options.so -> 
libboost_program_options.so.1.46.1
lrwxrwxrwx 1 root root 38 Aug 15 17:46 /usr/lib/libboost_regex-gcc44-mt-1_39.so 
-> libboost_regex-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 38 Aug 15 17:46 /usr/lib/libboost_regex-gcc44-mt.so -> 
libboost_regex-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 24 Nov 12  2010 /usr/lib/libboost_regex-mt.so -> 
libboost_regex.so.1.42.0
lrwxrwxrwx 1 root root 24 Sep 25 02:01 /usr/lib/libboost_regex.so -> 
libboost_regex.so.1.46.1
lrwxrwxrwx 1 root root 32 Nov 12  2010 /usr/lib/libboost_serialization-mt.so -> 
libboost_serialization.so.1.42.0
lrwxrwxrwx 1 root root 32 Nov 12  2010 /usr/lib/libboost_serialization.so -> 
libboost_serialization.so.1.42.0
lrwxrwxrwx 1 root root 39 Aug 15 17:46 
/usr/lib/libboost_system-gcc44-mt-1_39.so -> 
libboost_system-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 39 Aug 15 17:46 /usr/lib/libboost_system-gcc44-mt.so -> 
libboost_system-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 25 Nov 12  2010 /usr/lib/libboost_system-mt.so -> 
libboost_system.so.1.42.0
lrwxrwxrwx 1 root root 25 Sep 25 02:01 /usr/lib/libboost_system.so -> 
libboost_system.so.1.46.1
lrwxrwxrwx 1 root root 39 Aug 15 17:46 
/usr/lib/libboost_thread-gcc44-mt-1_39.so -> 
libboost_thread-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 39 Aug 15 17:46 /usr/lib/libboost_thread-gcc44-mt.so -> 
libboost_thread-gcc44-mt-1_39.so.1.39.0
lrwxrwxrwx 1 root root 25 Nov 12  2010 /usr/lib/libboost_thread-mt.so -> 
libboost_thread.so.1.42.0
lrwxrwxrwx 1 root root 25 Sep 25 02:01 /usr/lib/libboost_thread.so -> 
libboost_thread.so.1.46.1
lrwxrwxrwx 1 root root 33 Nov 12  2010 /usr/lib/libboost_wserialization-mt.so 
-> libboost_wserialization.so.1.42.0
lrwxrwxrwx 1 root root 33 Nov 12  2010 /usr/lib/libboost_wserialization.so -> 
libboost_wserialization.so.1.42.0

In the Makefile of ghost:

DFLAGS = -DGHOST_MYSQL
OFLAGS = -O3
LFLAGS = -L. -L../bncsutil/src/bncsutil/ -L../StormLib/stormlib/ -lbncsutil 
-lpthread -ldl -lz -lStorm -lmysqlclient_r -libboost_date_time -libboost_thread 
-libboost_system -libboost_filesystem
CFLAGS =

If you need some other details tell me :)

Would be very pleased about help :)

Original comment by Dragonof...@googlemail.com on 24 Sep 2011 at 10:38