Compile error

Directory revision: 2322 (of 2322)

What’s the name and version of your distribution ?

Ubuntu 10.04 Lucid Lynx

I have 10.04.3.
I fixed the 1st error, but I don’t see the second.
What’s the version of boost in /usr/include/boost/version.hpp ?
And what’s the exact error you’re seeing ?

#define BOOST_VERSION 104000
#define BOOST_LIB_VERSION “1_40”

moreover ill try to install ubuntu 10.4.3

installed Ubuntu 10.4.3
and installed Directory revision: 2327 (of 2327)
sh configure
make
make check
sudo make install
no error… on this part

openSUSE 12.2 x86_64
g++: error: @BOOST_IOSTREAMS_LIB@: No such file or directory

ilya@ILYA:/tmp/vcmi> ./configure --prefix=/usr --libdir=/usr/lib64 CFLAGS="-march=native -msse3 -O3 -fomit-frame-pointer -pipe" CXXFLAGS="-march=native -msse3 -O3 -fomit-frame-pointer -pipe"
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for C++ compiler vendor... gnu
checking whether make supports nested variables... yes
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system-mt... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem-mt... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread-mt... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options-mt... yes
checking for shm_open in -lrt... yes
checking for dlopen in -ldl... yes
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking SDL/SDL.h usability... yes
checking SDL/SDL.h presence... yes
checking for SDL/SDL.h... yes
checking SDL/SDL_mixer.h usability... yes
checking SDL/SDL_mixer.h presence... yes
checking for SDL/SDL_mixer.h... yes
checking SDL/SDL_image.h usability... yes
checking SDL/SDL_image.h presence... yes
checking for SDL/SDL_image.h... yes
checking SDL/SDL_ttf.h usability... yes
checking SDL/SDL_ttf.h presence... yes
checking for SDL/SDL_ttf.h... yes
checking for SDL_Init in -lSDL... yes
checking for main in -lSDL_mixer... yes
checking for IMG_Load in -lSDL_image... yes
checking for main in -lSDL_ttf... yes
checking for av_register_all in -lavformat... yes
checking for sws_getContext in -lswscale... yes
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking boost/filesystem.hpp usability... yes
checking boost/filesystem.hpp presence... yes
checking for boost/filesystem.hpp... yes
checking boost/algorithm/string.hpp usability... yes
checking boost/algorithm/string.hpp presence... yes
checking for boost/algorithm/string.hpp... yes
checking boost/algorithm/string/replace.hpp usability... yes
checking boost/algorithm/string/replace.hpp presence... yes
checking for boost/algorithm/string/replace.hpp... yes
checking boost/filesystem/operations.hpp usability... yes
checking boost/filesystem/operations.hpp presence... yes
checking for boost/filesystem/operations.hpp... yes
checking boost/assign/std/vector.hpp usability... yes
checking boost/assign/std/vector.hpp presence... yes
checking for boost/assign/std/vector.hpp... yes
checking boost/algorithm/string/find.hpp usability... yes
checking boost/algorithm/string/find.hpp presence... yes
checking for boost/algorithm/string/find.hpp... yes
checking boost/function.hpp usability... yes
checking boost/function.hpp presence... yes
checking for boost/function.hpp... yes
checking boost/bind.hpp usability... yes
checking boost/bind.hpp presence... yes
checking for boost/bind.hpp... yes
checking for atexit... yes
checking for memset... yes
checking for pow... yes
checking for select... yes
checking for sqrt... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating client/Makefile
config.status: creating server/Makefile
config.status: creating AI/FuzzyLite/Makefile
config.status: creating AI/Makefile
config.status: creating AI/StupidAI/Makefile
config.status: creating AI/BattleAI/Makefile
config.status: creating AI/EmptyAI/Makefile
config.status: creating AI/VCAI/Makefile
config.status: creating Scripting/ERM/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make
Making all in lib
make[1]: Вход в каталог `/tmp/vcmi/lib'
g++ -DPACKAGE_NAME=\"vcmi\" -DPACKAGE_TARNAME=\"vcmi\" -DPACKAGE_VERSION=\"0.90\" -DPACKAGE_STRING=\"vcmi\ 0.90\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vcmi\" -DVERSION=\"0.90\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_PROGRAM_OPTIONS=/\*\*/ -DHAVE_LIBRT=1 -DHAVE_LIBDL=1 -DHAVE_SDL_SDL_H=1 -DHAVE_SDL_SDL_MIXER_H=1 -DHAVE_SDL_SDL_IMAGE_H=1 -DHAVE_SDL_SDL_TTF_H=1 -DHAVE_LIBSDL=1 -DHAVE_LIBSDL_MIXER=1 -DHAVE_LIBSDL_IMAGE=1 -DHAVE_LIBSDL_TTF=1 -DHAVE_LIBAVFORMAT=1 -DHAVE_LIBSWSCALE=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_BOOST_FILESYSTEM_HPP=1 -DHAVE_BOOST_ALGORITHM_STRING_HPP=1 -DHAVE_BOOST_ALGORITHM_STRING_REPLACE_HPP=1 -DHAVE_BOOST_FILESYSTEM_OPERATIONS_HPP=1 -DHAVE_BOOST_ASSIGN_STD_VECTOR_HPP=1 -DHAVE_BOOST_ALGORITHM_STRING_FIND_HPP=1 -DHAVE_BOOST_FUNCTION_HPP=1 -DHAVE_BOOST_BIND_HPP=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SELECT=1 -DHAVE_SQRT=1 -I.   -pthread -I/usr/include  -march=native -msse3 -O3 -fomit-frame-pointer -pipe -O0 -ggdb -std=c++0x -Wall -Wextra -Wcast-align -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter -DM_DATA_DIR=\"/usr/share/vcmi\" -DM_BIN_DIR=\"/usr/bin\" -DM_LIB_DIR=\"/usr/lib64/vcmi\" -DVCMI_DLL -fPIC -c StdInc.h
StdInc.h:1:9: warning: #pragma once in main file [enabled by default]
make  all-am
make[2]: Вход в каталог `/tmp/vcmi/lib'
  CXX    libvcmi_la-CBinaryReader.lo
  CXX    libvcmi_la-CCompressedStream.lo
  CXX    libvcmi_la-CFileInfo.lo
  CXX    libvcmi_la-CFileInputStream.lo
  CXX    libvcmi_la-CFilesystemLoader.lo
  CXX    libvcmi_la-CLodArchiveLoader.lo
  CXX    libvcmi_la-CMemoryStream.lo
  CXX    libvcmi_la-CResourceLoader.lo
  CXX    libvcmi_la-BattleAction.lo
  CXX    libvcmi_la-BattleState.lo
  CXX    libvcmi_la-CArtHandler.lo
  CXX    libvcmi_la-CBattleCallback.lo
  CXX    libvcmi_la-CBuildingHandler.lo
  CXX    libvcmi_la-CCampaignHandler.lo
  CXX    libvcmi_la-CConfigHandler.lo
  CXX    libvcmi_la-CConsoleHandler.lo
  CXX    libvcmi_la-CCreatureHandler.lo
  CXX    libvcmi_la-CCreatureSet.lo
  CXX    libvcmi_la-CDefObjInfoHandler.lo
  CXX    libvcmi_la-CGameInterface.lo
  CXX    libvcmi_la-CGameState.lo
  CXX    libvcmi_la-CGeneralTextHandler.lo
  CXX    libvcmi_la-CHeroHandler.lo
  CXX    libvcmi_la-CLogger.lo
  CXX    libvcmi_la-CMapInfo.lo
  CXX    libvcmi_la-CModHandler.lo
  CXX    libvcmi_la-CObjectHandler.lo
  CXX    libvcmi_la-CObstacleInstance.lo
  CXX    libvcmi_la-CSpellHandler.lo
  CXX    libvcmi_la-CTownHandler.lo
  CXX    libvcmi_la-CThreadHelper.lo
  CXX    libvcmi_la-Connection.lo
  CXX    libvcmi_la-HeroBonus.lo
  CXX    libvcmi_la-IGameCallback.lo
  CXX    libvcmi_la-JsonNode.lo
  CXX    libvcmi_la-NetPacksLib.lo
  CXX    libvcmi_la-ResourceSet.lo
  CXX    libvcmi_la-BattleHex.lo
  CXX    libvcmi_la-VCMI_Lib.lo
  CXX    libvcmi_la-map.lo
  CXXLD  libvcmi.la
