ToME: the Tales of Maj'Eyal
http://forums.te4.org/

[LINUX] Tome 2.3.11-ah Graphics Not working
http://forums.te4.org/viewtopic.php?f=1&t=46271
Page 1 of 1

Author:  Renfield [ Sat Apr 09, 2016 1:18 am ]
Post subject:  [LINUX] Tome 2.3.11-ah Graphics Not working

Hi Guys

I am using Arch Linux, and recently compiled the 2.3.11-ah version of Tome.

The installation went ok, and it runs ok, but no matter what I try, I cannot get it to run with graphics.

The graphic files are there, and I have tried using X11, SDL and gtk2, and while I have the option for graphics, when I chose it, it does not show, although when I choose broad tiles, that works, but in ASCII only.

I am trying the commands

./src/tome -g
./src/tome -mx11 -g ( also -- -g)
./src/tome -msdl - g ( also -- -g)
./src/tome -mgtk2 -g ( also -- -g) (This version gives me a graphics menu, but selecting them doesn't work)

I have a working version of 2.3.5 , which I normally run with tome2 -g -- -b -n4 which is working perfectly, but can't figure out where I am going wrong.

In fact all versions of the -ah compile ok, but graphics are not working.

Can anyone provide any help or insight into the issue?

Thanks in Advance
Renfield

Author:  HousePet [ Sun Apr 10, 2016 12:00 am ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

My first thought was "its a caps sensitive issue".
Is the path to the tiles correct?

However that was just an instinctive response, so it may be completely useless.

Author:  Renfield [ Sun Apr 10, 2016 1:41 am ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

HousePet wrote:
My first thought was "its a caps sensitive issue".
Is the path to the tiles correct?

However that was just an instinctive response, so it may be completely useless.


Thanks for the reply.

The lib path is fine, it is all lower case, as it should be. the lib dir in the tome.ini is .\lib and the execution path for loading is ./src/tome, but I have also tried to put the full path into the tome.ini and none works.

I tried it on the latest version as well as the other versions (11-ah,10-ah etc)

totally flummoxed. As I said the 2.3.5 version works, but it has a few bugs, like not always having the princess quest monsters on small levels, which i have heard the newer versions have fixed.

Renfield

Author:  AnonymousHero [ Wed Apr 13, 2016 4:54 am ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

I think it was removed somewhere along the way.

The long-term plan was to introduce a cross-platform interface (based on Qt or similar) which would make it easier to support and then to perhaps re-introduce tiles at that point... but that hasn't happened yet.

Author:  Renfield [ Wed Apr 13, 2016 10:52 pm ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

AnonymousHero wrote:
I think it was removed somewhere along the way.

The long-term plan was to introduce a cross-platform interface (based on Qt or similar) which would make it easier to support and then to perhaps re-introduce tiles at that point... but that hasn't happened yet.


Well that sorts out why I can't get it working :)

Was there any of the versions that sorted out the princess quests, but also had graphics?

Author:  AnonymousHero [ Thu Apr 14, 2016 4:31 am ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

Renfield wrote:
Was there any of the versions that sorted out the princess quests, but also had graphics?


v2.3.6-ah should have the fix, I believe. (I think the fix was commit ID cb01def7b71e64136ec58ad2876c8e2ed70ac008)

However, I think everything up to (at least) v2.3.9-ah should be fine... and there are some rather important later fixes as well, particularly for 64-bit and distros with built-in stack protection. (There have been a lot of small stack overflow fixes through the years...)

In fact everything before commit 25f27454b680ae37439ef2f573988f74ebbb90e6 ("Remove graphics support") should be fine, AFAIK. That seems to also include v2.3.10-ah AFAICT from the commit logs, so I'm a bit surprised that didn't work for you. Are you sure you re-compiled correctly?

Author:  Renfield [ Thu Apr 14, 2016 11:31 pm ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

AnonymousHero wrote:
Renfield wrote:

In fact everything before commit 25f27454b680ae37439ef2f573988f74ebbb90e6 ("Remove graphics support") should be fine, AFAIK. That seems to also include v2.3.10-ah AFAICT from the commit logs, so I'm a bit surprised that didn't work for you. Are you sure you re-compiled correctly?



I had been concentrating on the latest versions, and had deleted the older ones, so I grabbed an older version again and tried to compile. But for some reason I can't get them to compile now.

The output I am getting is:

Code:
$ cmake .
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found GTK2_GTK: /usr/lib64/libgtk-x11-2.0.so 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found SDL: /usr/lib64/libSDLmain.a;/usr/lib64/libSDL.so;-lpthread (found version "1.2.15")
-- Found SDL_image: /usr/lib64/libSDL_image.so (found version "1.2.12")
-- Found SDL_ttf: /usr/lib64/libSDL_ttf.so (found version "2.0.11")
-- Found Curses: /usr/lib64/libcurses.so 
-- Enabled features:

-- Configuring done
-- Generating done
-- Build files have been written to: /home/renfield/Downloads/tome2-2.3.10-ah
[renfield@CastleDracula tome2-2.3.10-ah]$ make
Scanning dependencies of target lua
[  0%] Building C object src/lua/CMakeFiles/lua.dir/lapi.c.o
[  1%] Building C object src/lua/CMakeFiles/lua.dir/lcode.c.o
[  2%] Building C object src/lua/CMakeFiles/lua.dir/ldebug.c.o
[  3%] Building C object src/lua/CMakeFiles/lua.dir/ldo.c.o
[  4%] Building C object src/lua/CMakeFiles/lua.dir/lfunc.c.o
[  5%] Building C object src/lua/CMakeFiles/lua.dir/lgc.c.o
[  6%] Building C object src/lua/CMakeFiles/lua.dir/llex.c.o
[  6%] Building C object src/lua/CMakeFiles/lua.dir/lmem.c.o
[  7%] Building C object src/lua/CMakeFiles/lua.dir/lobject.c.o
[  8%] Building C object src/lua/CMakeFiles/lua.dir/lparser.c.o
[  9%] Building C object src/lua/CMakeFiles/lua.dir/lstate.c.o
[ 10%] Building C object src/lua/CMakeFiles/lua.dir/lstring.c.o
[ 11%] Building C object src/lua/CMakeFiles/lua.dir/ltable.c.o
[ 12%] Building C object src/lua/CMakeFiles/lua.dir/ltests.c.o
[ 13%] Building C object src/lua/CMakeFiles/lua.dir/ltm.c.o
[ 13%] Building C object src/lua/CMakeFiles/lua.dir/lundump.c.o
[ 14%] Building C object src/lua/CMakeFiles/lua.dir/lvm.c.o
[ 15%] Building C object src/lua/CMakeFiles/lua.dir/lzio.c.o
[ 16%] Building C object src/lua/CMakeFiles/lua.dir/lauxlib.c.o
[ 17%] Building C object src/lua/CMakeFiles/lua.dir/lbaselib.c.o
[ 18%] Building C object src/lua/CMakeFiles/lua.dir/ldblib.c.o
[ 19%] Building C object src/lua/CMakeFiles/lua.dir/liolib.c.o
[ 20%] Building C object src/lua/CMakeFiles/lua.dir/lstrlib.c.o
[ 20%] Building C object src/lua/CMakeFiles/lua.dir/tolua_lb.c.o
[ 21%] Building C object src/lua/CMakeFiles/lua.dir/tolua_rg.c.o
[ 22%] Building C object src/lua/CMakeFiles/lua.dir/tolua_tt.c.o
[ 23%] Building C object src/lua/CMakeFiles/lua.dir/tolua_tm.c.o
[ 24%] Building C object src/lua/CMakeFiles/lua.dir/tolua_gp.c.o
[ 25%] Building C object src/lua/CMakeFiles/lua.dir/tolua_eh.c.o
[ 26%] Building C object src/lua/CMakeFiles/lua.dir/tolua_bd.c.o
[ 26%] Linking C static library liblua.a
[ 26%] Built target lua
Scanning dependencies of target tolua
[ 27%] Building C object src/lua/CMakeFiles/tolua.dir/tolua.c.o
[ 28%] Building C object src/lua/CMakeFiles/tolua.dir/tolualua.c.o
[ 29%] Linking C executable tolua
[ 29%] Built target tolua
[ 30%] Generating w_dun.c
[ 31%] Generating w_mnster.c
[ 32%] Generating w_player.c
[ 33%] Generating w_play_c.c
[ 34%] Generating w_z_pack.c
[ 34%] Generating w_obj.c
[ 35%] Generating w_util.c
[ 36%] Generating w_spells.c
[ 37%] Generating w_quest.c
Scanning dependencies of target tome
[ 38%] Building C object src/CMakeFiles/tome.dir/main-gcu.c.o
[ 39%] Building C object src/CMakeFiles/tome.dir/main-x11.c.o
[ 40%] Building C object src/CMakeFiles/tome.dir/main-xaw.c.o
[ 40%] Building C object src/CMakeFiles/tome.dir/main-sdl.c.o
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c: In function ‘Term_text_sdl’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c:1189:24: warning: array subscript has type ‘char’ [-Wchar-subscripts]
    SDL_BlitSurface(text[*cp],NULL,worksurf,NULL);
                        ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c: In function ‘bringToTop’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c:1379:13: warning: unused variable ‘tc’ [-Wunused-variable]
  term_data *tc;
             ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c: In function ‘manipulationMode’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c:1554:14: warning: unused variable ‘backup’ [-Wunused-variable]
  SDL_Surface backup;
              ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c: In function ‘init_sdl’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c:1972:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  videoInfo = SDL_GetVideoInfo();
            ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c:1949:9: warning: unused variable ‘surface_type’ [-Wunused-variable]
  int i, surface_type;
         ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c: At top level:
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-sdl.c:94:14: warning: ‘arg_double_width’ defined but not used [-Wunused-variable]
 static bool_ arg_double_width = FALSE;
              ^
[ 41%] Building C object src/CMakeFiles/tome.dir/main-gtk2.c.o
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-gtk2.c: In function ‘load_xpm’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-gtk2.c:1572:34: warning: format ‘%lX’ expects argument of type ‘long unsigned int *’, but argument 3 has type ‘u32b * {aka unsigned int *}’ [-Wformat=]
   else if ((1 != sscanf(&buf[j], "#%06lX", &tmp)) &&
                                  ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/main-gtk2.c:1573:41: warning: format ‘%lx’ expects argument of type ‘long unsigned int *’, but argument 3 has type ‘u32b * {aka unsigned int *}’ [-Wformat=]
                   (1 != sscanf(&buf[j], "#%06lx", &tmp)))
                                         ^
[ 42%] Building C object src/CMakeFiles/tome.dir/z-rand.c.o
[ 43%] Building C object src/CMakeFiles/tome.dir/z-util.c.o
[ 44%] Building C object src/CMakeFiles/tome.dir/z-form.c.o
[ 45%] Building C object src/CMakeFiles/tome.dir/z-virt.c.o
[ 46%] Building C object src/CMakeFiles/tome.dir/z-term.c.o
[ 46%] Building C object src/CMakeFiles/tome.dir/variable.c.o
[ 47%] Building C object src/CMakeFiles/tome.dir/tables.c.o
[ 48%] Building C object src/CMakeFiles/tome.dir/plots.c.o
[ 49%] Building C object src/CMakeFiles/tome.dir/util.c.o
[ 50%] Building C object src/CMakeFiles/tome.dir/cave.c.o
[ 51%] Building C object src/CMakeFiles/tome.dir/dungeon.c.o
[ 52%] Building C object src/CMakeFiles/tome.dir/melee1.c.o
[ 53%] Building C object src/CMakeFiles/tome.dir/melee2.c.o
[ 53%] Building C object src/CMakeFiles/tome.dir/modules.c.o
[ 54%] Building C object src/CMakeFiles/tome.dir/object1.c.o
[ 55%] Building C object src/CMakeFiles/tome.dir/object2.c.o
[ 56%] Building C object src/CMakeFiles/tome.dir/randart.c.o
[ 57%] Building C object src/CMakeFiles/tome.dir/squeltch.c.o
[ 58%] Building C object src/CMakeFiles/tome.dir/traps.c.o
[ 59%] Building C object src/CMakeFiles/tome.dir/monster1.c.o
[ 60%] Building C object src/CMakeFiles/tome.dir/monster2.c.o
[ 60%] Building C object src/CMakeFiles/tome.dir/monster3.c.o
[ 61%] Building C object src/CMakeFiles/tome.dir/xtra1.c.o
/home/renfield/Downloads/tome2-2.3.10-ah/src/xtra1.c: In function ‘health_redraw’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/xtra1.c:960:34: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  else if (!m_list[health_who].hp < 0)
                                  ^
[ 62%] Building C object src/CMakeFiles/tome.dir/xtra2.c.o
[ 63%] Building C object src/CMakeFiles/tome.dir/skills.c.o
[ 64%] Building C object src/CMakeFiles/tome.dir/powers.c.o
[ 65%] Building C object src/CMakeFiles/tome.dir/gods.c.o
[ 66%] Building C object src/CMakeFiles/tome.dir/spells1.c.o
/home/renfield/Downloads/tome2-2.3.10-ah/src/spells1.c: In function ‘potion_smash_effect’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/spells1.c:8796:8: warning: variable ‘ident’ set but not used [-Wunused-but-set-variable]
  bool_ ident = FALSE;
        ^
[ 66%] Building C object src/CMakeFiles/tome.dir/spells2.c.o
[ 67%] Building C object src/CMakeFiles/tome.dir/status.c.o
[ 68%] Building C object src/CMakeFiles/tome.dir/files.c.o
[ 69%] Building C object src/CMakeFiles/tome.dir/notes.c.o
[ 70%] Building C object src/CMakeFiles/tome.dir/loadsave.c.o
[ 71%] Building C object src/CMakeFiles/tome.dir/cmd1.c.o
[ 72%] Building C object src/CMakeFiles/tome.dir/cmd2.c.o
[ 73%] Building C object src/CMakeFiles/tome.dir/cmd3.c.o
[ 73%] Building C object src/CMakeFiles/tome.dir/cmd4.c.o
[ 74%] Building C object src/CMakeFiles/tome.dir/cmd5.c.o
[ 75%] Building C object src/CMakeFiles/tome.dir/cmd6.c.o
/home/renfield/Downloads/tome2-2.3.10-ah/src/cmd6.c: In function ‘do_cmd_use_staff’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/cmd6.c:3637:12: warning: variable ‘ident’ set but not used [-Wunused-but-set-variable]
  int item, ident, chance;
            ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/cmd6.c: In function ‘do_cmd_aim_wand’:
/home/renfield/Downloads/tome2-2.3.10-ah/src/cmd6.c:3831:27: warning: variable ‘sval’ set but not used [-Wunused-but-set-variable]
  int item, ident, chance, sval;
                           ^
/home/renfield/Downloads/tome2-2.3.10-ah/src/cmd6.c:3831:12: warning: variable ‘ident’ set but not used [-Wunused-but-set-variable]
  int item, ident, chance, sval;
            ^
[ 76%] Building C object src/CMakeFiles/tome.dir/cmd7.c.o
[ 77%] Building C object src/CMakeFiles/tome.dir/help.c.o
[ 78%] Building C object src/CMakeFiles/tome.dir/generate.c.o
[ 79%] Building C object src/CMakeFiles/tome.dir/gen_maze.c.o
[ 80%] Building C object src/CMakeFiles/tome.dir/gen_evol.c.o
[ 80%] Building C object src/CMakeFiles/tome.dir/wild.c.o
[ 81%] Building C object src/CMakeFiles/tome.dir/levels.c.o
[ 82%] Building C object src/CMakeFiles/tome.dir/store.c.o
[ 83%] Building C object src/CMakeFiles/tome.dir/bldg.c.o
[ 84%] Building C object src/CMakeFiles/tome.dir/cmovie.c.o
[ 85%] Building C object src/CMakeFiles/tome.dir/wizard2.c.o
[ 86%] Building C object src/CMakeFiles/tome.dir/init2.c.o
[ 86%] Building C object src/CMakeFiles/tome.dir/birth.c.o
[ 87%] Building C object src/CMakeFiles/tome.dir/wizard1.c.o
[ 88%] Building C object src/CMakeFiles/tome.dir/init1.c.o
[ 89%] Building C object src/CMakeFiles/tome.dir/main.c.o
[ 90%] Building C object src/CMakeFiles/tome.dir/lua_bind.c.o
[ 91%] Building C object src/CMakeFiles/tome.dir/script.c.o
[ 92%] Building C object src/CMakeFiles/tome.dir/w_mnster.c.o
[ 93%] Building C object src/CMakeFiles/tome.dir/w_player.c.o
[ 93%] Building C object src/CMakeFiles/tome.dir/w_play_c.c.o
[ 94%] Building C object src/CMakeFiles/tome.dir/w_z_pack.c.o
[ 95%] Building C object src/CMakeFiles/tome.dir/w_obj.c.o
[ 96%] Building C object src/CMakeFiles/tome.dir/w_util.c.o
[ 97%] Building C object src/CMakeFiles/tome.dir/w_spells.c.o
[ 98%] Building C object src/CMakeFiles/tome.dir/w_quest.c.o
[ 99%] Building C object src/CMakeFiles/tome.dir/w_dun.c.o
[100%] Linking C executable tome
CMakeFiles/tome.dir/util.c.o: In function `path_temp':
util.c:(.text+0x139): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: CMakeFiles/tome.dir/main-sdl.c.o: undefined reference to symbol 'truncf@@GLIBC_2.2.5'
/usr/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/CMakeFiles/tome.dir/build.make:1984: recipe for target 'src/tome' failed
make[2]: *** [src/tome] Error 1
CMakeFiles/Makefile2:88: recipe for target 'src/CMakeFiles/tome.dir/all' failed
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2


just in case I had installed something to my system that it didn't like, I also re-downloaded 2.2.3-11-ah and compiled that and it compiled perfectly. So I am obviously doing something wrong here. I have to admit my knowledge of compiling source is not great, so any help would be appreciated


Ren

Author:  AnonymousHero [ Fri Apr 15, 2016 3:46 am ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

The linking issue was fixed in 7d8712ba5bcf8ba7837ca0c198f364fd208db354 -- according to the commit commit there was apparently a change in some distro toolchains which meant that "libm" was no longer automatically linked.

I'm not sure if the commit will cherry-pick cleanly into what you have, but regardless it's a trivial change that should be easy to do manually.

EDIT: Some of those main-sdl warnings also look a bit nasty, but as I recall the (32-bit compatible) fix for those was a little more invovled. What I recommend is to just ignore the SDL port entirely -- it's absolutely awful anyway UX-wise (IMO).

Author:  Renfield [ Fri Apr 15, 2016 10:17 pm ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

AnonymousHero wrote:
The linking issue was fixed in 7d8712ba5bcf8ba7837ca0c198f364fd208db354 -- according to the commit commit there was apparently a change in some distro toolchains which meant that "libm" was no longer automatically linked.

I'm not sure if the commit will cherry-pick cleanly into what you have, but regardless it's a trivial change that should be easy to do manually.

EDIT: Some of those main-sdl warnings also look a bit nasty, but as I recall the (32-bit compatible) fix for those was a little more involved. What I recommend is to just ignore the SDL port entirely -- it's absolutely awful anyway UX-wise (IMO).



I just commented out the SDL part, and it compiled fine. I compiled 2.3.9-ah, and 2.3.7-ah

However when I start with

./src/tome -g
./src/tome -g -mgtk2 -- -b -n4
./src/tome -g -mgtk2
./src.tome -g -mgtk2 -- -b
./src/tome -mgtk2 -- -g -b

I still get ASCII only, and the menu items don't work

BUT.....

It does work on both versions when I issue

./src/tome -g -x11 -- -b -n4

Not sure why the X11 works and the Gtk2 does not, But I can easily play the X11 version, so I am happy

Even got it compiled on my sons Raspberry Pi, so he is happy as well.

Thanks for the help guys

Ren

Author:  AnonymousHero [ Sat Apr 16, 2016 11:58 am ]
Post subject:  Re: [LINUX] Tome 2.3.11-ah Graphics Not working

Renfield wrote:
Not sure why the X11 works and the Gtk2 does not, But I can easily play the X11 version, so I am happy

Even got it compiled on my sons Raspberry Pi, so he is happy as well.


Glad to hear it you got it working!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/