Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Debian problems installing Dwarf fortress  (Read 4856 times)

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Debian problems installing Dwarf fortress
« on: September 07, 2018, 11:03:36 am »

Ok, so I seen a number of guides on how to fix it but I fail to understand or find a way to run dwarf fortress on Debian 9.
To describe my problem lets establish first that I downloaded Dwarf fortress on this PC from the Bay12games website and I used the terminal to extract the files and go into the df_linux folder on my desktop to run it.
my Debian 9 OS runs on a 32bit system but for some reason I get this error:
./df: 6: ./df: ./libs/Dwarf_Fortress: Exec format error
Anyway to further elaborate I used the wiki guide that guided me to install these packages to run DF:
sudo apt-get install libsdl-image1.2 libsdl-ttf2.0-0 libgtk2.0-0 libglu1-mesa libopenal1
that worked, but I still got the error this post describes, as well as I dont know why most guides tell me to get 32bit-libs which I attempted but got retaliated with an error that stated that the package cannot be located despite the system being 32bit as well as being up to date.
can anyone give a solution to this problem please?

Further Inspection:
Ok, so I did more digging around the files and apparently its a bash error if im not mistaken, the ./df referrers the execution into the libs folder to run the actual Dwarf_Fortress application if im not mistaken.
Assuming that is the case I decided to skip the df.sh and go straight to Dwarf_Fortress.sh which is located in the libs folder and this is the error I got:
"bash: ./Dwarf_Fortress: cannot execute binary file: Exec format error"
I did run the chmod +x [insert_name_without_brackets] and tried to run the actuall file but still no luck, hope this can help someone to help me come with a solution to this problem.
« Last Edit: September 07, 2018, 12:54:14 pm by Lioneez »
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #1 on: September 07, 2018, 02:02:29 pm »

Are you sure you downloaded the 32 bits version? It looks like you are trying to run a 64 bits application on a 32 bits OS.
Logged

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #2 on: September 07, 2018, 10:33:14 pm »

I am positive about the OS being 32bit, when I run lscpu I get this out put which shows the systems orientation:
Quote
Architecture:          i686
CPU op-mode(s):        32-bit

Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 54
Model name:            Intel(R) Atom(TM) CPU N2600   @ 1.60GHz
Stepping:              1
CPU MHz:               1600.000
CPU max MHz:           1600.0000
CPU min MHz:           600.0000
BogoMIPS:              3192.75
L1d cache:             24K
L1i cache:             32K
L2 cache:              512K
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dtherm arat
is this proof enough?
« Last Edit: September 07, 2018, 10:34:51 pm by Lioneez »
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #3 on: September 08, 2018, 12:06:39 am »

That wasn't the question.

Are you sure you downloaded the 32 bits version?

So, are you sure you downloaded df_44_12_linux32.tar.bz2 ?

Also, it looks like there's a package you could install.
« Last Edit: September 08, 2018, 12:11:44 am by Ziusudra »
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #4 on: September 08, 2018, 12:30:05 am »

When you download from the Bay12games website I dont get the bit orientation of the files in the .tr
this is the full name of the file I got from the bay12games download section: df_44_12_linux.tar.bz2
is there anyway to check the bit type of the files within?
P.S: also I never really used to download from the Debian website so quick question, what do I download from there the package Dwarf_Fortress sid or buster? or the Package Dwarf_Fortress-Data sid or buster, I dont really know what those 4 links contain.
« Last Edit: September 08, 2018, 12:37:20 am by Lioneez »
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #5 on: September 08, 2018, 12:33:58 am »

That's the 64-bit version - you have click on All Versions get to this page where you can get the 32-bit version.

And, again, why not install the package?
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #6 on: September 08, 2018, 12:52:04 am »

I jest dont know why I have 2 options between the packages and why it is divided to Dwarf_Fortress which contains 3 .sh files and Dwarf-Fortress-Data which is split between busted and sid somethings, but hold on a sec I want to insure that my problem was only with the version I downloaded.

P.S: yet another error:
Spoiler (click to show/hide)
But mind you the error simply outputs this:
Quote
Not found: data/art/curses_640x300.png
can anyone elaborate whats going on, I installed the packages from the wiki but I do not know how to change the file from .png to .bmp, also it seems it has more than this one problem.
« Last Edit: September 08, 2018, 01:05:34 am by Lioneez »
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #7 on: September 08, 2018, 03:59:16 am »

And, again, why not install the package?

There is no stretch version of the package.

(Dwarf_Fortress:2479): Gtk-WARNING **: Error loading theme icon 'dialog-error' for stock: Unable to load image-loading module: /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /root/Desktop/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/i386-linux-gnu/libicui18n.so.57)

Delete libstdc++ (and libgcc_s?) from your df_linux/libs directory (not the one from /usr).

Also, you should not run your desktop and everything as root.
Logged

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #8 on: September 08, 2018, 08:06:35 am »

Well ok I did that and now I got this error:
Quote
Not found: data/art/curses_640x300.png
Well its still loading honestly after I deleted those 2 in the DF libs forlder aka df_linux/libs/
should I edit the init than now?