g++: error: @BOOST_IOSTREAMS_LIB@: No such file or directory
make[2]: *** [libvcmi.la] Ошибка 1
make[2]: Выход из каталога `/tmp/vcmi/lib'
make[1]: *** [all] Ошибка 2
make[1]: Выход из каталога `/tmp/vcmi/lib'
make: *** [all-recursive] Ошибка 1
zypper se -i iostreams
С | Имя                            | Заключение                                     | Тип  
--+--------------------------------+------------------------------------------------+------
i | libboost_iostreams1_49_0       | Библиотеки времени выполнения Boost::IOStreams | пакет
zypper if libboost_iostreams1_49_0
Сведения — пакет libboost_iostreams1_49_0:

Репозиторий: Oss
Имя: libboost_iostreams1_49_0
Версия: 1.49.0-6.1.2
Архитектура: x86_64
Производитель: openSUSE
Установлен: Да
Состояние: актуален
Размер после установки: 103,3 KiB
Сводка: Библиотеки времени выполнения Boost::IOStreams
Описание: 
This package contains the Boost::IOStreams Runtime libraries.

Some remains of recently removed iostreams?

Try running “autoreconf” before ./configure
OR use CMake instead

svn co https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk /tmp/vcmi && cd /tmp/vcmi && cmake -LA -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE:STRING="-march=native -msse3 -O3 -fomit-frame-pointer -pipe -DNDEBUG" -DCMAKE_INSTALL_PREFIX=/usr && make -j4 && sudo make install && .. && rm -rf vcmi

