Jump to content
The Dark Mod Forums

test build for linux with glew.


revelator

Recommended Posts

$ ./thedarkmod.x86
./thedarkmod.x86: error while loading shared libraries: libGLEW.so.1.10: cannot open shared object file: No such file or directory

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

$ ./thedarkmod.x86
./thedarkmod.x86: error while loading shared libraries: libGLEW.so.1.10: cannot open shared object file: No such file or directory

 

ldd says this:

 

$ ldd thedarkmod.x86
./thedarkmod.x86: /lib32/libm.so.6: version `GLIBC_2.15' not found (required by ./thedarkmod.x86)
./thedarkmod.x86: /lib32/libc.so.6: version `GLIBC_2.15' not found (required by ./thedarkmod.x86)
    linux-gate.so.1 =>  (0xf77aa000)
    libpthread.so.0 => /lib32/libpthread.so.0 (0xf7763000)
    libdl.so.2 => /lib32/libdl.so.2 (0xf775f000)
    librt.so.1 => /lib32/librt.so.1 (0xf7755000)
    libpng12.so.0 => /lib32/libpng12.so.0 (0xf7730000)
    libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7613000)
    libXext.so.6 => /usr/lib32/libXext.so.6 (0xf7603000)
    libXxf86vm.so.1 => /usr/lib32/libXxf86vm.so.1 (0xf75fd000)
    libGL.so.1 => /usr/lib32/nvidia-current/libGL.so.1 (0xf7537000)
    libGLEW.so.1.10 => not found
    libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7442000)
    libm.so.6 => /lib32/libm.so.6 (0xf741c000)
    libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf73fd000)
    libc.so.6 => /lib32/libc.so.6 (0xf729a000)
    /lib/ld-linux.so.2 (0xf77ab000)
    libz.so.1 => /usr/lib32/libz.so.1 (0xf7284000)
    libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf726a000)
    libGLcore.so.1 => /usr/lib32/nvidia-current/libGLcore.so.1 (0xf5c5a000)
    libnvidia-tls.so.1 => /usr/lib32/nvidia-current/tls/libnvidia-tls.so.1 (0xf5c58000)
    libXau.so.6 => /usr/lib32/libXau.so.6 (0xf5c54000)
    libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf5c4d000)

 

But I only got:

 

$ dir /usr/lib32/libGL
libGLEW.so.1.5	    libGLEW.so.1.5.0	  libGL.so			  libGLU.so			 libGLU.so.1		   libGLU.so.1.3.070701 
$ dir /usr/lib32/libGLEW.so.1.5
lrwxrwxrwx 1 root root 16 2008-12-29 15:27 /usr/lib32/libGLEW.so.1.5 -> libGLEW.so.1.5.0

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I'm using Kubuntu 10.4 (yes, its that old). And libglew1.10-dev isn't available:

 

$ aptitude search libglew
v   libglew-dev			 -
c   libglew1				 - The OpenGL Extension Wrangler - runtime environment
i   libglew1.5			   - The OpenGL Extension Wrangler - runtime environment
i   libglew1.5-dev		- The OpenGL Extension Wrangler - development environment
v   libglewmx-dev		-
p   libglewmx1.5		  - The OpenGL Extension Wrangler - runtime environment
p   libglewmx1.5-dev   - The OpenGL Extension Wrangler - development environment

Edited by Tels

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Hmm damn then you have to build it yourself :S well should be pretty straight forward libglew itself is just 1 file glew.c

 

for others with a newer version heres a script to get dependencies.

 

#!/bin/bash
# get build depends
sudo apt-get install g++ scons libglew1.10-dev libglew1.10-dev:i386 libpng12-dev libpng12-dev:i386 libjpeg62-dev libjpeg62-dev:i386
sudo apt-get install m4 libxxf86vm-dev libxxf86vm-dev:i386 libopenal-dev libopenal-dev:i386 libasound2-dev libasound2-dev:i386 g++-multilib gcc-multilib zlib1g-dev zlib1g-dev:i386 libxext-dev libxext-dev:i386

 

