Tremulous Forum

General => Troubleshooting => Topic started by: d81 on July 18, 2009, 01:50:41 am

Title: Odd error after installing TJW backport
Post by: d81 on July 18, 2009, 01:50:41 am
I installed Trem on my new Ubuntu Jaunty machine through Synaptic.
I got the TJW backport and put it in the right place (like last time, like always...) but this time I am getting an odd error:

Code: [Select]
d81@deck:/usr/lib/tremulous$ ls
tremulous  tremulous.old
d81@deck:/usr/lib/tremulous$ tremulous
exec: 32: /usr/lib/tremulous/tremulous: not found

What's up? Trem runs fine when I use the stock installation from Synaptic. Complete un/re-installs (manual and automated alike) give me the same result every time.
Title: Re: Odd error after installing TJW backport
Post by: Archangel on July 18, 2009, 01:58:48 am
chmod +x tremulous
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 18, 2009, 02:22:05 am
I did that. I have used both the command line (chmod) and the gui (via gksu nautilus command).

Code: [Select]
d81@deck:/usr/lib/tremulous$ sudo chmod +x tremulous
[sudo] password for d81:
d81@deck:/usr/lib/tremulous$ tremulous
exec: 32: /usr/lib/tremulous/tremulous: not found
d81@deck:/usr/lib/tremulous$
Title: Re: Odd error after installing TJW backport
Post by: David on July 18, 2009, 02:37:23 pm
Does the filename have a space or anything attached to it?
Try deleting and recreating it, and also see if directly running /usr/lib/tremulous/tremulous works.
Also do you have permission to run it?
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 18, 2009, 02:54:37 pm
I recreated the file from scratch:

Code: [Select]
d81@deck:/$ cd usr/lib/tremulous
d81@deck:/usr/lib/tremulous$ ls
tremulous
d81@deck:/usr/lib/tremulous$ sudo mv tremulous tremulous.old
d81@deck:/usr/lib/tremulous$ sudo cp /home/d81/Desktop/tremulous.x86 tremulous
d81@deck:/usr/lib/tremulous$ ls
tremulous  tremulous.old
d81@deck:/usr/lib/tremulous$ sudo chmod a+x tremulous
d81@deck:/usr/lib/tremulous$ ls
tremulous  tremulous.old
d81@deck:/usr/lib/tremulous$ tremulous
exec: 32: /usr/lib/tremulous/tremulous: not found
d81@deck:/usr/lib/tremulous$
d81@deck:/usr/lib/tremulous$ /usr/lib/tremulous/tremulous
bash: /usr/lib/tremulous/tremulous: No such file or directory
d81@deck:/usr/lib/tremulous$
Title: Re: Odd error after installing TJW backport
Post by: David on July 18, 2009, 03:40:03 pm
try chmod a+rx tremulous.
Title: Re: Odd error after installing TJW backport
Post by: Bissig on July 18, 2009, 07:47:26 pm
Isn't he running the command in the user home since he only uses sudo?

So, if he doesn't use ./ he will not execute the command chmod in the current directory.

@d81

Please use ls with the ls -l option

ls -l ./

in the dir:

/usr/lib/tremulous
Title: Re: Odd error after installing TJW backport
Post by: Archangel on July 19, 2009, 12:25:24 am
Isn't he running the command in the user home since he only uses sudo?

So, if he doesn't use ./ he will not execute the command chmod in the current directory.

@d81

Please use ls with the ls -l option

ls -l ./

in the dir:

/usr/lib/tremulous

no, sudo temporarily grants root privs to your user in the current working directory. you're thinking of sudo su - which spawns an actual root `login shell'.
there is absolutely no need to use ls -l ./, the ./ is entirely extraneous

run cat /usr/bin/tremulous, and post it here. it also might be incorrect permissions as stated by david. try sudo chmod 755 tremulous (which gives world readable/executable bits)
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 19, 2009, 06:33:17 am
Thanks for the continued help! Here's the output:

Code: [Select]
d81@deck:~$ cat /usr/bin/tremulous
cat: /usr/bin/tremulous: No such file or directory
d81@deck:~$ sudo cat /usr/bin/tremulous
[sudo] password for d81:
cat: /usr/bin/tremulous: No such file or directory
d81@deck:~$ cd ..
d81@deck:/home$ cd ..
d81@deck:/$ cd usr/lib/tremulous
d81@deck:/usr/lib/tremulous$ ls
tremulous  tremulous.old
d81@deck:/usr/lib/tremulous$ cat /usr/bin/tremulous
cat: /usr/bin/tremulous: No such file or directory
d81@deck:/usr/lib/tremulous$

And

