View previous topic :: View next topic |
Author |
Message |
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Tue Jul 12, 2011 12:00 am Post subject: FireBurn's 32bit Mesa Overlay with LLVM Support |
|
|
I've thrown together a quick and dirty overlay to compile and install 32bit mesa drivers on an amd64 system
These install stripped versions of the regular emul-linux-x86 packages and compile the rest natively - as a result they also support LLVM pipe
This saved me creating a chroot just for these drivers and allows me to play games on Wine using r600g & i965
Use at your own risk - may eat kittens etc
Let me know how you get on
Mike
Last edited by FireBurn on Tue Oct 23, 2012 4:10 pm; edited 2 times in total |
|
Back to top |
|
|
mbar Veteran
Joined: 19 Jan 2005 Posts: 1990 Location: Poland
|
Posted: Tue Jul 12, 2011 10:38 am Post subject: |
|
|
Thanks! Will try |
|
Back to top |
|
|
pingufunkybeat l33t
Joined: 01 Dec 2004 Posts: 610
|
Posted: Fri Jul 22, 2011 11:12 pm Post subject: |
|
|
Hey, thanks a bunch! This is what I've been looking for all along!
A couple of quick notes, though -- I had to use the "pic" flag, because it disables asm. For some reason, Mesa insists on using 64-bit asm, and it fails. Without asm, it is finally compiling and running really well.
Also, you need to turn off collision protection, but this is obvious.
This is so great, as I had been compiling 32-bit mesa by hand until now, and I gave up after 32-bit llvm became a hard requirement. Thanks! |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Thu Sep 22, 2011 12:32 am Post subject: |
|
|
Just to let you know I'm now hosting my overlay on github
git://github.com/FireBurn/Overlay.git
Let me know if you have any issues - I can say it works for r600g
Mike |
|
Back to top |
|
|
jasn Guru
Joined: 05 May 2005 Posts: 439 Location: Maryland, US
|
Posted: Fri Nov 04, 2011 10:56 pm Post subject: |
|
|
Mike,
Thanks for doing this great work. I added your overlay to my layman system configuration using a method described in this post. I just created the following xml file, using your overlay's information;
Code: | <!DOCTYPE repositories SYSTEM "/dtd/repositories.dtd">
<repositories xmlns="" version="1.0">
<repo quality="experimental" status="unofficial">
<name>
<![CDATA[FireBurn]]>
</name>
<description lang="en">
<![CDATA[FireBurn's 32bit Mesa Overlay with LLVM Support]]>
</description>
<homepage>
https://github.com/FireBurn/Overlay.git
</homepage>
<owner type="person">
<email>
FireBurn@localhost
</email>
<name>
<![CDATA[Mike Lothain]]>
</name>
</owner>
<source type="git">
git://github.com/FireBurn/Overlay.git
</source>
<feed>
https://github.com/FireBurn/Overlay/commits/master.atom
</feed>
</repo>
</repositories> |
saved the file as /var/lib/layman/my-repositories.xml, and then added it to my /etc/layman/layman.cfg under the overlays section;
Code: | overlays : http://www.gentoo.org/proj/en/overlays/repositories.xml
file:///var/lib/layman/my-repositories.xml |
I then synced and was able to add your overlay.
Code: | layman -S && layman -a FireBurn |
I then went about installing mesa-32bit, and its dependencies. BTW, I couldn't get mesa-32bit and libdrm-32bit to install without turning off both collision-protect and protect-owned with the following command;
Code: | FEATURES="-collision-protect -protect-owned" emerge -v libffi-32bit llvm-32bit libdrm-32bit mesa-32bit |
So far I've got the native linux Unreal Tournament 2004 running nicely on my system, but for some reason I can't get either the native linux versions of doom3 or quake4, to run correctly. The final error message I get when trying to run doom3 from the command line is;
Code: | -------------------------------
WARNING: vertex array range in virtual memory (SLOW)
signal caught: Segmentation fault
si_code 1
Trying to exit gracefully.. |
so I'm pretty sure I've got something configured incorrectly. If I do an eselect mesa set 32bit sw 1, (setting it to classic), I can get doom3 to run, but the slowed down performance is unusable. If you have any tips, I'd welcome them. I'm curious if I should have all eselect mesa choices, (32bit and 64bit), set to gallium or not.
Thanks again for your work..
Jason |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Sun Nov 06, 2011 1:49 pm Post subject: |
|
|
Hi
It's great to know folks are finding my overlay useful
As for the games not working it might not be because of the overlay but just due to missing features / problems with wine etc
Out of interest do you have libtxc_dxtn installed installed?
Mike |
|
Back to top |
|
|
jasn Guru
Joined: 05 May 2005 Posts: 439 Location: Maryland, US
|
Posted: Sun Nov 06, 2011 2:08 pm Post subject: |
|
|
My problems running doom3 and quake4 are definitely not because of your overlay. I confirmed it by removing it and still having the same problems. I'll tinker with things and see if I can fix that. I was just curious what your mesa settings, (specifically 32 bit), are for your system.
Also I do have libtxc_dxtn installed and I have R600_ENABLE_S3TC=1 enabled in my /etc/env.d/99local file. (Let me know if I shouldn't do that too).
Thanks again. |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Sun Nov 06, 2011 4:30 pm Post subject: |
|
|
I use eselect mesa and use gallium for all the entries both 32bit and 64bit
I don't have any overrides in my env.d
The only games I really play are Warcraft 3, Civilization and Starcraft 2
Are you running the Linux version of doom3 or the windows version under wine? |
|
Back to top |
|
|
jasn Guru
Joined: 05 May 2005 Posts: 439 Location: Maryland, US
|
Posted: Sun Nov 06, 2011 6:07 pm Post subject: |
|
|
No wine at all. Just the Linux versions of;
UT2004 - (works nicely)
Robin Hood - (definitely works better)
Doom3 - (can't get to work at all, and shows the error message previously posted)
Quake IV - (works through the beginning part when selecting a profile and game level, but when trying to load a game, dies and kicks out back to the login screen)
I can see that you pretty much use wine/windows games with your setup, right? Anyway, I'm jazzed about your work. I figure I can always work around these other problems, (or just stick with the games that work). I'll leave every mesa choice set to gallium. BTW, do you have libtxc_dxtn installed and have R600_ENABLE_S3TC=1 enabled as an environment variable somewhere, (like .bashrc)?
Thanks again..
Jason |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Fri Dec 02, 2011 10:29 am Post subject: |
|
|
The mesa-32bit has been synced with x11 overlay - I did have a fix earlier but forgot to push it to github |
|
Back to top |
|
|
ExZombie Apprentice
Joined: 29 May 2004 Posts: 170
|
Posted: Tue Dec 06, 2011 5:44 pm Post subject: |
|
|
FireBurn, thanks for the overlay, I can finally use wine with mesa .
There are two probles, however. First, the overlay has broken manifests, which have to be remade after layman sync.
Second, mesa won't link against llvm anymore. I reverted to commit c9a81b7f30203d7b1be3976a4c3184e12b4b5f30 as a workaround. I guess it has to do with llvm version bump to 3.0, possibly because /usr/lib32/llvm/libLLVM-2.9.so is also provided by emul-linux-x86-baselibs. When llvm-32bit version 3.0 is installed, both 3.0 and 2.9 .so files are present. This may be the cause of linking errors. |
|
Back to top |
|
|
katfish Tux's lil' helper
Joined: 14 Nov 2011 Posts: 147
|
Posted: Tue Dec 06, 2011 6:35 pm Post subject: |
|
|
Sound great. I short question: How is the performance compared to native ms envs? No labbenchs needed btw |
|
Back to top |
|
|
jasn Guru
Joined: 05 May 2005 Posts: 439 Location: Maryland, US
|
Posted: Wed Jan 18, 2012 1:39 pm Post subject: |
|
|
I just tried to rebuild all of my 32bit libs from the overlay, and the libdrm-32bit emerge failed. Here is the build log. It starts off with the following error;
Code: | sed: can't read /tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999/Makefile.am: No such file or directory |
but I think the relevant build errors are further down;
Code: | Making all in modetest
make[3]: Entering directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build/tests/modetest'
CC modetest.o
CCLD modetest
/usr/lib32/opengl/xorg-x11/lib/libEGL.so.1: undefined reference to `xcb_dri2_swap_buffers_unchecked'
/usr/lib32/opengl/xorg-x11/lib/libEGL.so.1: undefined reference to `xcb_dri2_swap_interval'
/usr/lib32/opengl/xorg-x11/lib/libEGL.so.1: undefined reference to `xcb_dri2_swap_buffers_reply'
collect2: ld returned 1 exit status
make[3]: *** [modetest] Error 1
make[3]: Leaving directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build/tests/modetest'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build'
make: *** [all] Error 2 |
I also noticed that I built a new 32bit lib today with my system update of libX11-32bit. Does anyone else have a problem emerging libdrm-32bit now?
Thanks.. |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Fri Jan 20, 2012 1:59 am Post subject: |
|
|
ExZombie wrote: | FireBurn, thanks for the overlay, I can finally use wine with mesa .
There are two probles, however. First, the overlay has broken manifests, which have to be remade after layman sync.
Second, mesa won't link against llvm anymore. I reverted to commit c9a81b7f30203d7b1be3976a4c3184e12b4b5f30 as a workaround. I guess it has to do with llvm version bump to 3.0, possibly because /usr/lib32/llvm/libLLVM-2.9.so is also provided by emul-linux-x86-baselibs. When llvm-32bit version 3.0 is installed, both 3.0 and 2.9 .so files are present. This may be the cause of linking errors. |
I only have llvm-3 installed - if you don't need 2.9 can you uninstall and try again
Sorry for the late reply I didn't notice the email telling me this forum had been updated |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Fri Jan 20, 2012 2:01 am Post subject: |
|
|
jasn wrote: | I just tried to rebuild all of my 32bit libs from the overlay, and the libdrm-32bit emerge failed. Here is the build log. It starts off with the following error;
Code: | sed: can't read /tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999/Makefile.am: No such file or directory |
but I think the relevant build errors are further down;
Code: | Making all in modetest
make[3]: Entering directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build/tests/modetest'
CC modetest.o
CCLD modetest
/usr/lib32/opengl/xorg-x11/lib/libEGL.so.1: undefined reference to `xcb_dri2_swap_buffers_unchecked'
/usr/lib32/opengl/xorg-x11/lib/libEGL.so.1: undefined reference to `xcb_dri2_swap_interval'
/usr/lib32/opengl/xorg-x11/lib/libEGL.so.1: undefined reference to `xcb_dri2_swap_buffers_reply'
collect2: ld returned 1 exit status
make[3]: *** [modetest] Error 1
make[3]: Leaving directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build/tests/modetest'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/portage/x11-libs/libdrm-32bit-9999/work/libdrm-32bit-9999_build'
make: *** [all] Error 2 |
I also noticed that I built a new 32bit lib today with my system update of libX11-32bit. Does anyone else have a problem emerging libdrm-32bit now?
Thanks.. |
I'm using this in conjunction with the x11 overlay hence why I needed that fix
If you're having issues could you try without the libX11-32bit reemerge your
emul-linux-x86-xlibs then try emerging libdrm-32bit again (you might need to use the --nodeps argument)
If that works let me know and I'll see about adding a conditional dependency on libX11-32bit only if you're using the live 64bit versions |
|
Back to top |
|
|
jasn Guru
Joined: 05 May 2005 Posts: 439 Location: Maryland, US
|
Posted: Fri Jan 20, 2012 4:59 am Post subject: |
|
|
I tried removing libX11-32bit, reemerging emul-linux-x86-xlibs, and then reemerging libdrm-32bit, and it failed with the same error message. BTW, the dependency for libX11-32bit is with mesa-32bit, not libdrm-32bit. I then unmasked libX11-9999 from the x11 overlay, emerged that, reemerged libX11-32bit, and reemerging libdrm-32bit still failed with the same error message.
Can you let me know which live ebuilds you're currently using from the x11 overlay? I'm currently using just;
Code: | media-libs/mesa
x11-drivers/xf86-video-ati
x11-libs/libdrm |
Thanks.. |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Wed Jan 25, 2012 2:00 am Post subject: |
|
|
I'm using all the live ebuilds I symlinked /var/lib/layman/x11/profiles/package.mask to /etc/portage/package.unmask/x11.unmask
The only package that doesn't work is libXp with is only pulled in by icedtea
I run this script daily to keep things up to date
Code: | #!/bin/bash
layman -S
emerge --sync --quiet
emerge -vDu world --newuse --with-bdeps y --keep-going -j 9
emerge @live-rebuild --keep-going -j 9
revdep-rebuild -i -- --keep-going -j 9
prelink -af |
|
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8940
|
Posted: Tue Feb 28, 2012 8:48 pm Post subject: |
|
|
jasn wrote: | saved the file as /var/lib/layman/my-repositories.xml, and then added it to my /etc/layman/layman.cfg under the overlays section;
Code: | overlays : http://www.gentoo.org/proj/en/overlays/repositories.xml
file:///var/lib/layman/my-repositories.xml |
I then synced and was able to add your overlay.
Code: | layman -S && layman -a FireBurn |
|
Much easier:
- Put that xml file under /etc/layman/overlays/ (I called it fireburn.xml) (that's where layman will look for overlay definitions per default)
- The overlay will then be automatically recognized (you can check via layman -L)
- layman -a FireBurn (there you go )
Due to a bug and out of curiosity (there's performance relevant but patent laden code in mesa-8* that can't be distributed via emul-binaries) I'm currently trying out your 32bit ebuilds, thanks for your work! |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Tue Feb 28, 2012 10:42 pm Post subject: |
|
|
Any idea how I'd get it added to the official definition?
layman -a FireBurn without anything else would be awesome |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8940
|
Posted: Tue Feb 28, 2012 10:56 pm Post subject: |
|
|
Taken from man layman:
Quote: | To get a new overlay added to the central list provided for layman, send a mail to <overlays@gentoo.org>. Gentoo developers may add their overlay entries directly into the list which can be accessed over the CVS repository for the Gentoo website. |
Meanwhile, your overlay unfortunately didn't solve my sRGB trouble. That either needs more 32bit ebuilds or is a totally different beast. |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Tue Feb 28, 2012 10:57 pm Post subject: |
|
|
What sRGB trouble? |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8940
|
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Tue Feb 28, 2012 11:06 pm Post subject: |
|
|
genstorm wrote: | https://bugs.gentoo.org/show_bug.cgi?id=405473 |
It might be worth while running some tracing to see what's happening inside Wine
I'll see about making a mesa-utilites ebuild for a 32bit glxinfo32 and glxgears32
This might be a bug in mesa but we'll need to do some investigating first to make sure it isn't something quirky with the set up
I'll try giving civ4 a go on my laptop (intel) and my HTPC (r600g) and see if it works for me
Mike |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8940
|
Posted: Tue Feb 28, 2012 11:10 pm Post subject: |
|
|
FireBurn wrote: | I'll try giving civ4 a go on my laptop (intel) and my HTPC (r600g) and see if it works for me |
That would be extremely helpful, tia - is your Intel chip GM45 hardware?
Civ4 needs just 2 dll overrides. I've already opend a thread here to call for input.
That persisting bug aside, I really like having those libs natively built. Feels much more like Gentoo now. |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Wed Feb 29, 2012 12:08 am Post subject: |
|
|
I'm running Civ4 from Steam and I didn't need any manual changes to the dll's
I got the same issue with my i965 based SandyBridge HD3000 but it played fine on my r600g system
Looks like it's a problem in i965 within mesa
Probably worth rasing a bug with the mesa guys
Mike |
|
Back to top |
|
|
|