Now compile is fine, but problem with run. After compilation and instalation I’am download this file wog.zip and unziping in /usr/share/vcmi.
After I’am installing throw wine SoD, after updating to WoG. All files from WoG coping to /usr/share/vcmi
and launch vcmiclient


1 No music, but Mp3 in /usr/share/vcmi/Mp3 is set.
2 When i launch Game New Game -> Compign -> WoG/RoE/AB -> Start
Client is droped :frowning:

  1. Probably SDL_Mixer was compiled without MP3 support.
    Check last paragraph in “preparing data” section here: wiki.vcmi.eu/index.php?title=Ins … n_on_Linux

  2. I remember such behavior when port used by VCMI (3030) was blocked.
    vcmiserver should be able to connect to this port.

If this won’t fix the problem - upload sever logs from ~/.vcmi directory.

Yes it’s. OpenSUSE as and Fedora not played mp3 throw SDL, and when convert by SoundKonverter in ogg quality 4 music playing good.
But can do anything with the video to play sound?

Yes it’s. EiskaltDC++ using 3030-3032 TCP port by default.
But nowhere in the documentation on installing and running were not told that the client uses TCP port 3030, and even more so when you start and drop the client does not say that he is trying to connect to TCP port 3030.
As for me - it’s wrong.

vcmi_logs.7z
Despite the fact that the music came the game starts, the problem still remained.
1 Don’t played music in video on startup. (3DO,WoG)
2 If set resolution better as 800600 (for exemple 12801024) game crashed when i want begin game (New Game -> Campagn -> Start), and for a minute crush, when i changed resolution durring game.
3 Even if the resolution 800*600 vcmi_client crush in different places in game.(For exemple stable crash when i’am level up and truing take “Wisdom”, click and crush).
Konsole log is too large and i take it in archive vcmi_logs.7z as Konsole_log.txt, but last messege when crush when take Wisdom is

Player 0 ends turn
Player 0 ended turn
System message: Game has been saved as Saves/Autosave_1
Error: Failed to find file CommWin2.pcx
Connection has been requested to be closed.
Sent closing signal to the server
Segmentation Fault

I’am nowhere can’t find file CommWin2.pcx, but truing other difrent versions of game.
If the problem is caused by the fact that I do not use the correct version of the game, then give me a link to download the correct version.
4 Russian version of the game contains unreadable text in some places, although most readable text.
http://i39.fastpic.ru/big/2012/1007/1e/3c4217339d00a1456e04cbed3fcec41e.png
http://i25.fastpic.ru/big/2012/1007/a3/9ae25b8cc4f5ae0afec8fafcd8c175a3.png

  1. dl.dropbox.com/u/22372764/vcmi/mods/core.zip
    Package with some graphics used by VCMI, including CommWin2

  2. dl.dropbox.com/u/22372764/vcmi/ … %20WoG.zip
    Russian localization for WoG
    Problem on your screenshot comes from English-only fonts in WoG package