P.S: I did remove those files from the libs in the dwarf fortress folder but I still get this cursor error, first it informs me about the size of the screen and than regardless of the option it still shows the curses_640_300.png error.
To elaborate it shows the same text as before with one diffrence, at the end it claims:
GDK_IS_PIXBUF (pixbuf)' failed
while still claiming the bad parameters to zlib.
« Last Edit: September 08, 2018, 12:23:26 pm by Lioneez »
Logged

mikekchar

  • Bay Watcher
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #9 on: September 09, 2018, 01:28:31 am »

It appears that your libpng is bad and also that you have problems with your GNOME setup (which might be related to the libpng problem).  It's hard to debug from here, but it appears that you have problems unrelated to DF that is causing DF not to run.  Possibly reinstall gnome (or at least libpng).

Also make sure that you are using the lib32 compat libraries.  It's been a donkey's age since I used Debian, so I can't remember how it's all set up.  However, Debian went 64 bit a *long* time ago, so making sure you have all the 32bit stuff install properly is quite important for your machine.
Logged

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #10 on: September 09, 2018, 07:45:12 am »

As for reinstalling libpng I think I can manage that as for GNOME, But is it possible to check if the problem is with those Gnome and libpng for sure before I start poking in it, as for lib32 I couldnt get it from the terminal so I got the package suggested for my PC and OS with synaptic.
can we test that theory if the problem truly lies with those two libraries?

P.S: I forgot to ask what kind of lib32 versions do I need, there are 6 in total on synaptic that I can download, if you want I can send the packages names since I dont really know much about that stuff and I usually do these things with a guide as to not destroy my system.
« Last Edit: September 09, 2018, 07:48:12 am by Lioneez »
Logged

mikekchar

  • Bay Watcher
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #11 on: September 10, 2018, 06:18:16 am »

Unfortunately, I'm out of my depth here.  I haven't put Debian on a 32 bit machine for more than a decade.  I use Arch Linux now and don't have any 32 bit machines.  All I can say is that all of the error messages you posted were for Gnome and libpng sent the wrong paramters to zlib (which may be why it "can't find" the png file).

However, now that I look more closely at your response... did you delete curses_640x300.bmp and cusrses_640x300.png from the data/art directory?  If so, that's why it's not working.  Those are the "fonts" for the graphics.  You need to set the correct font files in the init/init.txt file.  But before you do, make the program work.

The other thing you can do instead is to set PRINT_MODE to TEXT in the init.txt file.  This will allow you to play from the console (as long as you have a compatible font set up in the console.  Though, I found it still tries to initialise the graphics anyway, so if you've got something misconfigured it might not let you side step the problem.
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #12 on: September 10, 2018, 09:05:40 am »

Well ok I did that and now I got this error:
Quote
Not found: data/art/curses_640x300.png
Well its still loading honestly after I deleted those 2 in the DF libs forlder aka df_linux/libs/
should I edit the init than now?

Are you running DF with the df script from the root folder or using libs/Dwarf_Fortress directly? The script not only start Dwarf_Fortress but also set the current working directory. If the working directory is incorrect, it won't find the files.

If this is not the problem, make sure data/art/curses_640x300.png actually exists. If not redownload the game or modify data/init/init.txt so it uses an existing tileset.
Logged

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #13 on: September 12, 2018, 11:09:33 am »

Ok so I got this out of the debian help submission I posted, first thing they said that the df version I tried to run was i386 but I have i686 and my problem came from that they gave me 3 options that should help me run df.
1)see if you can get the proper version for your atom netbook
I dont really know much about that.
2)compile it yourself.
Again, I dont know how to compile stuff on linux at all.
3)find a backport or backport it from sid
I found the sid packages but I dont really know what to do with them since there are 2 links one for dwarf fortress and the other for dwarf fortress data.
After I posted the full error I had with pix_buff someone said that I might be running the wrong architecture, is there an i686 dwarf fortress download somewhere for debian, I looked but I didnt find much.
also I found the file Data/art/curses.png in the folder it still does not run it.
I tried to modify the Dwarf_Fortress file but when I try to open it with nano I get an unreadable file as if its encrypted and I cant change the type of mouse image I get since its preference aside if I want it to display or not are missing from init.txt, setting MOUSE to NO does not slove the error, I need to edit the mouse.png to .bmp
« Last Edit: September 12, 2018, 11:42:28 am by Lioneez »
Logged

Lioneez

  • Bay Watcher
  • Challenged.
    • View Profile
Re: Debian problems installing Dwarf fortress
« Reply #14 on: September 12, 2018, 01:37:54 pm »

Ok, So I managed to fix this problem by using the export LD_PRELOAD=libz.so.1 command.

As for what happened I got the wrong download type from the bay12games site when I blindly pressed the Download button.
it got me the 64bit by default when I needed the 32bit.
second after getting the right version there still were a few things that I had to do like changing all the .png files to .bmp since by default the export LD_PRELOAD=libz.so.1 is not in the df.sh command lines and I deleted libstdc++ (and libgcc_s?) from my df_linux/libs directory as well jest to be on the safe side.

also because I didnt know where to insert the command I blindly inserted it before the #!/bash/sh because I didnt know or was told where to insert it, if anyone like me does not know it should be inserted right after cd"${DF_DIR}".



thats all, thx for the help.
« Last Edit: September 12, 2018, 02:29:36 pm by Lioneez »
Logged
Pages: [1] 2