Bug 76082 - Metro Last Light fail to start
Summary: Metro Last Light fail to start
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-12 17:00 UTC by Laurent carlier
Modified: 2014-03-25 21:21 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Laurent carlier 2014-03-12 17:00:26 UTC
No segfault, it just refuse to start

* glxinfo
OpenGL renderer string: Gallium 0.4 on AMD PITCAIRN
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.2.0-devel (git-6e627b4)
* llvm-3.5svn
* mesa-git

Bisecting gives me:
[lordh@archMain tst]$ git bisect bad
d9b983519c63b9072677364a6e399d213a1855e5 is the first bad commit
commit d9b983519c63b9072677364a6e399d213a1855e5
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Mon Feb 24 12:43:17 2014 -0500

    build: llvm libs may not be in system search path, add rpath
    
    On my gentoo system, llvm libs are in /usr/lib64/llvm, and llvm-config
    --ldflags does not provide the rpath (it does, of course, provide a -L).
    This adds the llvm dir to the rpath. It should be harmless if the path
    is a system path, and should make things work when it's not.
    
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
    Tested-by: Emil Velikov <emil.l.velikov@gmail.com>

:100644 100644 b8e3161e116521771eb08a84b6c4e70f357ced52 0e0fd1820f415f5298be947c1598a38b91d37340 M      configure.ac
Comment 1 Ilia Mirkin 2014-03-12 17:10:45 UTC
Hrmph. I guess it's not as harmless as I thought!

Can you provide the output of

llvm-config --ldflags (for the llvm-config that mesa uses)
llvm-config --libdir

readelf -d /path/to/r600_dri.so (or radeonsi_dri.so, not sure which one you have)

ldd /path/to/r600_dri.so

The latter 2 for both good and bad versions.
Comment 2 Laurent carlier 2014-03-12 17:15:18 UTC
[lordh@archMain tst]$ llvm-config32 --ldflags
-L/usr/lib32 
[lordh@archMain tst]$ llvm-config32 --libdir
/usr/lib32
[lordh@archMain tst]$ readelf -d /usr/lib32/xorg/modules/dri/radeonsi_dri.so 

Section dynamique à l'adresse de décalage 0x53de64 contient 39 entrées:
  Étiquettes Type                         Nom/Valeur
 0x00000001 (NEEDED)                     Librairie partagées: [libelf.so.1]
 0x00000001 (NEEDED)                     Librairie partagées: [libdrm.so.2]
 0x00000001 (NEEDED)                     Librairie partagées: [libexpat.so.1]
 0x00000001 (NEEDED)                     Librairie partagées: [libpthread.so.0]
 0x00000001 (NEEDED)                     Librairie partagées: [libdl.so.2]
 0x00000001 (NEEDED)                     Librairie partagées: [libdrm_radeon.so.1]
 0x00000001 (NEEDED)                     Librairie partagées: [libLLVM-3.5.0svn.so]
 0x00000001 (NEEDED)                     Librairie partagées: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Librairie partagées: [libm.so.6]
 0x00000001 (NEEDED)                     Librairie partagées: [libc.so.6]
 0x00000001 (NEEDED)                     Librairie partagées: [libgcc_s.so.1]
 0x0000000e (SONAME)                     Librairie soname: [radeonsi_dri.so]
 0x0000000f (RPATH)                      Librairie rpath: [/usr/lib32]
 0x0000000c (INIT)                       0x172e4
 0x0000000d (FINI)                       0x3cc884
 0x00000019 (INIT_ARRAY)                 0x52e264
 0x0000001b (INIT_ARRAYSZ)               24 (octets)
 0x0000001a (FINI_ARRAY)                 0x52e27c
 0x0000001c (FINI_ARRAYSZ)               4 (octets)
 0x6ffffef5 (GNU_HASH)                   0x138
 0x00000005 (STRTAB)                     0x1d44
 0x00000006 (SYMTAB)                     0x164
 0x0000000a (STRSZ)                      8017 (octets)
 0x0000000b (SYMENT)                     16 (octets)
 0x00000003 (PLTGOT)                     0x53f000
 0x00000002 (PLTRELSZ)                   3352 (octets)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x165cc
 0x00000011 (REL)                        0x422c
 0x00000012 (RELSZ)                      74656 (octets)
 0x00000013 (RELENT)                     8 (octets)
 0x6ffffffc (VERDEF)                     0x4014
 0x6ffffffd (VERDEFNUM)                  2
 0x0000001e (FLAGS)                      STATIC_TLS
 0x6ffffffe (VERNEED)                    0x404c
 0x6fffffff (VERNEEDNUM)                 7
 0x6ffffff0 (VERSYM)                     0x3c96
 0x6ffffffa (RELCOUNT)                   9119
 0x00000000 (NULL)                       0x0
