PDA

View Full Version : HOWTO: Install and setup Wolfenstein Enemy Territory


tangram
May 5th, 2009, 13:33
Wolfenstein: Enemy Territory is a free multiplayer FPS that takes place in the World World II pitting two teams (Allies and Axis) against each other for victory.

The game was originally going to be a retail expansion pack for Return To Castle Wolfenstein but the project was canceled, Activision however decided to release it during 2003 for free.

In this post I'll detail the steps required to install and update Enemy Territory, the ET Pro mod, PunkBuster and XQF on FreeBSD.

1) Install and update Enemy Territory

Become the superuser:

% su

And install the required port:

# cd /usr/ports/games/linux-enemyterritory
# make install clean

This will pull Enemy Territory's installer from the web. If any port options pop up stick with the defaults and choose OK to continue.

If you don't have the Linux Compatibility Environment proceed to step 2, otherwise jump to step 3.

2) Enable the Linux Compatibility Environment

Enemy Territory needs both FreeBSD's Linux kernel module and near-minimal installation of a Linux distribution. By default, FreeBSD 7.x uses Fedora Core Linux 4.

The games/linux-enemyterritory pulls in emulators/linux_base-fc4 so we just need to load the Linux kernel module at boot time. To do so run:

# echo 'linux_enable="YES"' >> /etc/rc.conf

3) Fixing library issues

It was verified that at times library issue crop up upon starting the game.

To check if you have a library issue run:

# ldd /usr/local/lib/enemyterritory/et.x86

If the output is:

# ldd /usr/local/lib/enemyterritory/et.x86
/usr/local/lib/enemyterritory/et.x86:
libdl.so.2 => /lib/libdl.so.2 (0x281e4000)
libX11.so.6 => not found
libXext.so.6 => not found
libm.so.6 => /lib/obsolete/linuxthreads/libm.so.6 (0x281e9000)
libc.so.6 => /lib/obsolete/linuxthreads/libc.so.6 (0x2820f000)
/lib/ld-linux.so.2 (0x281c7000)

You have library issues and need to install x11/linux-xorg-libs:

# cd /usr/ports/x11/linux-xorg-libs ; make install clean

Re-run ldd and you should have the following output:

# ldd /usr/local/lib/enemyterritory/et.x86
/usr/local/lib/enemyterritory/et.x86:
libdl.so.2 => /lib/libdl.so.2 (0x281e6000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x281eb000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x282be000)
libm.so.6 => /lib/obsolete/linuxthreads/libm.so.6 (0x282cd000)
libc.so.6 => /lib/obsolete/linuxthreads/libc.so.6 (0x282f3000)
/lib/ld-linux.so.2 (0x281c7000)

4) Install the ET Pro mod

Next let's install Enemy Territory's best mod: ET Pro.

# cd /usr/ports/games/linux-enemyterritory-etpro
# make install clean

Now ET Pro will show under the Mods options in the games' main menu.

5) Update PunkBuster

Now start the game, create a player profile and quit. By doing so a .etwolf directory will be created in your home directory which includes a folder containing PunkBuster.

Point to http://www.evenbalance.com/index.php?page=pbsetup.php scroll down and follow the Linux download to download PunkBuster update application.

Change directory to where you've downloaded the pbsetup.run and:

# su
# chmod +x pbsetup.run
# exit
% cp pbsetup.run ~/.etwolf/pb
% ./pbsetup.run

PunkBuster will ask to fetch updates and prompt for a License Agreement. Afterwards point to "Add a Game option", choose Enemy Territory and its installation path.

On the main PunkBuster window click on Enemy Territory to select it and press "Check for Updates". Quit PunkBuster after updating it.

6) Install XQF

One can use the in game browser to search for server. However I recommend installing and using the XQF Game Server Browser as it a lot more flexible and complete:

# cd /usr/ports/games/xqf
# make install clean

XQF should identify the installed Enemy Territory so select the game and press "Update" to have XQF pull an updated server list.

7) Fix sound issues

