Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
swrast_dri.so _glapi_tls_Dispatch only with CodeXL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
newin
n00b
n00b


Joined: 27 Oct 2012
Posts: 27

PostPosted: Wed Aug 03, 2016 10:35 am    Post subject: swrast_dri.so _glapi_tls_Dispatch only with CodeXL Reply with quote

Hi,
I am currently writing an OpenGL program and when I tried to debug the GPU side using CodeXL and gDebugger I get:
Code:
newin@legion ~ %  codeXL                   
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast


in verbose:

Code:
newin@legion ~ % LIBGL_DEBUG=verbose codeXL
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: dlopen /usr/lib64/dri/swrast_dri.so failed (/usr/lib64/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
function is no-op
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250
....


where is get's interesting/strange it's when I search the symbol using readelf:
Code:
newin@legion ~ % readelf -Ws /usr/lib64/dri/swrast_dri.so | grep _glapi_tls_Dispatch
    35: 0000000000000000     0 TLS     GLOBAL DEFAULT  UND _glapi_tls_Dispatch


So the symbol is here but "UND" so I naively try to LD_PRELOAD something that have it
after some violent readelf * I found that /usr/lib/libglapi.so seems to have the symbol so I LD_PRELOAD with it and I get:

Code:
newin@legion lib % LIBGL_DEBUG=verbose LD_PRELOAD=/usr/lib/libglapi.so codeXL       
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/newin/.drirc: No such file or directory.
libGL: Can't open configuration file /home/newin/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
function is no-op
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250


the symbol error seems to have disapeared but it still cannot load swrast so I think that was not a good strategy.
The last thing that come to my mind is a 32/64bit problem but codeXL/gDebugger are both in ELF64 and my drivers are also in ELF64

Even stranger CodeXL and gDebugger actually run (every other similar problem that I found on internet the program crash at startup). It run but when I start to debug my OpenGL program I get a SIGSEGV at the first OpenGL call that need more than OGL1.4 which does not happen when I run my program without it.

From here I'm lost I don't know what to try or what happen :(
I use fglrx-15.9-r1/Xorg-1.17.4 with a M370X (I also have an intel card but I did not even install the driver) on gentoo-4.4.6, my drivers are working really well (I run Unreal Engine 4 nearly everyday)
_________________
uname -a: Linux legion 4.12.0-rc7 #2 SMP Sun Jul 2 22:07:50 CEST 2017 x86_64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz GenuineIntel GNU/Linux
gcc : gcc (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) 5.4.0
window manager : dwm 6.1
web browser : Vivaldi 1.10.867.42
Back to top
View user's profile Send private message
newin
n00b
n00b


Joined: 27 Oct 2012
Posts: 27

PostPosted: Tue Aug 09, 2016 7:42 pm    Post subject: Reply with quote

CodeXL 2.2 has just been released and my Code does not SIGSEGV anymore with it but I still get the wierd "libGL error: unable to load driver: swrast_dri.so " message so the SIGSEGV and this "swrast" message seems unrelated...
This made this problem far less important but I'm still really curious about what is the problem...

In any case the kernel 4.8 is released with the support of GCN 1.0 in amd_gpu driver (My card is a GCN 1.0 CapeVerde) so I will switch to this new driver and see what happen
_________________
uname -a: Linux legion 4.12.0-rc7 #2 SMP Sun Jul 2 22:07:50 CEST 2017 x86_64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz GenuineIntel GNU/Linux
gcc : gcc (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) 5.4.0
window manager : dwm 6.1
web browser : Vivaldi 1.10.867.42
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1696

PostPosted: Tue Aug 09, 2016 8:20 pm    Post subject: Reply with quote

I found thing forum thread that seems it may be similar to the same issue you are encountering. This may give you something to look into on the cause
https://bbs.archlinux.org/viewtopic.php?id=193802
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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