Jump to content
The Dark Mod Forums

64 bit support on linux: TDM Updater for linux is still a 32 bit binary


pacman

Recommended Posts

The ELF executable provided from the main download page is 32-bit. It doesn't run on 64-bit systems without adding support for ELF32. Since 64 bit support is now available in 2.06, this needs updating. While the documentation on the download page is accurate in removing the instructions for adding 32 bit architecture support, which should now be unnecessary, the binary download needs updating too.

 

I get the error: "no such file or directory" on Debian Stretch GNU/Linux, on a bash shell. This is perhaps because it requires loading some dynamically linked 32 bit libraries unavailable on my system, or perhaps even the 32bit loader itself is missing.

 

Here is the list of shared libraries it needs to load acquired from 'ldd' application.

linux-gate.so.1 (0xf777a000)
librt.so.1 => /lib32/librt.so.1 (0xf774e000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf765c000)
libm.so.6 => /lib32/libm.so.6 (0xf7616000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf75f9000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf75dd000)
libc.so.6 => /lib32/libc.so.6 (0xf742f000)
/lib/ld-linux.so.2 (0xf777b000)

Here is a dump from the binary header using readelf application.

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 03 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - GNU
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x804f519
  Start of program headers:          52 (bytes into file)
  Start of section headers:          1690508 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         9
  Size of section headers:           40 (bytes)
  Number of section headers:         33
  Section header string table index: 30

The class is ELF32 & Machine 80386.

 

One solution is to provide a separate 64 bit updater, or to statically link the libraries (Which would allow only one executable for both architectures).

Is there a 64 bit version of the installer?

Edited by pacman
  • Like 2
Link to comment
Share on other sites

There is no binary installer package for the 64 bit version, that i know.

(there is a onpublisched 32bit package)

 

Please let us now which packages are needed to install TDM 64 bit on a linux distro.

Then i will be happy to write/improve some instructions on our tdm wiki article.

Edited by freyk

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

One solution is to provide a separate 64 bit updater, or to statically link the libraries (Which would allow only one executable for both architectures).

Is there a 64 bit version of the installer?

Thank you for report!

 

Yes, it seems that we simply forgot to provide 64-bit build of tdm_update, as silly as it sounds.

I have created issue 4807 for this, so this will be fixed by 2.07. Not sure about 2.06 hotfix though.

 

A possible workaround is to install the standard libraries for running 32-bit stuff.

We have an Ubuntu-oriented instructions of how to compile 32-bit TDM on 64-bit Linux (the page).

While most of those libraries are not necessary for just playing, I guess simply installing all the stuff is an easy enough fix for now.

Link to comment
Share on other sites

Thank you for report!

 

Yes, it seems that we simply forgot to provide 64-bit build of tdm_update, as silly as it sounds.

I have created issue 4807 for this, so this will be fixed by 2.07. Not sure about 2.06 hotfix though.

 

A possible workaround is to install the standard libraries for running 32-bit stuff.

We have an Ubuntu-oriented instructions of how to compile 32-bit TDM on 64-bit Linux (the page).

While most of those libraries are not necessary for just playing, I guess simply installing all the stuff is an easy enough fix for now.

I guess there's wisdom in using installer scripts after all, instead of architecture dependent binaries.

 

I am trying to compile the game now, can't install those libraries because I have held broken packages, and some dependency problems.

Edited by pacman
Link to comment
Share on other sites

COMPILE.txt does not explain how to build tdm_update, it only explains how to build the game itself.

 

I think you are running scons from wrong directory.

Go to darkmod_src/tdm_update and run there scons build="release" -j4.

This should build the 32-bit executable for you.

 

Now download the attached two files and replace the original versions with them (indeed, remove the .txt extension).

After that run scons command again.

Hopefully, you will get a 64-bit executable.

 

P.S. This is hacky and unofficial, you know... :D

SConstruct.txt

SConscript.tdm_update.txt

  • Like 1
Link to comment
Share on other sites

The updater is not a script because it exists on both Windows and Linux with most of the code reused.