ET uses Linux's OSS sound infrastructure so you might come across issues. Here's how to enable sound on Enemy Territory under FreeBSD 7.x:

% su
# sysctl hw.snd.compat_linux_mmap=1
# echo "hw.snd.compat_linux_mmap=1" >> /etc/sysctl.conf
# exit

With the above commands sound will be enabled immediately and also at boot time.

And we're done!

(The above HOWTO is a copy of my blog post (http://linux-bsd-sharing.blogspot.com/2009/05/howto-enemy-territory-on-freebsd.html))

neurosis
June 1st, 2009, 14:57
Can anyone tell me why when I try to launch et I get the following error?

et
./et.x86: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

I love the writeup! I just cant seem to get past this error. I am running FreeBSD 7.2-RELEASE

ale
June 1st, 2009, 15:09
Can anyone tell me why when I try to launch et I get the following error?

et
./et.x86: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

I love the writeup! I just cant seem to get past this error. I am running FreeBSD 7.2-RELEASE

What is the brand of your gpu?
If nvidia, are you using a linux_base different than fc4 and/or compat.linux.osrelease > than 2.4.2?

tangram
June 1st, 2009, 15:22
Can anyone tell me why when I try to launch et I get the following error?

et
./et.x86: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

I love the writeup! I just cant seem to get past this error. I am running FreeBSD 7.2-RELEASE

I've also ran into this issue once. At the time I rebuild all my ports through portmaster -af and didn't pin point the exact source of the issue.

Mind you that I use linux_base-fc4.

ale
June 1st, 2009, 15:40
@tangram
Do you have x11/linux-xorg-libs installed

tangram
June 1st, 2009, 16:48
V51!

(That means yes in Enemy Territory speak :D)

ale
June 1st, 2009, 17:02
And do you have /usr/compat/linux/usr/X11R6/lib/libX11.so.6 ?

tangram
June 1st, 2009, 17:20
ldd /usr/local/lib/enemyterritory/et.x86:
/usr/local/lib/enemyterritory/et.x86:
libdl.so.2 => /lib/libdl.so.2 (0x281e6000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x281eb000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x282be000)
libm.so.6 => /lib/obsolete/linuxthreads/libm.so.6 (0x282cd000)
libc.so.6 => /lib/obsolete/linuxthreads/libc.so.6 (0x282f3000)
/lib/ld-linux.so.2 (0x281c7000)


locate libX11.so.6:
/usr/compat/linux/usr/X11R6/lib/libX11.so.6
/usr/compat/linux/usr/X11R6/lib/libX11.so.6.2
/usr/local/lib/libX11.so.6

ls -l /usr/compat/linux/usr/X11R6/lib/libX11*:

lrwxrwxrwx 1 root wheel 13 Apr 2 12:37 /usr/compat/linux/usr/X11R6/lib/libX11.so.6@ -> libX11.so.6.2
-rwxr-xr-x 1 root wheel 862428 Apr 2 12:37 /usr/compat/linux/usr/X11R6/lib/libX11.so.6.2*



@ neurosis

Run the same commands and post the results.

ale
June 1st, 2009, 18:02
@tangram
maybe there was a misunderstanding...is et working for you?

tangram
June 1st, 2009, 18:17
Of course it is (else I wouldn't post the HOWTO).

I did say that I once ran into the same problem and that I've since fixed it. At the time I fixed it by running portmaster -af (yeah... I killed the fly with a cannon) and ET is running ever since.

The commands I've posted should help neurosis troubleshooting ;).

ale
June 1st, 2009, 18:27
Of course it is (else I wouldn't post the HOWTO).Gosh, sorry!
I got confused twice. Probably I'm doing too many things together.

neurosis
June 2nd, 2009, 00:22
# ldd /usr/local/lib/enemyterritory/et.x86
/usr/local/lib/enemyterritory/et.x86:
libdl.so.2 => /lib/libdl.so.2 (0x281e4000)
libX11.so.6 => not found
libXext.so.6 => not found
libm.so.6 => /lib/obsolete/linuxthreads/libm.so.6 (0x281e9000)
libc.so.6 => /lib/obsolete/linuxthreads/libc.so.6 (0x2820f000)
/lib/ld-linux.so.2 (0x281c7000)


# locate libX11.so.6
/usr/jails/web/usr/local/lib/libX11.so.6



# ls -l /usr/compat/linux/usr/X11R6/lib/libX11*
ls: /usr/compat/linux/usr/X11R6/lib/libX11*: No such file or directory


# pkg_info |grep linux_base
linux_base-fc-4_14 Base set of packages needed in Linux mode (for i386/amd64)


I see my issue must be in there somewhere. missing directory. I will look back later. I am pressed for time right at the moment.

ale
June 2nd, 2009, 00:48
Do you have x11/linux-xorg-libs installed ?

neurosis
June 2nd, 2009, 01:44
I installed the linux-xorg libs and et tries to start now. But now I get this error.

...loading libGL.so.1: Initializing OpenGL display
...setting mode 4: 800 600
Using XFree86-VidModeExtension Version 2.2
XF86DGA Mouse (Version 2.0) initialized
XFree86-VidModeExtension Activated at 800x600
Using 8/8/8 Color bits, 24 depth, 0 stencil display.
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 155
Minor opcode of failed request: 5
Serial number of failed request: 48
ERROR: couldn't create font (glGenLists)
GL_RENDERER: (null)
----- CL_Shutdown -----
RE_Shutdown( 1 )
-----------------------
----- CL_Shutdown -----
-----------------------
Sys_Error: Q_strncpyz: NULL src

Then it locks my screen in to a bad resolution.

:(

ale
June 2nd, 2009, 01:51
Do you have Load "glx" in /etc/X11/xorg.conf, in the Section "Module" part?
What is the brand of your gpu?
What is the output of glxinfo | grep vendor and glxinfo | grep render ?

neurosis
June 2nd, 2009, 02:06
I have the glx line in my xorg.conf

My gpu is nvidia. I am running the nvidia drivers "i believe" not sure how to make sure but I have the line
Driver "nvidia"

in my xorg.conf as well. There is no splash screen as I am used to seeing however.

I have no command glxinfo.. I get command now found.

ale
June 2nd, 2009, 02:28
Can you try starting X with startx -- -logverbose 6 and add as attachment /var/log/Xorg.0.log ?

neurosis
June 2nd, 2009, 04:22
Ok... here it is. It was very big so I had to archive it.

ale
June 2nd, 2009, 04:38
This could be a problem:(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions//libglx.so
(II) Module glx: vendor="X.Org Foundation"
compiled for 1.6.1, module version = 1.0.0
ABI class: X.Org Server Extension, version 2.0
(==) AIGLX disabledIf you installed the nvidia driver, the vendor should be NVIDIA.
In fact you have an error about that.

Maybe your driver is not correctly installed and/or your xorg.conf is not configured correctly.
I'd try removing the driver with kldunload nvidia && pkg_delete -ix nvidia-driver and reinstalling again with cd /usr/ports/x11/nvidia-driver && make install clean && kldload nvidia.

Then read
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-04-section-02.html
to check is xorg.conf is configured correctly or install and run x11/nvidia-xconfig.

neurosis
June 2nd, 2009, 04:53
I installed the nvidia driver from nvidia's site. Is it as simple to remove? Ive tried to remove it in the past with no luck unfortunately as I dont believe it comes with an uninstall option.

ale
June 2nd, 2009, 04:59
This is IMHO, one of the reasons why the port should be used.
If you want to remove it, try looking at this thread.
Maybe another option could be reinstalling the same version again.

@tangram
sorry for polluting you howto with posts about xorg and driver configuration, hopefully a moderator could help moving them to a new thread

neurosis
June 2nd, 2009, 05:10
yes.. very sorry as well. maybe if someone has this issue they can find it useful.

(I figured this part out ;))

Can we move this conversation somewhere else? Maybe to that other thread?

tangram
June 2nd, 2009, 09:40
@ale
No problem. We just need to solve this issue. It also happened to me a few months ago, now to neurosis and on the PC-BSD forum there are some posts stating the same kind of problems.

But yeah... hopefully a moderator can move slice and dice this thread ;).

@neurosis
That crash on ET as it starts up is most likely due to graphic drivers not being well installed. Try to deinstall NVIDIA's drivers and reinstall. There's an HOWTO on this forum subsection.

tangram
June 4th, 2009, 13:02
I've just installed a fresh copy of FreeBSD with the X distribution to simulate the problem.

I've started with pkg_add -r linux-enemyterritory, enabled Linux compatibility layer and ran ldd /usr/local/lib/enemyterritory/et.x86 which gave me the same results as neurosis.

A simple pkg_add -r linux-xorg-libs fixed the library problem.

neurosis
June 4th, 2009, 17:18
Thanks tangram and ale! I Was able to get it working! I found that I did have a very bad Nvidia driver install and they were not working properly. The driver was difficult to get rid of but is working now.

Tangram, I found the same. Once I installed the linux-xorg-libs the issue of the missing library went away. Maybe that should be added to the HOWTO. :) Ive installed ET in past versions of FreeBSD and did not have this same issue. I am not sure what has changed.

Thanks again. Too bad we cant get a moderator to clean the fat out of this thread now. Sorry for making a mess in here.

DutchDaemon
June 4th, 2009, 17:25
Who says 'we can't'? Can't remember you or anyone else asking.

If Tangram and Ale agree, I will simply cut off everything below the orginal HOWTO. Or move it off to a separate thread.

tangram
June 4th, 2009, 17:58
I'll update the HOWTO referring the possible issue.

As for for the thread... I don't see much of a problem to let it be as it is. Maybe someone will appreciate the troubleshooting ;)

dennylin93
July 4th, 2009, 14:39
Point to http://www.evenbalance.com/index.php?page=pbsetup.php scroll down and follow the Linux download to download PunkBuster update application.


Should I download the GUI version or the command-line one?

ale
July 5th, 2009, 02:00
The command-line one should be fine.

ale
July 5th, 2009, 02:06
@tangram
A suggestion...
even if it's not caused by the et port, you could add an update about the problem using nvidia-driver with a linux_base > fc4

tangram
July 6th, 2009, 10:22
Should I download the GUI version or the command-line one?

I usually use the GUI version. But it should work with the command line version also.

tangram
July 6th, 2009, 10:27
@tangram
A suggestion...
even if it's not caused by the et port, you could add an update about the problem using nvidia-driver with a linux_base > fc4

I still use linux_base-fc4 so I haven't come across any issues. What does happen exactly?

ale
July 6th, 2009, 11:27
It doesn't work! I've tested it since linux_base-fc6 was commited in the ports tree.
About a month ago, after some discussions in the freebsd-bugs ml and a thread in the nv forum, a temporary solution was found.
The solution is to download the linux driver. The version has to be the same of the installed FreeBSD driver. For example, I have nvidia-driver-180.60 installed from ports, so I had to download NVIDIA-Linux-x86-180.60-pkg0.run
Then the linux driver should be unpacked somewhere.
Once done, /compat/linux/usr/lib/libnvidia-tls.so.180.60 should be replaced with NVIDIA-Linux-x86-180.60-pkg0/usr/lib/tls/libnvidia-tls.so.180.60 from the dir where the linux driver has been unpacked.
Nvidia said that they will ship a driver that install the correct version of the library. In the meanwhile, this is the solution.
I've tested it on CURRENT, where I had linux_base-f9 and now linux_base-f10.

Again, this is not an et problem, it's an Nvidia one. You can see the same using rtcw or other linux-games.

tangram
July 6th, 2009, 11:39
I wasn't aware of that problem. Hope they fix the driver in time for the forthcoming FreeBSD 8.0 ports freeze.