Hi all!
I hope you may help me out on some issues I struggle with for some days. I’m using the SVN revision 1610, which builds fine on my Ubuntu machine. So I assume the code is somewhat okay, but while building in my Scratchbox with ARMEL target I got the following error:
In file included from ../CGameInterface.h:7,
from ../CGameInterface.cpp:2:
../client/FunctionList.h:122:24: warning: no newline at end of file
In file included from ../hch/CMusicHandler.h:6,
from ../CGameInterface.h:8,
from ../CGameInterface.cpp:2:
../hch/CSoundBase.h:1038:27: warning: no newline at end of file
g++ -DPACKAGE_NAME=\"vcmi\" -DPACKAGE_TARNAME=\"vcmi\" -DPACKAGE_VERSION=\"0.8\" -DPACKAGE_STRING=\"vcmi\ 0.8\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vcmi\" -DVERSION=\"0.8\" -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_IOSTREAMS=/\*\*/ -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 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -O0 -ggdb -Wall -Wcast-align -Wpointer-arith -DDATA_DIR=\"/usr/share/vcmi\" -DBIN_DIR=\"/usr/bin\" -DLIB_DIR=\"/usr/lib/vcmi\" -c -o vcmiclient-CThreadHelper.o `test -f '../CThreadHelper.cpp' || echo './'`../CThreadHelper.cpp
../CThreadHelper.cpp:46:2: warning: no newline at end of file
g++ -DPACKAGE_NAME=\"vcmi\" -DPACKAGE_TARNAME=\"vcmi\" -DPACKAGE_VERSION=\"0.8\" -DPACKAGE_STRING=\"vcmi\ 0.8\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vcmi\" -DVERSION=\"0.8\" -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_IOSTREAMS=/\*\*/ -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 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -O0 -ggdb -Wall -Wcast-align -Wpointer-arith -DDATA_DIR=\"/usr/share/vcmi\" -DBIN_DIR=\"/usr/bin\" -DLIB_DIR=\"/usr/lib/vcmi\" -c -o vcmiclient-CDefHandler.o `test -f '../hch/CDefHandler.cpp' || echo './'`../hch/CDefHandler.cpp
../hch/CDefHandler.cpp: In member function 'void CDefHandler::openFromMemory(unsigned char*, const std::string&)':
../hch/CDefHandler.cpp:55: warning: cast from 'unsigned char*' to 'SDefEntry*' increases required alignment of target type
../hch/CDefHandler.cpp:79: warning: cast from 'unsigned char*' to 'SDefEntryBlock*' increases required alignment of target type
../hch/CDefHandler.cpp:98: warning: cast from 'unsigned char*' to 'const Uint32*' increases required alignment of target type
../hch/CDefHandler.cpp: In member function 'SDL_Surface* CDefHandler::getSprite(int, const unsigned char*, const BMPPalette*) const':
../hch/CDefHandler.cpp:147: warning: cast from 'const unsigned char*' to 'const SSpriteDef*' increases required alignment of target type
../hch/CDefHandler.cpp:220: warning: cast from 'const unsigned char*' to 'const unsigned int*' increases required alignment of target type
../hch/CDefHandler.cpp:268: warning: cast from 'const unsigned char*' to 'const Uint16*' increases required alignment of target type
../hch/CDefHandler.cpp:312: warning: cast from 'const unsigned char*' to 'const Uint16*' increases required alignment of target type
../hch/CDefHandler.cpp: At global scope:
../hch/CDefHandler.cpp:18: warning: 'long long int pow(long long int, int)' defined but not used
g++ -DPACKAGE_NAME=\"vcmi\" -DPACKAGE_TARNAME=\"vcmi\" -DPACKAGE_VERSION=\"0.8\" -DPACKAGE_STRING=\"vcmi\ 0.8\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vcmi\" -DVERSION=\"0.8\" -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_IOSTREAMS=/\*\*/ -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 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -O0 -ggdb -Wall -Wcast-align -Wpointer-arith -DDATA_DIR=\"/usr/share/vcmi\" -DBIN_DIR=\"/usr/bin\" -DLIB_DIR=\"/usr/lib/vcmi\" -c -o vcmiclient-CMusicHandler.o `test -f '../hch/CMusicHandler.cpp' || echo './'`../hch/CMusicHandler.cpp
In file included from ../hch/CMusicHandler.h:6,
from ../hch/CMusicHandler.cpp:11:
../hch/CSoundBase.h:1038:27: warning: no newline at end of file
In file included from ../hch/CMusicHandler.cpp:11:
../hch/CMusicHandler.h:24: error: using typedef-name 'Mix_Chunk' after 'struct'
/usr/include/SDL/SDL_mixer.h:90: error: 'Mix_Chunk' has a previous declaration here
make[2]: *** [vcmiclient-CMusicHandler.o] Error 1
make[2]: Leaving directory `/home/slash/MyDocs/vcmi_armel/vcmi-0.81-svn1610/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/slash/MyDocs/vcmi_armel/vcmi-0.81-svn1610'
make: *** [debian/stamp-makefile-build] Error 2
Google told me that it might help to include the SDL_mixer.h in that file, and to remove the Mix_Chunk struct declaration. Doing so it complains about the missing declaration though. I hope you may have a suggestion what could be wrong here. One guy suggested to check the libsdl-mixer version, which is lbsdl-mixer1.2 1:1.2.6-5+0m5. Any problem with that one?
Thank you in advance!
Daniel
PS: If you need more output or other logs/configs, please let me know!