Can't imagine how we would ask every Windows user to run a python script (or shell script) and be happy :o

Not to mention that some of the stuff there is not quite simple...

Of course, lack of Linux 64-bit binary updater is a problem which should be fixed.

Link to comment
Share on other sites

COMPILE.txt does not explain how to build tdm_update, it only explains how to build the game itself.

 

I think you are running scons from wrong directory.

Go to darkmod_src/tdm_update and run there scons build="release" -j4.

This should build the 32-bit executable for you.

 

Now download the attached two files and replace the original versions with them (indeed, remove the .txt extension).

After that run scons command again.

Hopefully, you will get a 64-bit executable.

 

P.S. This is hacky and unofficial, you know... :D

 

darkmod_src/tdm_update/ is empty, is that supposed to be so?

I get the following error:

darkmod_src/tdm_update$ scons build="release" -j4

scons: *** No SConstruct file found.
File "/usr/lib/scons/SCons/Script/Main.py", line 916, in _main
Link to comment
Share on other sites

The updater is not a script because it exists on both Windows and Linux with most of the code reused.

Can't imagine how we would ask every Windows user to run a python script (or shell script) and be happy :o

Not to mention that some of the stuff there is not quite simple...

 

I remember from my childhood days when I used to use windows, I would make a vbscript to play some prank (infinite message boxes, disk drive opens & closes indefinitely), call it from a .bat file, and package the two into an innocent looking .exe file. I guess Windows users can run EXEs fine. But that was vbscript, who knows if they have python installed. I guess if it can be a shell script, maybe a compatible .bat file could be written, I haven't looked at the code though.

  • Like 1
Link to comment
Share on other sites

darkmod_src/tdm_update/ is empty, is that supposed to be so?

Nope.

I have just downloaded 2.06 sources archive from website.

 

Here is what I have in C:\TheDarkMod\darkmod_206_src\unpacked\tdm_update:

 

 

01.06.2018 00:32 <DIR> .
01.06.2018 00:32 <DIR> ..
28.05.2018 02:25 14 551 ConsoleUpdater.cpp
28.05.2018 02:25 2 214 ConsoleUpdater.h
28.05.2018 02:25 16 958 darkmod.ico
28.05.2018 02:25 <DIR> libtdm_update
28.05.2018 02:25 2 401 LogWriters.h
28.05.2018 02:25 296 macosx_build.sh
28.05.2018 02:25 1 779 SConscript.libtdm_update
28.05.2018 02:25 1 755 SConscript.minizip
28.05.2018 02:25 2 695 SConscript.tdm_update
28.05.2018 02:25 6 248 SConstruct
28.05.2018 02:25 12 862 TDM_icon.ico
28.05.2018 02:25 <DIR> tdm_package
28.05.2018 02:25 2 458 tdm_update.cpp
28.05.2018 02:25 1 715 tdm_update.rc
28.05.2018 02:25 5 032 tdm_update.sln
28.05.2018 02:25 8 346 tdm_update.vcxproj
28.05.2018 02:25 1 201 tdm_update.vcxproj.filters
28.05.2018 02:25 <DIR> tdm_update_mfc

 

I remember from my childhood days when I used to use windows, I would make a vbscript to play some prank (infinite message boxes, disk drive opens & closes indefinitely), call it from a .bat file, and package the two into an innocent looking .exe file. I guess Windows users can run EXEs fine. But that was vbscript, who knows if they have python installed. I guess if it can be a shell script, maybe a compatible .bat file could be written, I haven't looked at the code though.

It is easier to maintain three build configs than to maintain two completely separate scripts.

Anyway, there is no intent of changing the way tdm_update works.

 

P.S. It seems that such pranks were popular on our childhood :D

  • Like 1
Link to comment
Share on other sites

Nope.

I have just downloaded 2.06 sources archive from website.

 

Here is what I have in C:\TheDarkMod\darkmod_206_src\unpacked\tdm_update:

 

 