Both should be unpacked into /usr/share/vcmi (or similar).

  • 3030 port should be noted somewhere, I agree.
  • no sound in videos - bug in VCMI.

Client does print the list of found endpoints that includes the port number… if setting up the server succeeds. I’ll correct this.

The port used can be changes by editing settings.txt — just add in the “server” section the following line:

		"port" : 3039

Just checked and it apparently still works. :slight_smile:
I guess this should be documented alongside with the default port number.

Thank you for this files, problems with high resolution, russian localisation and crush on level up is missed.
But a new problem when I try to attack any unit, the client crashed with diferent messeges.

Trying connection to 127.0.0.1:3030  (0)
Established connection with VCMI 0.9 (server)
Server opened savegame properly.
Sent info to server: 0
Opening VCAI
Loaded VCAI
Opening StupidAI
Loaded Stupid AI 0.1
CStupidAI [0x7f1ef0f8a730]: created
CStupidAI [0x7f1ef0f8a730]: init called, saving ptr to IBattleCallback
ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
terminate called after throwing an instance of 'std::out_of_range'
  what():  array::at
sh: line 1: 19021 Аварийный останов         /usr/bin/vcmiserver 3030 > /home/.vcmi/server_log.txt
Error: server failed to close correctly or crashed!
Lost connection to server, ending listening thread!
read: End of file
Something wrong, lost connection while game is still ongoing...
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  read: End of file

Аварийный останов

Player 0 ends turn
Player 0 ended turn
System message: Game has been saved as Saves/Autosave_3
Warning: empty path found...
Warning: empty path found...
System message: Game has been saved as Saves/ILYA
terminate called after throwing an instance of 'std::out_of_range'
  what():  array::at
sh: line 1: 19291 Аварийный останов         /usr/bin/vcmiserver 3030 > /home/.vcmi/server_log.txt
Error: server failed to close correctly or crashed!
Lost connection to server, ending listening thread!
read: End of file
Something wrong, lost connection while game is still ongoing...
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  read: End of file

Аварийный останов

File is settings.json actually :slight_smile:
On Linux you can find it into ~/.vcmi/config/ directory

Yeah but I’m not sure that everyone would read that documentation…
Right now in case of error server will correctly quit (returns 0). And as result client prints “Server shut down correctly” :slight_smile:
Some error message should be more easy to notice.

Ok port successfully changed in ~/.vcmi/settings.json

{
	"adventure" : {
		"heroSpeed" : 8,
		"scrollSpeed" : 2
	},
	"battle" : {
	},
	"general" : {
		"music" : 99,
		"sound" : 99
	},
	"server" : {
		"port" : 3039
	},
	"video" : {
		"fullscreen" : true,
		"screenRes" : {
			"height" : 1024,
			"width" : 1280
		}
	}
}

Argh. Crashes on server are hard to debug.

Can you upload your save? May not be reproducible but this is easier than debugging via forums…

Ok
save
logs
I can host open port 3039 and run at the server (although I do not know how) if it helps debugging process.

When i running vcmiclient, using this port 3039.
But when i runing vcmiserver usin default port

Listening for connections at port 3030

How changing this port?

I running server

ilya@ILYA:~/.vcmi> vcmiserver 
         Initialization: 0
         Data loading: 70
                Found mod filesystem: ALL/MODS/VCMI/FILESYSTEM
                Found mod filesystem: ALL/MODS/WOG/FILESYSTEM
                Found mod filesystem: ALL/MODS/X WOG RUS/FILESYSTEM
         Mod filesystems: 30
File system handler: 100
Port 3030 will be used.
        Mod handler: 0
        General text handler: 10
        Hero handler: 0
        Artifact handler: 10
        Creature handler: 30
        Town handler: 10
        Object handler: 10
        Def information handler: 20
        Spell handler: 10
CVCMIServer created!
Listening for connections at port 3030

I’am ping this server go on site canyouseeme.org and print 3030 and push "check me port"
write Success: I can see your service on 178.150.103.191 on port (3030)
, but server crushed this ping.

We've accepted someone... 
read: End of file