Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Sil

Reply
 
Thread Tools Display Modes
Old January 25, 2012, 15:50   #1
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 844
half is on a distinguished road
Sil for Unix

I'd like to get Sil working for as many Linux systems as possible.

Theoretically there is code there for X11, GTK, GCU, and a monochrome terminal mode called CAP. These are from Vanilla before the move to the new Make system.

With the help of Alejandro, I've managed to get it working for some systems.

He has got it working for X11 on his Linux system.
I have got it working for CAP on my Mac OS X 10.6 system.

I've put the most recent source code collection which has allowed us to get this far on the Sil download page:

http://www.amirrorclear.net/flowers/game/sil/index.html

I'd love it if anyone could help me get it working in more forms, so this thread is for us to pool our efforts. (Do keep in mind that I'm not very good at Makefiles or Unix!)
half is offline   Reply With Quote
Old January 25, 2012, 15:51   #2
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 844
half is on a distinguished road
Edit: You can ignore this one here as I have now solved X11 on Mac

When I try compiling for X11 on my Mac, I get two error messages. First:

main-x11.c: In function ‘paste_x11_send’:
main-x11.c:1879: warning: pointer targets in passing argument 7 of ‘XChangeProperty’ differ in signedness

Then at the time of linking:

ld: library not found for -lX11

I'm not sure if the first of these is really a bug, but the second aborts compilation. Perhaps under OS X I need to use a different way of building for X11?

Last edited by half; January 25, 2012 at 17:32.
half is offline   Reply With Quote
Old January 25, 2012, 15:54   #3
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 844
half is on a distinguished road
Neither of us can get it working under GCU.

Alejandro get this error using curses:

In file included from main-gcu.c:67:0:
/usr/include/curses.h:564:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token

And the same one with ncurses:

In file included from main-gcu.c:65:0:
/usr/include/ncurses.h:564:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token

On my Mac, I get a very similar message (ncurses.h on OS X just seems to be a symbolic link to curses.h):

In file included from main-gcu.c:65:
/usr/include/ncurses.h:533: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token

Any ideas?
half is offline   Reply With Quote
Old January 25, 2012, 16:09   #4
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 844
half is on a distinguished road
Edit: snipped, since the X11 on Mac problem is solved and will be added to the Makefile

Last edited by half; January 25, 2012 at 17:31.
half is offline   Reply With Quote
Old January 25, 2012, 16:38   #5
mtadd
Rookie
 
Join Date: Nov 2011
Posts: 24
mtadd is on a distinguished road
I've gotten sil to run under X11 on my mac using macports X11 library (port install xorg-libX11). I removed the following from OBJS:

main-xaw.o main-gtk.o main-lsl.o main-sla.o main-vcs.o main-xpj.o

and modified the defines as follows (under variation only support main-x11.c):

LIBS = -L /opt/local/lib -lX11

Then, run the compiled binary from a working directory with the sil lib/ as a subdirectory.
mtadd is offline   Reply With Quote
Old January 25, 2012, 17:30   #6
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 844
half is on a distinguished road
Quote:
Originally Posted by mtadd View Post
LIBS = -L /opt/local/lib -lX11
Thanks for that. You have solved the X11 problem for Macs. I didn't realise you had to have the -L option as well as the -l option. Using that (and the default X11 libraries that came with my system) it works.

This means that I can add some of the user interface improvements to X11 because I can test them at home. The main thing is the starting menu that lets you choose whether to start a new game, or continue an old one, or run the tutorial.
half is offline   Reply With Quote
Old January 25, 2012, 20:24   #7
SaThaRiel
Adept
 
SaThaRiel's Avatar
 
Join Date: Nov 2009
Posts: 164
SaThaRiel is on a distinguished road
Just could compile it...but it crashes my X when i start it. Sadly there are no logs of what happened, just a coredump from scrotwm (my window manager).

Since i wont test further under this circumstances i may setup a VM with my current configuration.

Running Archlinux with Kernel 3.2.1 and X.Org X Server 1.11.3, Windowmanager scrotwm 0.10.0. gcc version 4.6.2 20111223. Architecture is 64-Bit.
__________________
Proud candidate for the Angband Darwin Award!
SaThaRiel is offline   Reply With Quote
Old January 26, 2012, 07:14   #8
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,588
PowerDiver is on a distinguished road
Quote:
Originally Posted by half View Post
http://www.amirrorclear.net/flowers/game/sil/index.html

I'd love it if anyone could help me get it working in more forms, so this thread is for us to pool our efforts. (Do keep in mind that I'm not very good at Makefiles or Unix!)
FWIW, I compiled and got something that worked well enough to at least let me take a couple of steps. Using Makefile.std in Ubuntu Linux.

Would you like me to try any particular Linux experiment? I'm not clear what you are after.
PowerDiver is offline   Reply With Quote
Old January 26, 2012, 07:25   #9
demauk
Rookie
 
Join Date: Jan 2012
Location: Edmonton, AB
Posts: 1
demauk is on a distinguished road
CAP works on Linux! I must have messed that part of the Makefile while snooping around trying to get X11 to work, because it's fine now.

All I did this time was to download a fresh copy of the source, comment/uncomment Makefile.std to attempt a CAP/X11 binary, and call make on it. It worked.

I'm Alejandro, btw.

Playing with CAP is a bit difficult, however, because of the whole monochrome thing. Maybe tweaking the terminal emulator settings would make it look better? I'm not particularly curious about it.

On the other hand, any ideas on how to deal with the n/curses compilation errors will be appreciated!

Edit after reading PowerDiver: which CFLAGS/LIBS lines did you leave uncommented? The problem has been compiling against n/curses. And XAW is untested, yet.

Last edited by demauk; January 26, 2012 at 07:31.
demauk is offline   Reply With Quote
Old January 26, 2012, 08:39   #10
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,588
PowerDiver is on a distinguished road
Quote:
Originally Posted by demauk View Post
Edit after reading PowerDiver: which CFLAGS/LIBS lines did you leave uncommented? The problem has been compiling against n/curses. And XAW is untested, yet.
I didn't edit anything. make -f Makefile.std
The first variation for main-x11.c is what is uncommented.
Is there any reason to bother with curses?

I just tried to compile with curses, and got the error. beep is defined in the code, but is also defined [differently] by curses. Someone with a clue should require actual naming standards on all things externed.

Change beep to something else, say ANG_UTIL_beep, in src/defines.h and src/util.c. That let me compile.

Code:
$ grep -n ANG_UTIL *[ch]
defines.h:2601:#define ANG_UTIL_beep					op_ptr->opt[OPT_beep]
util.c:2179:	if (ANG_UTIL_beep) Term_xtra(TERM_XTRA_NOISE, 0);
PowerDiver is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sil half Sil 381 June 16, 2014 14:13
Sil 1.0.1 half Sil 169 April 6, 2012 01:57
[3.1.2v2, Unix] Have existing character, start new one that died, can't access old? apeiron Vanilla 6 December 2, 2010 14:49
[Un] Line endings - Windows or Unix? andrewdoull Variants 8 September 29, 2008 00:30
Linux/Unix users: Where should savefiles be stored? takkaria Vanilla 34 November 3, 2007 11:36


All times are GMT +1. The time now is 08:07.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.