May 21, 2019, 04:57:52 AMLatest Member: Floss

Author Topic: Problems with config.txt in Fedora 20  (Read 3178 times)

0 Members and 1 Guest are viewing this topic.

DarkPhoenix

  • Registered member
  • *
  • Posts: 2
    • View Profile
Problems with config.txt in Fedora 20
« on: June 10, 2014, 02:51:42 AM »
I compiled and built an RPM based on the latest code from http://th.corsix.org/corsix-th-latest.tar.gz; however, when I try to run the game, I keep getting an error about the width and height settings in the config.txt.  It seems the system is automatically converting the two entries to width = (num)height = (num) every time the game is started, and then errors out because (num)height is not a number.

MarkL

  • Moderator
  • ***
  • Posts: 362
    • View Profile
Re: Problems with config.txt in Fedora 20
« Reply #1 on: June 10, 2014, 11:03:51 AM »
First off we moved the code to git a while back so that won't be the latest code.  Try https://github.com/CorsixTH/CorsixTH/wiki

In config you should have values like this (replace these numbers for values that fit your screen dimensions)

width = 800
height = 600

I think normally these are filled in on set up or when you change them in-game.  Perhaps you should create an issue if this did not happen for you (use the link above and click on the issue tab on the right - "i" in a circle)

DarkPhoenix

  • Registered member
  • *
  • Posts: 2
    • View Profile
Re: Problems with config.txt in Fedora 20
« Reply #2 on: June 10, 2014, 11:56:18 PM »
Updating to the latest master did the trick; but for some reason it won't compile with SDL2/SDL2_Mixer, so I figured I'd mention that.

Code: [Select]
Building CXX object CorsixTH/CMakeFiles/CorsixTH.dir/Src/sdl_audio.cpp.o
cd /root/rpmbuild/BUILD/CorsixTH-master/CorsixTH && /usr/bin/c++    -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic  -I/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src -I/root/rpmbuild/BUILD/CorsixTH-master/agg/include -I/usr/include/SDL2 -I/usr/include/luajit-2.0 -I/usr/include/ffmpeg -I/usr/include/freetype2    -o CMakeFiles/CorsixTH.dir/Src/sdl_audio.cpp.o -c /root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th.cpp:115:13: warning: 'void CopyStringId(const unsigned char*&, unsigned char*&)' defined but not used [-Wunused-function]
 static void CopyStringId(const unsigned char*& sIn, unsigned char*& sOut)
             ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp: In function 'int load_music_async_thread(void*)':
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp:175:46: error: too few arguments to function 'Mix_Music* Mix_LoadMUS_RW(SDL_RWops*, int)'
     async->music = Mix_LoadMUS_RW(async->rwop);
                                              ^
In file included from /root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp:28:0:
/usr/include/SDL2/SDL_mixer.h:155:37: note: declared here
 extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS_RW(SDL_RWops *src, int freesrc);
                                     ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp: In function 'int l_load_music_async(lua_State*)':
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp:226:52: error: cannot convert 'load_music_async_t*' to 'const char*' for argument '2' to 'SDL_Thread* SDL_CreateThread(SDL_ThreadFunction, const char*, void*)'
     SDL_CreateThread(load_music_async_thread, async);
                                                    ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp: In function 'int l_load_music(lua_State*)':
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp:235:44: error: too few arguments to function 'Mix_Music* Mix_LoadMUS_RW(SDL_RWops*, int)'
     Mix_Music* pMusic = Mix_LoadMUS_RW(rwop);
                                            ^
In file included from /root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/sdl_audio.cpp:28:0:
/usr/include/SDL2/SDL_mixer.h:155:37: note: declared here
 extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS_RW(SDL_RWops *src, int freesrc);
                                     ^
/usr/bin/cmake -E cmake_progress_report /root/rpmbuild/BUILD/CorsixTH-master/CMakeFiles 9
[ 25%] make[2]: *** [CorsixTH/CMakeFiles/CorsixTH.dir/Src/sdl_audio.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Building CXX object CorsixTH/CMakeFiles/CorsixTH.dir/Src/th_lua_map.cpp.o
cd /root/rpmbuild/BUILD/CorsixTH-master/CorsixTH && /usr/bin/c++    -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic  -I/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src -I/root/rpmbuild/BUILD/CorsixTH-master/agg/include -I/usr/include/SDL2 -I/usr/include/luajit-2.0 -I/usr/include/ffmpeg -I/usr/include/freetype2    -o CMakeFiles/CorsixTH.dir/Src/th_lua_map.cpp.o -c /root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_lua_map.cpp
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_lua_map.cpp: In function 'int l_map_remove_cell_thob(lua_State*)':
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_lua_map.cpp:492:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if(((pNode->iFlags & 0xFF000000) >> 24) == thob)
                                                    ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_lua_map.cpp:500:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if(((pNode->iFlags & 0xFF000000) >> 24) == thob)
                                                    ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_lua_map.cpp:529:99: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if(((*pNode->pExtendedObjectList & (255 << (3 + (i << 3)))) >> (3 + (i << 3))) == thob)
                                                                                                   ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_map.cpp: In member function 'void THMap::draw(THRenderTarget*, int, int, int, int, int, int) const':
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_map.cpp:1594:13: warning: 'formerIterator.THMapScanlineIterator::m_pNode' may be used uninitialized in this function [-Wmaybe-uninitialized]
     m_pNode += m_iNodeStep;
             ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_map.cpp:792:27: note: 'formerIterator.THMapScanlineIterator::m_pNode' was declared here
     THMapScanlineIterator formerIterator;
                           ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_map.cpp:1595:22: warning: 'formerIterator.THMapScanlineIterator::m_iXs' may be used uninitialized in this function [-Wmaybe-uninitialized]
     m_iXs += m_iXStep;
                      ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_map.cpp:792:27: note: 'formerIterator.THMapScanlineIterator::m_iXs' was declared here
     THMapScanlineIterator formerIterator;
                           ^
/root/rpmbuild/BUILD/CorsixTH-master/CorsixTH/Src/th_map.cpp:917:96: warning: '*((void*)& formerIterator +36)' may be used uninitialized in this function [-Wmaybe-uninitialized]
                         pItem->m_fnDraw(pItem, pCanvas, formerIterator.x(), formerIterator.y());
                                                                                                ^
make[2]: Leaving directory `/root/rpmbuild/BUILD/CorsixTH-master'
make[1]: *** [CorsixTH/CMakeFiles/CorsixTH.dir/all] Error 2
make[1]: Leaving directory `/root/rpmbuild/BUILD/CorsixTH-master'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.DSRARw (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.DSRARw (%build)

MarkL

  • Moderator
  • ***
  • Posts: 362
    • View Profile
Re: Problems with config.txt in Fedora 20
« Reply #3 on: June 11, 2014, 10:05:15 AM »
SDL2 is a different branch and is something that is being worked on, so that is why you can't compile against it yet.

You can see which dependencies you need in our wiki