[lordh@archMain tst]$ ldd /usr/lib32/xorg/modules/dri/radeonsi_dri.so 
        linux-gate.so.1 (0xf7778000)
        libelf.so.1 => /usr/lib32/libelf.so.1 (0xf703a000)
        libdrm.so.2 => /usr/lib32/libdrm.so.2 (0xf702c000)
        libexpat.so.1 => /usr/lib32/libexpat.so.1 (0xf7003000)
        libpthread.so.0 => /usr/lib32/libpthread.so.0 (0xf6fe7000)
        libdl.so.2 => /usr/lib32/libdl.so.2 (0xf6fe1000)
        libdrm_radeon.so.1 => /usr/lib32/libdrm_radeon.so.1 (0xf6fd2000)
        libLLVM-3.5.0svn.so => /usr/lib32/libLLVM-3.5.0svn.so (0xf4ef6000)
        libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf4e0d000)
        libm.so.6 => /usr/lib32/libm.so.6 (0xf4dc7000)
        libc.so.6 => /usr/lib32/libc.so.6 (0xf4c19000)
        libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf4bff000)
        /usr/lib/ld-linux.so.2 (0xf7779000)
        libz.so.1 => /usr/lib32/libz.so.1 (0xf4be8000)
        libffi.so.6 => /usr/lib32/libffi.so.6 (0xf4be0000)
Comment 3 Laurent carlier 2014-03-12 17:28:36 UTC
comment #2 was for bad (current trunk)

Here is when it's good:
[lordh@archMain tstdri32]$ readelf -d usr/lib32/xorg/modules/dri/radeonsi_dri.so

Section dynamique à l'adresse de décalage 0x66fa30 contient 38 entrées:
  Étiquettes Type                         Nom/Valeur
 0x00000001 (NEEDED)                     Librairie partagées: [libelf.so.1]
 0x00000001 (NEEDED)                     Librairie partagées: [libdrm.so.2]
 0x00000001 (NEEDED)                     Librairie partagées: [libexpat.so.1]
 0x00000001 (NEEDED)                     Librairie partagées: [libpthread.so.0]
 0x00000001 (NEEDED)                     Librairie partagées: [libdl.so.2]
 0x00000001 (NEEDED)                     Librairie partagées: [libdrm_radeon.so.1]
 0x00000001 (NEEDED)                     Librairie partagées: [libLLVM-3.5.0svn.so]
 0x00000001 (NEEDED)                     Librairie partagées: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Librairie partagées: [libm.so.6]
 0x00000001 (NEEDED)                     Librairie partagées: [libc.so.6]
 0x00000001 (NEEDED)                     Librairie partagées: [libgcc_s.so.1]
 0x0000000e (SONAME)                     Librairie soname: [radeonsi_dri.so]
 0x0000000c (INIT)                       0x1784c
 0x0000000d (FINI)                       0x4a3a60
 0x00000019 (INIT_ARRAY)                 0x66029c
 0x0000001b (INIT_ARRAYSZ)               24 (octets)
 0x0000001a (FINI_ARRAY)                 0x6602b4
 0x0000001c (FINI_ARRAYSZ)               4 (octets)
 0x6ffffef5 (GNU_HASH)                   0x118
 0x00000005 (STRTAB)                     0x1d94
 0x00000006 (SYMTAB)                     0x144
 0x0000000a (STRSZ)                      8038 (octets)
 0x0000000b (SYMENT)                     16 (octets)
 0x00000003 (PLTGOT)                     0x670bbc
 0x00000002 (PLTRELSZ)                   3400 (octets)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x16b04
 0x00000011 (REL)                        0x428c
 0x00000012 (RELSZ)                      75896 (octets)
 0x00000013 (RELENT)                     8 (octets)                                                                                                                                                                                          
 0x6ffffffc (VERDEF)                     0x4084                                                                                                                                                                                              
 0x6ffffffd (VERDEFNUM)                  2                                                                                                                                                                                                   
 0x0000001e (FLAGS)                      STATIC_TLS                                                                                                                                                                                          
 0x6ffffffe (VERNEED)                    0x40bc                                                                                                                                                                                              
 0x6fffffff (VERNEEDNUM)                 7                                                                                                                                                                                                   
 0x6ffffff0 (VERSYM)                     0x3cfa                                                                                                                                                                                              
 0x6ffffffa (RELCOUNT)                   9272                                                                                                                                                                                                
 0x00000000 (NULL)                       0x0                                                                                                                                                                                                 