01.06.2018 00:32 <DIR> .
01.06.2018 00:32 <DIR> ..
28.05.2018 02:25 14 551 ConsoleUpdater.cpp
28.05.2018 02:25 2 214 ConsoleUpdater.h
28.05.2018 02:25 16 958 darkmod.ico
28.05.2018 02:25 <DIR> libtdm_update
28.05.2018 02:25 2 401 LogWriters.h
28.05.2018 02:25 296 macosx_build.sh
28.05.2018 02:25 1 779 SConscript.libtdm_update
28.05.2018 02:25 1 755 SConscript.minizip
28.05.2018 02:25 2 695 SConscript.tdm_update
28.05.2018 02:25 6 248 SConstruct
28.05.2018 02:25 12 862 TDM_icon.ico
28.05.2018 02:25 <DIR> tdm_package
28.05.2018 02:25 2 458 tdm_update.cpp
28.05.2018 02:25 1 715 tdm_update.rc
28.05.2018 02:25 5 032 tdm_update.sln
28.05.2018 02:25 8 346 tdm_update.vcxproj
28.05.2018 02:25 1 201 tdm_update.vcxproj.filters
28.05.2018 02:25 <DIR> tdm_update_mfc

 

 

P.S. It seems that such pranks were popular on our childhood :D

 

you mean in the 69MB 7z file from the http://www.thedarkmod.com/downloads/ page?

 

I am downloading them again, & from the svn trunk too. Let's see.

Link to comment
Share on other sites

Aha, it's done, I have an ELF64 now.

Thanks.

 

I guess I was bad at using 7z.

 

Scratch that, we are back to square one.

I run the 64bit updater. It downloads the 32 bit updater using some tdm_update_updater.sh. -_-

I'd try to edit that shell script, or else I'm afraid I'd have to patch the binary itself :laugh: , or compile the game.

 

BTW, is that 69MB zip file enough to compile the whole playable game? or I'd have to download assets from somewhere?

Link to comment
Share on other sites

You can download 2.0 standalone here:

 

https://www.moddb.com/mods/the-dark-mod

 

https://www.moddb.com/mods/the-dark-mod/downloads/the-dark-mod-20-standalone-full-installer

 

and then use tdm_updater to update from 2.0 to 2.06.

 

If you want you can even use the 2.0 to 2.01 packs at that site (etc).

 

https://www.moddb.com/mods/the-dark-mod/downloads/the-dark-mod-20-201-update-package-windows

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I think the most relevant page is this one.

On the other hand, most of the information is probably short-lived, given that 64-bit executable is going to be provided in future.

Not sure about wiki access though, perhaps it is not public.

 

BTW, is that 69MB zip file enough to compile the whole playable game? or I'd have to download assets from somewhere?

Yes, it will be enough to compile the game.

The assets are downloaded by tdm_update (the pk4 files): they are completely separate from the executable.

So you simply take the stuff downloaded by tdm_update, then overwrite the included binary with self-built one and it would work.

  • Like 2
Link to comment
Share on other sites

  • 4 months later...

A small workaround is to downloading the update packages mannually.

Get them from moddb.

See http://forums.thedarkmod.com/topic/19683-mac-problems-launching-tdm/?do=findComment&comment=428698

That incremental updating process looked odd to me, so i did "strings | grep http" on the unzipped updater executable and got the URL http://mirrors.thedarkmod.com/ . The mirrors should hold all files needed by TDM - but only one of them lets you list directory content and therefore gives me a chance to see, where stuff is actually supposed to be.

I grabbed all but the tdm_update_*_to_*.zip files (guess i don't need them for a fresh install) from http://mirror.helium.in-berlin.de/thedarkmod/release/ and found the executables in tdm_shared_stuff.zip .

After setting u+x and installing the OpenAL libs from my distro's repo, i was able to start it, download a mission and walk around a bit .

 

I noticed two issues, i did not experience on Windows 7:

Alt-Tab taskswitching does not work inside the game (but i can switch to a virtual terminal and back to TDM with alt-F*).

When playing with another resolution than the desktop (like when first starting the game), TDM does not switch back to original desktop resolution on exit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...