Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FireBurn's 32bit Mesa Overlay with LLVM Support
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Tue Jul 12, 2011 12:00 am    Post subject: FireBurn's 32bit Mesa Overlay with LLVM Support Reply with quote

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

Code:
layman -a FireBurn


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
View user's profile Send private message
mbar
Veteran
Veteran


Joined: 19 Jan 2005
Posts: 1952
Location: Poland

PostPosted: Tue Jul 12, 2011 10:38 am    Post subject: Reply with quote

Thanks! Will try :)
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Fri Jul 22, 2011 11:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Thu Sep 22, 2011 12:32 am    Post subject: Reply with quote

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
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 412
Location: Maryland, US

PostPosted: Fri Nov 04, 2011 10:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Sun Nov 06, 2011 1:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 412
Location: Maryland, US

PostPosted: Sun Nov 06, 2011 2:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Sun Nov 06, 2011 4:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 412
Location: Maryland, US

PostPosted: Sun Nov 06, 2011 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Fri Dec 02, 2011 10:29 am    Post subject: Reply with quote

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
View user's profile Send private message
ExZombie
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 164

PostPosted: Tue Dec 06, 2011 5:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
katfish
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2011
Posts: 108

PostPosted: Tue Dec 06, 2011 6:35 pm    Post subject: Reply with quote

Sound great. I short question: How is the performance compared to native ms envs? No labbenchs needed btw ;)
Back to top
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 412
Location: Maryland, US

PostPosted: Wed Jan 18, 2012 1:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Fri Jan 20, 2012 1:59 am    Post subject: Reply with quote

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
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Fri Jan 20, 2012 2:01 am    Post subject: Reply with quote

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
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 412
Location: Maryland, US

PostPosted: Fri Jan 20, 2012 4:59 am    Post subject: Reply with quote

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
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Wed Jan 25, 2012 2:00 am    Post subject: Reply with quote

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
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2463
Location: Austria

PostPosted: Tue Feb 28, 2012 8:48 pm    Post subject: Reply with quote

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!
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Tue Feb 28, 2012 10:42 pm    Post subject: Reply with quote

Any idea how I'd get it added to the official definition?

layman -a FireBurn without anything else would be awesome
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2463
Location: Austria

PostPosted: Tue Feb 28, 2012 10:56 pm    Post subject: Reply with quote

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.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Tue Feb 28, 2012 10:57 pm    Post subject: Reply with quote

What sRGB trouble?
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2463
Location: Austria

PostPosted: Tue Feb 28, 2012 10:59 pm    Post subject: Reply with quote

https://bugs.gentoo.org/show_bug.cgi?id=405473
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Tue Feb 28, 2012 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2463
Location: Austria

PostPosted: Tue Feb 28, 2012 11:10 pm    Post subject: Reply with quote

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. 8)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Wed Feb 29, 2012 12:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum