Jump to content


Photo

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

installation updater 64-bit 32-bit

  • Please log in to reply
29 replies to this topic

#1 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 09:04 AM

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, 31 May 2018 - 10:08 AM.

  • stgatilov and Anderson like this

#2 freyk

freyk

    Advanced Member

  • Member
  • PipPipPip
  • 701 posts

Posted 31 May 2018 - 09:48 AM

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, 31 May 2018 - 11:01 AM.


#3 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 31 May 2018 - 10:59 AM

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.



#4 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 11:34 AM

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, 31 May 2018 - 11:57 AM.


#5 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 31 May 2018 - 11:56 AM

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

Attached Files


  • pacman likes this

#6 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 31 May 2018 - 12:08 PM

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.



#7 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 12:14 PM

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


#8 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 12:23 PM

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.


  • stgatilov likes this

#9 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 31 May 2018 - 12:35 PM

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:

Spoiler

 

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


  • pacman likes this

#10 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 12:49 PM

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:

Spoiler

 

 

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.



#11 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 31 May 2018 - 12:55 PM

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

Yes, exactly.

SVN trunk is also OK, but it would be safer to download release2.06 branch from SVN if you only want to build 2.06 yourself.


  • pacman likes this

#12 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 01:20 PM

Yes, exactly.

SVN trunk is also OK, but it would be safer to download release2.06 branch from SVN if you only want to build 2.06 yourself.

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

Thanks.

 

I guess I was bad at using 7z.


  • nbohr1more likes this

#13 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 01:33 PM

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?



#14 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9034 posts

Posted 31 May 2018 - 01:37 PM

Hmm. In the GUI there's an option to "prevent tdm_updater from updating itself". Is there no such thing here?


  • stgatilov likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

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

#15 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9034 posts

Posted 31 May 2018 - 01:40 PM

You can download 2.0 standalone here:

 

https://www.moddb.co...ds/the-dark-mod

 

https://www.moddb.co...-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.co...package-windows


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

http://www.indiedb.c...ds/the-dark-mod

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

#16 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 02:00 PM

Hmm. In the GUI there's an option to "prevent tdm_updater from updating itself". Is there no such thing here?

There is, there is. Thanks.

I'll try the --noselfupdate option.


  • Anderson likes this

#17 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 02:04 PM

Thanks everyone, the game is downloading now.

I think now I should write the things I learned here somewhere. Maybe TDM Updater page on wiki?


  • Bikerdude, stgatilov, nbohr1more and 1 other like this

#18 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9034 posts

Posted 31 May 2018 - 02:06 PM

Yes please.


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

http://www.indiedb.c...ds/the-dark-mod

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

#19 pacman

pacman

    Member

  • Member
  • PipPip
  • 13 posts

Posted 31 May 2018 - 02:24 PM

Yes please.

Ughh, I cannot seem to find a way to register on the wiki, only a login page.



#20 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 31 May 2018 - 09:41 PM

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.


  • Anderson and pacman like this

#21 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 485 posts

Posted 26 October 2018 - 11:18 AM

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

Yes, please. I also got an amd64-only Linux box since a decade now and not having to switch to the Windows 7 for playing TDM would be great.


  • Anderson likes this

#22 freyk

freyk

    Advanced Member

  • Member
  • PipPipPip
  • 701 posts

Posted 27 October 2018 - 11:34 AM

A small workaround is to downloading the update packages mannually.
Get them from moddb.
See http://forums.thedar...dm/#entry428698

Edited by freyk, 27 October 2018 - 11:38 AM.


#23 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 28 October 2018 - 12:56 AM

Another way to run updater is to install packages for running 32-bit programs.

Unless you have done horrible things to your Linux, it should be rather easy.



#24 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 485 posts

Posted 29 October 2018 - 01:54 AM

A small workaround is to downloading the update packages mannually.
Get them from moddb.
See http://forums.thedar...dm/#entry428698

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...arkmod/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.



#25 freyk

freyk

    Advanced Member

  • Member
  • PipPipPip
  • 701 posts

Posted 29 October 2018 - 04:48 AM

Its not odd, because thats the way how the TDM-updater works.

Nice to know that TDM runs on your system.
And alt-tabbing in a linux distro is a known problem.

Edited by freyk, 29 October 2018 - 04:54 AM.

  • Abusimplea likes this





Also tagged with one or more of these keywords: installation, updater, 64-bit, 32-bit

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users