1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HOWTO: Install and setup Wolfenstein Enemy Territory

Discussion in 'Howtos and FAQs (Moderated)' started by tangram, May 5, 2009.

  1. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    65
    Update 26/03/2012:
    Step 3 is no longer required as the port as a specific dependency on linux-f10-xorg-libs.
    Update 25/05/2012:
    Ever since EvenBalance stopped supporting Enemy Territory step 5 should be ignored. Please refer to HowTo: Get etkey and Punbuster files on Enemy Territory.
    ________________________________________________________________________

    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:

    Code:
    % su


    And install the required port:

    Code:
    # 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:

    Code:
    # 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:

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


    If the output is:

    Code:
    # 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:

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


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

    Code:
    # 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.

    Code:
    # 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:

    Code:
    # 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:

    Code:
    # 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:

    Code:
    % 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)
     
    neurosis and lme@ thanked for this.
  2. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    Can anyone tell me why when I try to launch et I get the following error?

    Code:
     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
     
  3. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    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?
     
    neurosis thanks for this.
  4. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    65
    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.
     
  5. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    @tangram
    Do you have x11/linux-xorg-libs installed
     
  6. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    65
    V51!

    (That means yes in Enemy Territory speak :D)
     
  7. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    And do you have /usr/compat/linux/usr/X11R6/lib/libX11.so.6 ?
     
  8. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    65
    % ldd /usr/local/lib/enemyterritory/et.x86:
    Code:
    /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:
    Code:
    /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*:
    Code:
    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.
     
  9. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    @tangram
    maybe there was a misunderstanding...is et working for you?
     
  10. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    65
    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 ;).
     
  11. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    Gosh, sorry!
    I got confused twice. Probably I'm doing too many things together.
     
  12. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    Code:
    # 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)



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




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


    Code:
    # 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.
     
  13. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    Do you have x11/linux-xorg-libs installed ?
     
  14. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    I installed the linux-xorg libs and et tries to start now. But now I get this error.

    Code:
    ...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.

    :(
     
  15. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    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 ?
     
  16. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    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.
     
  17. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    Can you try starting X with $ startx -- -logverbose 6 and add as attachment /var/log/Xorg.0.log ?
     
  18. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    Ok... here it is. It was very big so I had to archive it.
     

    Attached Files:

  19. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    This could be a problem:
    Code:
    (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 disabled
    If 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.
     
  20. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    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.
     
  21. ale

    ale New Member

    Messages:
    1,059
    Thanks Received:
    156
    This is IMHO, one of the reasons why the port should be used.
    If you want to remove it, try looking at [thread=2171]this thread[/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
     
  22. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    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?
     
  23. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    65
    @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.
     
  24. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    65
    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.
     
  25. neurosis

    neurosis New Member

    Messages:
    66
    Thanks Received:
    0
    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.