[lordh@archMain tstdri32]$ ldd usr/lib32/xorg/modules/dri/radeonsi_dri.so                                                                                                                                                                    
        linux-gate.so.1 (0xf7745000)                                                                                                                                                                                                         
        libelf.so.1 => /usr/lib32/libelf.so.1 (0xf6e8b000)                                                                                                                                                                                   
        libdrm.so.2 => /usr/lib32/libdrm.so.2 (0xf6e7d000)                                                                                                                                                                                   
        libexpat.so.1 => /usr/lib32/libexpat.so.1 (0xf6e54000)                                                                                                                                                                               
        libpthread.so.0 => /usr/lib32/libpthread.so.0 (0xf6e38000)                                                                                                                                                                           
        libdl.so.2 => /usr/lib32/libdl.so.2 (0xf6e32000)                                                                                                                                                                                     
        libdrm_radeon.so.1 => /usr/lib32/libdrm_radeon.so.1 (0xf6e23000)                                                                                                                                                                     
        libLLVM-3.5.0svn.so => /usr/lib32/libLLVM-3.5.0svn.so (0xf4d47000)                                                                                                                                                                   
        libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf4c5e000)                                                                                                                                                                             
        libm.so.6 => /usr/lib32/libm.so.6 (0xf4c18000)                                                                                                                                                                                       
        libc.so.6 => /usr/lib32/libc.so.6 (0xf4a6a000)                                                                                                                                                                                       
        libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf4a50000)                                                                                                                                                                               
        /usr/lib/ld-linux.so.2 (0xf7746000)                                                                                                                                                                                                  
        libz.so.1 => /usr/lib32/libz.so.1 (0xf4a39000)
        libffi.so.6 => /usr/lib32/libffi.so.6 (0xf4a31000)
Comment 4 Ilia Mirkin 2014-03-14 13:40:03 UTC
How are you running Metro:LL? Is it through steam? If so, I wonder if the rpath is overriding steam's LD_LIBRARY_PATH's that it sets to use its own versions of these libs...

Can you detail what you mean by 'refuse to start'?
Comment 5 Laurent carlier 2014-03-15 08:56:21 UTC
(In reply to comment #4)
> How are you running Metro:LL? Is it through steam? If so, I wonder if the
> rpath is overriding steam's LD_LIBRARY_PATH's that it sets to use its own
> versions of these libs...
> 
> Can you detail what you mean by 'refuse to start'?

Metro LL is launched through steam. It tries to start then stops without error messages
Comment 6 Ilia Mirkin 2014-03-15 18:40:51 UTC
And steam probably uses LD_LIBRARY_PATH. According to http://blog.tremily.us/posts/rpath/, the rpath actually comes first. So my change should probably be reverted, since it disallows using LD_LIBRARY_PATH.

Can you see if starting steam with STEAM_RUNTIME=0 fixes things for you?
Comment 7 Laurent carlier 2014-03-15 21:24:15 UTC
(In reply to comment #6)
> And steam probably uses LD_LIBRARY_PATH. According to
> http://blog.tremily.us/posts/rpath/, the rpath actually comes first. So my
> change should probably be reverted, since it disallows using LD_LIBRARY_PATH.
> 
> Can you see if starting steam with STEAM_RUNTIME=0 fixes things for you?

Sorry i wasn't able to run Metro LL with STEAM_RUNTIME=0, even with mesa without your patch
Comment 8 Ilia Mirkin 2014-03-25 21:21:53 UTC
Just pushed the revert. Apologies for the inconvenience, and thanks for the bisect!

http://cgit.freedesktop.org/mesa/mesa/commit/?id=29bcc73d4db639681f679b43075798c78f268ebf


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.