save as get-depends.sh and run it like this, sudo sh get-depends.sh

Link to comment
Share on other sites

ok for your old version of kubuntu get the glew source code here https://sourceforge.net/projects/glew/files/glew/1.11.0/glew-1.11.0.tgz/download and cd into where you unpacked it.

i made a makefile to create the 32 bit version on 64 bit ubuntu just replace the one in the glew source dir with this one http://sourceforge.n...lew.7z/download

Then just do

make

sudo -s

make install

make clean

Edited by revelator
Link to comment
Share on other sites

Just a stupid question: Why don't we compile GLEW in, if it is only one file and has so wildy different versions among the different OS people use? Wouldn't that solve the problemwith linking it?

 

(Sure, we would be stuck with one version, but then, TDM is released frequently and also there is no need to update GLEW inside TDM).

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

could do that but i would have to write the build process into scons and i would have to reorder some things so that glew is part of the build process, much like its done with devil or libjpeg.

This might take a while to write and atm im more curious as to if the thing actually works :) if it does ill have no objection starting to rewrite stuff if not i would have wasted a good deal of hours.

Ofc i hope it works but you newer know :)

Link to comment
Share on other sites

Guys thanks for doing this, we have garnered a few more players because they can play on linux.

 

Is this linux build based on the current 2.03 SVN or Revelators branch build..?

 

On revelators. The 2.03 SVN compiles just fine on my box and I also test it.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Still has a few problems on older ubuntu like teis i suspect, working on doing glew as part of the build process and works here but may pick up the wrong library if you allready have glew installed.

Unfortunatly its hard to take every little thing into account on different distros and more work may be needed before we can call it a day.

Still it helps if you know the innards of a posix system and how to get the things you need :).

Link to comment
Share on other sites

Another way to get around the differing versions would be to simply remove the glew headers from darkmod's scons build chain so that it uses the system supplied version, that way it should work by just installing the glew version supported on your distro. you could simply delete them from the darkmod include dir and it should use the system provided ones.

Link to comment
Share on other sites

Final changes comitted.

Allways uses system glew on linux now.

Attempts to link statically to system glew.

changed include path from the local glew/glew.h to the system include directory GL/glew.h.

changed include path from the local glew/glxew.h to the system include directory GL/glxew.h.

scons build scripts modified accordingly.

 

So allways get the latest possible glew version for your distro from your package maintainer.

Also remember the other dependencies, you can use my get-depends.sh for that.

Edited by revelator
Link to comment
Share on other sites

Testing...

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

It still doesn't link the game executable:

 

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libGLEW.so when searching for -lGLEW
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libGLEW.a when searching for -lGLEW
/usr/bin/ld: skipping incompatible /usr/lib/libGLEW.so when searching for -lGLEW
/usr/bin/ld: skipping incompatible /usr/lib/libGLEW.a when searching for -lGLEW

 

The reason here is that I'm on a 64bit system, but we are buildind a 32 bit executable, so it must use /usr/lib32/ and only /usr/lib/ as fallback. I wonder why this works for other libraries, but not GLEW.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

might be missing the x86 version or if you got it something might have acted up in the package installer ? try sudo apt-get -f install without any packages to let apt-get try to autocorrect problems.

 

No, the linker looks into "/usr/lib" - but on a 64bit system there is the 64bit variant there. The 32bit variant is in /usr/lib32/ - and so I think that scons just has not the right path or setting for this library.

 

For other libraries, the right version is in /usr/lib32/, too and this works. Just not for GLEW.

Edited by Tels

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Allready works for windows :) just having a few problems with paths on the linux distros,

glew is also located in /usr/lib32 on my 64 bit kubuntu and it does get picked up on my 64 bit kubuntu so not sure whats going wrong on your version :S

the only problem i ran into was that the system supplied zlib version of my kubuntu 64 was incompatible with the devil version in darkmod so i had to move it out of the way when building so that it picks up the version from darkmod instead.

 

im going to look into scons looking in the wrong place, hang on.

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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 5 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...