Code: [Select]
d81@deck:/usr/lib/tremulous$ sudo chmod 755 tremulous
d81@deck:/usr/lib/tremulous$ tremulous
exec: 32: /usr/lib/tremulous/tremulous: not found
d81@deck:/usr/lib/tremulous$
Title: Re: Odd error after installing TJW backport
Post by: gimhael on July 19, 2009, 07:40:12 am
It could be a bad symlink, do ls -l /usr/bin/tremulous to see if it is a symlink and then check that the link target exists.
Title: Re: Odd error after installing TJW backport
Post by: David on July 19, 2009, 01:56:54 pm
it's not a symlink, it's a script that calls it via exec on line 32.
Title: Re: Odd error after installing TJW backport
Post by: Amanieu on July 19, 2009, 02:03:43 pm
Code: [Select]
cat `which tremulous`
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 19, 2009, 03:31:45 pm
This is getting weird. It's like I copied a ghost into that folder that I can see but the computer cannot!

Code: [Select]
d81@deck:/usr/lib/tremulous$ cat `which tremulous`
#!/bin/sh

BINARY="/usr/lib/tremulous/tremulous"
BASE_PATH="/usr/share/games/tremulous"
QUIET=0

# Tremulous binaries don't understand "regular" command line parameters. Let's
# catch them here, to avoid accidently launching the binary.

while [ "$1" != "" ]; do {
if [ "$1" = "+set" -o "$1" = "+connect" ]; then
break;
fi
case "$1" in
-h|--help)
echo -e ${EXCUSE}
exit 0
;;
-q|--quiet)
QUIET=1
;;
esac
shift
}; done

# Ready to rumble!

if [ ${QUIET} -eq 1 ]; then
exec ${BINARY} +set fs_basepath ${BASE_PATH} +set ttycon 0 $* >/dev/null 2>&1
else
exec ${BINARY} +set fs_basepath ${BASE_PATH} $*
fi

exit $?
d81@deck:/usr/lib/tremulous$

and

Code: [Select]
d81@deck:/usr/lib/tremulous$ ls -l /usr/lib/tremulous
total 2996
-rwxr-xr-x 1 root root 1361996 2009-07-18 10:09 tremulous
-rwxr-xr-x 1 root root 1694840 2008-09-06 11:57 tremulous.old
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 19, 2009, 04:27:57 pm
Ok, so line 32 (from the result of cat 'which tremulous') is this:
(line 32)  exec ${BINARY} +set fs_basepath ${BASE_PATH} $*

And BASE_PATH is set earlier like this:
BASE_PATH="/usr/share/games/tremulous"

And when I follow that "base path" I find that there is a folder called "base" in that path:
d81@deck:/usr/share/games/tremulous$ ls
base

So.
Title: Re: Odd error after installing TJW backport
Post by: gimhael on July 19, 2009, 05:03:24 pm
-rwxr-xr-x 1 root root 1694840 2008-09-06 11:57 tremulous.old

Hmm, that looks exactly like the size of the amd64 binary on my Ubuntu box, do you have all the required libs installed to run the 32 bit binary ?
Try "ldd /usr/lib/tremulous/tremulous" or install a 64-bit client.
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 19, 2009, 05:22:41 pm
I my executable came from http://trem.tjw.org/backport/linux/ and I renamed it from temulous.x86 to just tremulous. The tremulous.old is the default, outdated executable.

Code: [Select]
d81@deck:/usr/lib/tremulous$ ldd /usr/lib/tremulous/tremulous
not a dynamic executable
Title: Re: Odd error after installing TJW backport
Post by: David on July 19, 2009, 05:27:19 pm
Maybe try a more up to date client, like: http://releases.mercenariesguild.net/client/
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 19, 2009, 06:11:04 pm
Why wouldn't cut/paste work on TJW? It should be so simple! I am skeptical...
Title: Re: Odd error after installing TJW backport
Post by: gimhael on July 19, 2009, 07:07:06 pm
aptitude install ia32-libs-sdl
Title: Re: Odd error after installing TJW backport
Post by: David on July 19, 2009, 07:09:07 pm
Surely if it was a libs problem then it would have a different error?  And ldd would have recognised it?

And I suggested a different client as I'm all out of other ideas.
Title: Re: Odd error after installing TJW backport
Post by: kevlarman on July 19, 2009, 07:17:30 pm
Code: [Select]
bash-4.0$ ldd tremulous.x86
not a dynamic executable
bash-4.0$ ldd32 tremulous.x86
linux-gate.so.1 =>  (0xf7f7c000)
libSDL-1.2.so.0 => /opt/lib32/usr/lib/libSDL-1.2.so.0 (0xf7ec2000)
libpthread.so.0 => /opt/lib32/lib/libpthread.so.0 (0xf7ea9000)
libdl.so.2 => /opt/lib32/lib/libdl.so.2 (0xf7ea5000)
libm.so.6 => /opt/lib32/lib/libm.so.6 (0xf7e7f000)
libc.so.6 => /opt/lib32/lib/libc.so.6 (0xf7d39000)
/lib/ld-linux.so.2 (0xf7f7d000)
64 bit ldd doesn't produce sane output for elf32 binaries. you'll need to install 32 bit libsdl and libgl or use the client davidsev linked
Title: Re: Odd error after installing TJW backport
Post by: d81 on July 20, 2009, 01:37:56 am
The MG client worked. I have no idea why, or why TJW didn't, but oh well. Thanks for all your help!