* [musl] need help with libGL
@ 2022-03-07 5:43 naruto canada
2022-03-07 6:04 ` A. Wilcox
2022-03-07 14:15 ` Alex Xu (Hello71)
0 siblings, 2 replies; 5+ messages in thread
From: naruto canada @ 2022-03-07 5:43 UTC (permalink / raw)
To: musl
hi
I've finally managed to get xorg-server compiled and running.
I've also managed to get llvm and mesa compiled.
When I tried to run simple 3d test program,
I got "Error: GLX version >= 1.3 is required"
I've checked /var/log/Xorg.log, and got:
Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error
relocating /usr/lib/libGL.so.1: _ITM_dereg
isterTMCloneTable: initial-exec TLS resolves to dynamic definition in
/usr/lib/libGL.so.1
I've searched the web and found this thread:
https://bugs.freedesktop.org/show_bug.cgi?id=35268
It seems musl was fixed 4 years ago.
I've checked musl-1.2.2 source code, indeed, the fix seems to be
there. (tlsdesc.s)
So, I recompiled mesa with patches from the thread.
but I still get the same error message.
I also tried this simple code:
#include <dlfcn.h>
#include <stdio.h>
int main()
{
void *handle = dlopen("/usr/lib/libglapi.so", RTLD_LOCAL | RTLD_NOW);
if (!handle) {
printf("dlopen failed with message '%s'\n", dlerror());
}
}
dlopen failed with message 'Error relocating /usr/lib/libglapi.so:
_glapi_tls_Context: initial-exec TLS resolves to dynamic definition in
/usr/lib/libglapi.so'
Most of what was discussed in the thread was way over my head.
I could use some help. Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [musl] need help with libGL
2022-03-07 5:43 [musl] need help with libGL naruto canada
@ 2022-03-07 6:04 ` A. Wilcox
2022-03-07 7:57 ` naruto canada
2022-03-09 22:40 ` Jory A. Pratt
2022-03-07 14:15 ` Alex Xu (Hello71)
1 sibling, 2 replies; 5+ messages in thread
From: A. Wilcox @ 2022-03-07 6:04 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]
On Mar 6, 2022, at 11:50 PM, naruto canada <narutocanada@gmail.com> wrote:
>
> hi
>
> I've finally managed to get xorg-server compiled and running.
> I've also managed to get llvm and mesa compiled.
> When I tried to run simple 3d test program,
> I got "Error: GLX version >= 1.3 is required"
> I've checked /var/log/Xorg.log, and got:
> Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error
> relocating /usr/lib/libGL.so.1: _ITM_dereg
> isterTMCloneTable: initial-exec TLS resolves to dynamic definition in
> /usr/lib/libGL.so.1
>
> I've searched the web and found this thread:
> https://bugs.freedesktop.org/show_bug.cgi?id=35268
>
> It seems musl was fixed 4 years ago.
> I've checked musl-1.2.2 source code, indeed, the fix seems to be
> there. (tlsdesc.s)
>
> So, I recompiled mesa with patches from the thread.
> but I still get the same error message.
>
> I also tried this simple code:
> #include <dlfcn.h>
> #include <stdio.h>
> int main()
> {
> void *handle = dlopen("/usr/lib/libglapi.so", RTLD_LOCAL | RTLD_NOW);
> if (!handle) {
> printf("dlopen failed with message '%s'\n", dlerror());
> }
> }
>
> dlopen failed with message 'Error relocating /usr/lib/libglapi.so:
> _glapi_tls_Context: initial-exec TLS resolves to dynamic definition in
> /usr/lib/libglapi.so'
>
> Most of what was discussed in the thread was way over my head.
> I could use some help. Thanks.
You need to disable TLS in Mesa. Try something like this patch:
https://cgit.adelielinux.org/packages/tree/user/mesa/no-tls.patch
Hope this helps you.
Best,
-A.
--
A. Wilcox (Sent from my iPhone)
Mac, iOS, Linux software engineer
[-- Attachment #2: Type: text/html, Size: 2887 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [musl] need help with libGL
2022-03-07 6:04 ` A. Wilcox
@ 2022-03-07 7:57 ` naruto canada
2022-03-09 22:40 ` Jory A. Pratt
1 sibling, 0 replies; 5+ messages in thread
From: naruto canada @ 2022-03-07 7:57 UTC (permalink / raw)
To: musl
On 3/7/22, A. Wilcox <awilfox@adelielinux.org> wrote:
> On Mar 6, 2022, at 11:50 PM, naruto canada <narutocanada@gmail.com> wrote:
>>
>> hi
>>
>> I've finally managed to get xorg-server compiled and running.
>> I've also managed to get llvm and mesa compiled.
>> When I tried to run simple 3d test program,
>> I got "Error: GLX version >= 1.3 is required"
>> I've checked /var/log/Xorg.log, and got:
>> Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error
>> relocating /usr/lib/libGL.so.1: _ITM_dereg
>> isterTMCloneTable: initial-exec TLS resolves to dynamic definition in
>> /usr/lib/libGL.so.1
>>
>> I've searched the web and found this thread:
>> https://bugs.freedesktop.org/show_bug.cgi?id=35268
>>
>> It seems musl was fixed 4 years ago.
>> I've checked musl-1.2.2 source code, indeed, the fix seems to be
>> there. (tlsdesc.s)
>>
>> So, I recompiled mesa with patches from the thread.
>> but I still get the same error message.
>>
>> I also tried this simple code:
>> #include <dlfcn.h>
>> #include <stdio.h>
>> int main()
>> {
>> void *handle = dlopen("/usr/lib/libglapi.so", RTLD_LOCAL | RTLD_NOW);
>> if (!handle) {
>> printf("dlopen failed with message '%s'\n", dlerror());
>> }
>> }
>>
>> dlopen failed with message 'Error relocating /usr/lib/libglapi.so:
>> _glapi_tls_Context: initial-exec TLS resolves to dynamic definition in
>> /usr/lib/libglapi.so'
>>
>> Most of what was discussed in the thread was way over my head.
>> I could use some help. Thanks.
>
>
> You need to disable TLS in Mesa. Try something like this patch:
>
> https://cgit.adelielinux.org/packages/tree/user/mesa/no-tls.patch
>
> Hope this helps you.
It does! Thanks a lot. In my case, I only need to change
"--enable-glx-tlsd" to "--disable-glx-tls" during autogen.sh
I also did some benchmarks:
# glmark2 Score: 2109 # glibc
# glmark2 Score: 1993 # musl
And some light tracing shader code test:
# glibc 29 seconds vs musl 30 seconds.
It holds up very well. I'm very happy. Thanks.
BTW, I noticed "https://cgit.adelielinux.org/packages/tree/user/" only
has mednafen.
desmume, mupen64plus, and mame, all compiled without patches :)
>
> Best,
> -A.
>
> --
> A. Wilcox (Sent from my iPhone)
> Mac, iOS, Linux software engineer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [musl] need help with libGL
2022-03-07 6:04 ` A. Wilcox
2022-03-07 7:57 ` naruto canada
@ 2022-03-09 22:40 ` Jory A. Pratt
1 sibling, 0 replies; 5+ messages in thread
From: Jory A. Pratt @ 2022-03-09 22:40 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]
Proper solution is to use current mesa, this has already been fixed
upstream so the downstream patching is no longer required.
Jory
On 3/7/22 00:04, A. Wilcox wrote:
> On Mar 6, 2022, at 11:50 PM, naruto canada <narutocanada@gmail.com> wrote:
>>
>> hi
>>
>> I've finally managed to get xorg-server compiled and running.
>> I've also managed to get llvm and mesa compiled.
>> When I tried to run simple 3d test program,
>> I got "Error: GLX version >= 1.3 is required"
>> I've checked /var/log/Xorg.log, and got:
>> Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error
>> relocating /usr/lib/libGL.so.1: _ITM_dereg
>> isterTMCloneTable: initial-exec TLS resolves to dynamic definition in
>> /usr/lib/libGL.so.1
>>
>> I've searched the web and found this thread:
>> https://bugs.freedesktop.org/show_bug.cgi?id=35268
>>
>> It seems musl was fixed 4 years ago.
>> I've checked musl-1.2.2 source code, indeed, the fix seems to be
>> there. (tlsdesc.s)
>>
>> So, I recompiled mesa with patches from the thread.
>> but I still get the same error message.
>>
>> I also tried this simple code:
>> #include <dlfcn.h>
>> #include <stdio.h>
>> int main()
>> {
>> void *handle = dlopen("/usr/lib/libglapi.so", RTLD_LOCAL | RTLD_NOW);
>> if (!handle) {
>> printf("dlopen failed with message '%s'\n", dlerror());
>> }
>> }
>>
>> dlopen failed with message 'Error relocating /usr/lib/libglapi.so:
>> _glapi_tls_Context: initial-exec TLS resolves to dynamic definition in
>> /usr/lib/libglapi.so'
>>
>> Most of what was discussed in the thread was way over my head.
>> I could use some help. Thanks.
>
>
> You need to disable TLS in Mesa. Try something like this patch:
>
> https://cgit.adelielinux.org/packages/tree/user/mesa/no-tls.patch
>
> Hope this helps you.
>
> Best,
> -A.
>
> --
> A. Wilcox (Sent from my iPhone)
> Mac, iOS, Linux software engineer
[-- Attachment #2: Type: text/html, Size: 4504 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [musl] need help with libGL
2022-03-07 5:43 [musl] need help with libGL naruto canada
2022-03-07 6:04 ` A. Wilcox
@ 2022-03-07 14:15 ` Alex Xu (Hello71)
1 sibling, 0 replies; 5+ messages in thread
From: Alex Xu (Hello71) @ 2022-03-07 14:15 UTC (permalink / raw)
To: naruto canada; +Cc: musl
Excerpts from naruto canada's message of March 7, 2022 12:43 am:
> hi
>
> I've finally managed to get xorg-server compiled and running.
> I've also managed to get llvm and mesa compiled.
> When I tried to run simple 3d test program,
> I got "Error: GLX version >= 1.3 is required"
> I've checked /var/log/Xorg.log, and got:
> Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error
> relocating /usr/lib/libGL.so.1: _ITM_dereg
> isterTMCloneTable: initial-exec TLS resolves to dynamic definition in
> /usr/lib/libGL.so.1
>
> I've searched the web and found this thread:
> https://bugs.freedesktop.org/show_bug.cgi?id=35268
>
> It seems musl was fixed 4 years ago.
> I've checked musl-1.2.2 source code, indeed, the fix seems to be
> there. (tlsdesc.s)
>
> So, I recompiled mesa with patches from the thread.
> but I still get the same error message.
>
> I also tried this simple code:
> #include <dlfcn.h>
> #include <stdio.h>
> int main()
> {
> void *handle = dlopen("/usr/lib/libglapi.so", RTLD_LOCAL | RTLD_NOW);
> if (!handle) {
> printf("dlopen failed with message '%s'\n", dlerror());
> }
> }
>
> dlopen failed with message 'Error relocating /usr/lib/libglapi.so:
> _glapi_tls_Context: initial-exec TLS resolves to dynamic definition in
> /usr/lib/libglapi.so'
>
> Most of what was discussed in the thread was way over my head.
> I could use some help. Thanks.
>
The short answer is that I have submitted a fix which is included in
Mesa 22. It seems that Mesa 22 has been delayed several times; -rc2 is
out, but I don't know when the final will be released.
In general, I would suggest using a full Linux distribution instead of
compiling packages individually. If for some reason you insist on
compiling packages individually, the various musl-based Linux
distributions are still a good reference for which patches and
other adjustments are required for musl compatibility.
Cheers,
Alex.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-09 22:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 5:43 [musl] need help with libGL naruto canada
2022-03-07 6:04 ` A. Wilcox
2022-03-07 7:57 ` naruto canada
2022-03-09 22:40 ` Jory A. Pratt
2022-03-07 14:15 ` Alex Xu (Hello71)
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).