Page 1 of 2 12 LastLast
Results 1 to 10 of 42

Thread: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop.

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    United Kingdom
    Beans
    138
    Distro
    Kubuntu 13.04 Raring Ringtail

    HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop.

    HOWTO (incomplete): Compile Xgl from the freedesktop.org CVS to run with your current Xorg libraries.

    This is my first ever howto, so any feedback will be welcome.

    This was not done on a clean Ubuntu install. I am busy installing Ubuntu Breezy in VMWare to set it all up there, then I should have all the deps listed here.

    ------------------------

    First, in order to build xserver, you are going to need the following dependencies:

    Code:
    build-essential
    m4
    autoconf
    automake-1.9
    autotools-dev
    libtool
    
    libx11-dev
    libxau-dev
    libxext-dev
    libxi-dev
    
    libxfont1
    
    
    x11proto-core-dev
    x11proto-input-dev
    x11proto-kb-dev
    x11proto-xext-dev
    x11proto-randr-dev
    x11proto-render-dev
    x11proto-fixes-dev
    x11proto-damage-dev
    x11proto-fonts-dev
    x11proto-composite-dev
    x11proto-resource-dev
    x11proto-record-dev
    
    x11proto-bigreqs-dev
    x11proto-xcmisc-dev
    x11proto-video-dev
    x11proto-scrnsaver-dev
    
    x11proto-gl-dev
    x11proto-trap-dev
    x11proto-xinerama-dev
    
    libxfont-dev
    xtrans-dev
    
    
    libxrandr-dev
    libxrender-dev
    libxfixes-dev
    libxdamage-dev
    libxext-dev
    libxres-dev
    
    libxdmcp-dev
    
    libfreetype6-dev
    zlib1g-dev
    
    libgl1-mesa-dev
    I am not sure if this list is complete, or if there are unrequired deps on there. As I said, I am not currently on a clean system, but I am bust setting one up. I'll update the list as soon as I can.

    You should be able to install all of this by running the command
    Code:
    sudo apt-get install build-essential m4 autoconf automake-1.9 autotools-dev libtool libx11-dev libxau-dev libxext-dev libxi-dev libxfont1 x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev x11proto-randr-dev x11proto-render-dev x11proto-fixes-dev x11proto-damage-dev x11proto-fonts-dev x11proto-composite-dev x11proto-resource-dev x11proto-record-dev x11proto-bigreqs-dev x11proto-xcmisc-dev x11proto-video-dev x11proto-scrnsaver-dev x11proto-gl-dev x11proto-trap-dev x11proto-xinerama-dev libxfont-dev xtrans-dev libxrandr-dev libxrender-dev libxfixes-dev libxdamage-dev libxext-dev libxres-dev libxdmcp-dev libfreetype6-dev zlib1g-dev libgl1-mesa-dev
    If you require deps not listed there, post the error here and I will tell you what to get. Or, if you know what you need, just post the dep here.

    The next requirement is a package called glitz. The version in the breezy repos is too old, so we need to fetch the CVS source from freedesktop.org and build that:

    Code:
    $ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co glitz glitzinfo
    $ cd glitz
    $ ./autogen.sh
    $ make
    $ sudo make install
    $ cd ../glitzinfo
    $ make -f Makefile.glx
    $ ./glitzinfo
    $ cd ..
    Run glitzinfo. Its not required by anything, but it gives you info on available features:
    glitzinfo should report some info about available features, drawable formats and surface formats. The following set of features are important and if one of them is missing it is likely that it will give you performance problems.

    Code:
    texture rectangle
    texture border clamp
    multitexture
    texture environment combine
    Now we can start with the actual xserver package that provides Xgl. Again we fetch the source from freedesktop.org CVS:

    Code:
    $ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xserver co xserver
    $ cd xserver
    $ ./autogen.sh --enable-xglserver --enable-xglxserver
    $ make
    NOTE: There is no "sudo make install" because if you install this, it will most probably break the xserver from the breezy repos, stopping your normal X from running.

    You can give autogen.sh the "--prefix=/some/path" flag, which will make the "sudo make install" command install it to the location "/some/path". I have not done this on my machine. If you try this, make sure that the path does not conflict with installed software (i.e. try "/opt/xglserver")

    If it built without any problems, there will be a binary called "Xglx" in the "hw/xgl/glx" subdirectory of xserver. Go to that directory and run Xglx with the following command:

    Code:
    $ cd hw/xgl/glx
    $ ./Xglx :1 -ac -nolisten tcp -screen 1024x768
    The "-ac" flag disables access control (otherwise clients will not be able to connect to the Xglx server at all because the access control is normally set up by scripts such as startx). The "-nolisten tcp" flag offsets this security hazard by not allowing remote connections.

    To change the resolution the Xglx server runs at, simply change the "1024x768" after "-screen" to your required resolution.

    I don't think I have hardware acceleration correctly enabled. When I try the autogen.sh flag "--enable-glx" (which I did not include above), I get an error when I compile, saying that the file "glcore.h" cannot be found, and I have not managed to fix that yet. If anybody can help, it will be greatly appreciated by everybody, I'm sure.

    You can then start up a gnome desktop (or something) in there like so

    Code:
    $ export DISPLAY=:1
    $ nautilus &
    $ metacity &
    $ xcompmgr &
    $ transset &
    $ gnome-panel &
    $ gnome-settings-daemon &
    I am not sure the xcompmgr plays nicely with Xglx, and I have not managed to compile glxcompmgr yet (I get the same cannot find "glcore.h" error when compiling).

    In theory you now have Xglx running in a window.

    I hope at least somebody finds this guide useful...
    Please let me know what I can improve.

    ADDED:
    I have just finished setting up the clean system. Now to start getting everything....

    ADDED:
    I have updated the dependecy list for building --enable-xglserver
    I have not got a list of all the deps for building --enable-xglxserver (I have only been able to do that on a non-clean system (owing to the fact that my clean system is a virtual machine without a 3d-card)

    I have corrected a few negligent and inexcusable errors in my original post
    Last edited by Azriphale; February 4th, 2006 at 02:05 PM.

  2. #2
    Join Date
    Apr 2005
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop

    Nice but it doesn't compile Xglx.

    If I try
    ./autogen.sh --enable-xglxserver --enable-xglserver
    it still gives me the same errors described in the other thread.
    Code:
    make[4]: Entering directory `/home/robert/xserver/hw/xgl/glx'
    if /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -I../../../hw/xgl/glx  -I../../../hw/xgl  -I../../../miext/damage -I../../../miext/shadow -I../../../Xext -I../../../record -I../../../render -I../../../randr -I../../../xfixes -I../../../damageext -I../../../composite                 -I../../../fb -I../../../mi -Wall -Wpointer-arith -Wstrict-prototypes   -Wmissing-prototypes -Wmissing-declarations        -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/freetype2   -D_BSD_SOURCE -I../../../include -I../../../Xext -I/usr/local/include -I/usr/local/include -I/usr/X11R6/include      -O2 -march=pentium3m -funroll-loops -ffast-math -fomit-frame-pointer -fno-exceptions -MT xglx.lo -MD -MP -MF ".deps/xglx.Tpo" -c -o xglx.lo xglx.c; \
    then mv -f ".deps/xglx.Tpo" ".deps/xglx.Plo"; else rm -f ".deps/xglx.Tpo"; exit 1; fi
     gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -I../../../hw/xgl/glx -I../../../hw/xgl -I../../../miext/damage -I../../../miext/shadow -I../../../Xext -I../../../record -I../../../render -I../../../randr -I../../../xfixes -I../../../damageext -I../../../composite -I../../../fb -I../../../mi -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/freetype2 -D_BSD_SOURCE -I../../../include -I../../../Xext -I/usr/local/include -I/usr/local/include -I/usr/X11R6/include -O2 -march=pentium3m -funroll-loops -ffast-math -fomit-frame-pointer -fno-exceptions -MT xglx.lo -MD -MP -MF .deps/xglx.Tpo -c xglx.c  -fPIC -DPIC -o .libs/xglx.o
    In file included from ../../../include/dixfont.h:33,
                     from ../../../mi/mi.h:57,
                     from ../../../hw/xgl/xgl.h:43,
                     from xglx.h:29,
                     from xglx.c:26:
    /usr/X11R6/include/X11/fonts/fontstruct.h:293:23: error: fontproto.h: No such file or directory
    make[4]: *** [xglx.lo] Error 1
    make[4]: Leaving directory `/home/robert/xserver/hw/xgl/glx'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/home/robert/xserver/hw/xgl/glx'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/robert/xserver/hw/xgl'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/robert/xserver/hw'
    make: *** [all-recursive] Error 1
    Last edited by Rob2687; January 28th, 2006 at 05:27 AM.

  3. #3
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Beans
    1,351

    Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop

    This looks very nice! Got to try this soon.. Thanks for the howto!

  4. #4
    Join Date
    Jul 2005
    Beans
    90

    Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop.

    Code:
    $ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo glitz glitzinfo
    should be
    Code:
    $ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co glitz glitzinfo
    "Run glitzinfo."
    There doesn't seem to be a glitzinfo executable!

    Code:
    $ ./glitzinfo
    ./glitzinfo: symbol lookup error: ./glitzinfo: undefined symbol: glitz_glx_find_window_format
    Is that normal output?

    And finally, the xserver make compiles without errors, but I don't get any Xglx executable in hw/xgl/glx!
    :-\

    I'll start checking it out myself, but just to let you know, there deffinitely is some things missing so far!
    Well, it started out as one quick question anyway...

  5. #5
    Join Date
    Jul 2005
    Beans
    90

    Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop.

    I don't think I have hardware acceleration correctly enabled. When I try the autogen.sh flag "--enable-glx" (which I did not include above), I get an error when I compile, saying that the file "glcore.h" cannot be found, and I have not managed to fix that yet. If anybody can help, it will be greatly appreciated by everybody, I'm sure.
    I also did --enable-xglserver --enable-xglxserver --enable-glx --enable-xkb.

    glcore.h, as well as some other missing includes that it will later complain about, can be found in the mesa-swrast-source package, which you then will need to link to the xserver source.
    (note: don't bother following this code)
    Code:
    $ sudo apt-get mesa-swrast-source
    $ ln -s /usr/share/mesa-source/include/GL ~/src/xserver/GL/glx/GL
    (where ~/src is where ever you're stashing this stuff)
    It will then complain about a missing glapitable.h, so what I did was
    Code:
    $ ln -s /usr/share/mesa-source/src/mesa/glapi/glapitable.h ~/src/xserver/GL/glx/glapitable.h
    But after that it exploded in no less than 815 errors saying the error: field 'whatever' declared as a function

    So...

    I'm still not sure how this xglx server is supposed to compile.


    EDIT: At the end of the errors, it also says
    *** [libglx_la-g_render.lo] Error 1
    which to me looks alot like "lol Error 1"
    It's laughing at me.
    Last edited by One Quick Question; January 28th, 2006 at 08:21 AM.
    Well, it started out as one quick question anyway...

  6. #6
    Join Date
    Dec 2005
    Location
    Italy
    Beans
    216
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop

    Quote Originally Posted by Azriphale
    [..]
    In theory you now have Xglx running in a window.

    I hope at least somebody finds this guide useful...
    Please let me know what I can improve.

    ADDED:
    I have just finished setting up the clean system. Now to start getting everything....
    Hey, this subject is soo cool!

    I tried myself but I get errors, some of them I got rid installing other packages

    • automake, otherwise it complains about aclocal wich is not present when compiling glitz
    • libtool otherwise it says "./autogen.sh: line 40: libtoolize: command not found"


    but still I can't even compile glitz

    Code:
    matteo@ubuntu:~/download/xgl/glitz$ ./autogen.sh
    ./autogen.sh:   Note: `./configure' will be run with no arguments.
                    If you wish to pass any to it, please specify them on the
                    `./autogen.sh' command line.
    
    ./autogen.sh: running `libtoolize --copy --force'
    Putting files in AC_CONFIG_AUX_DIR, `config'.
    ./autogen.sh: running `aclocal'
    ./autogen.sh: running `autoheader'
    ./autogen.sh: running `automake --add-missing'
    automake: src/glx/Makefile.am: warning: automake does not support libglitz_glx_la_LDFLAGS being defined conditionally
    automake: src/agl/Makefile.am: warning: automake does not support libglitz_agl_la_LDFLAGS being defined conditionally
    automake: src/egl/Makefile.am: warning: automake does not support libglitz_egl_la_LDFLAGS being defined conditionally
    automake: src/wgl/Makefile.am: warning: automake does not support libglitz_wgl_la_LDFLAGS being defined conditionally
    When will you update this howto?

    Thanks!

  7. #7
    Join Date
    Dec 2005
    Location
    Italy
    Beans
    216
    Distro
    Ubuntu 12.04 Precise Pangolin

    Unhappy Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop

    ok, in some way I got xserver to be compiled

    Code:
    PKG_CONFIG_PATH=/opt/fdo/lib/pkgconfig/ ./autogen.sh --prefix=/opt/fdo --enable-composite --enable-xglserver
    
    [...]
    
    Xgl will be compiled with the following ddx modules:
      xglx: yes
      xegl: no
    
    the following stand-alone servers:
      Xglx: no
      Xegl: no
    
    and the following extension modules:
      glx: no
    but then I have no Xglx command.. what am i missing?

  8. #8
    Join Date
    Dec 2005
    Beans
    37

    Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop

    @ zasf: how did you get rid of the automake warnings?

  9. #9
    Join Date
    Dec 2005
    Location
    Italy
    Beans
    216
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop

    Quote Originally Posted by yanns
    @ zasf: how did you get rid of the automake warnings?
    I compiled and installed automake from source since you need a newer version than the one from repos

    Quote Originally Posted by http://www.freedesktop.org/wiki/Software_2fXserver_2fInstallGuide
    Before You Build
    • autoconf --version must report 2.59 or later
    • automake --version must report 1.7.x
    • libtool --version must report 1.5 (available from http://ftp.gnu.org/gnu/libtool/ if your distribution doesn't have it)
    • pkg-config --version must report 0.9.0 or later
    I installed 1.9.1, please ask if this wasn't enough.

  10. #10
    Join Date
    Apr 2005
    Location
    Not-So-Sunny Hawaii
    Beans
    Hidden!

    Re: HOWTO: Compile Xgl from source. The first step of the Future of the Linux Desktop

    what the hell do you think you're doing making this HOWTO without screenshots?!
    So... a 1337 java programmer walks into a bar...

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •