From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=HTML_MESSAGE, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16544 invoked from network); 9 Mar 2022 22:40:36 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 9 Mar 2022 22:40:36 -0000 Received: (qmail 19629 invoked by uid 550); 9 Mar 2022 22:40:34 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 19591 invoked from network); 9 Mar 2022 22:40:32 -0000 Content-Type: multipart/alternative; boundary="------------P480uEWOm8DRoHtZDGlnX20Z" Message-ID: <69fbba0e-518f-b3e9-02bf-b2e977248b72@gentoo.org> Date: Wed, 9 Mar 2022 16:40:16 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Content-Language: en-US To: musl@lists.openwall.com References: <4CFE6DA7-ED06-4CA4-9CFC-617CBB8387A3@adelielinux.org> From: "Jory A. Pratt" In-Reply-To: <4CFE6DA7-ED06-4CA4-9CFC-617CBB8387A3@adelielinux.org> Subject: Re: [musl] need help with libGL This is a multi-part message in MIME format. --------------P480uEWOm8DRoHtZDGlnX20Z Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 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 >> #include >> 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 --------------P480uEWOm8DRoHtZDGlnX20Z Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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:


Hope this helps you.

Best,
-A.

--
A. Wilcox (Sent from my iPhone)
Mac, iOS, Linux software engineer
--------------P480uEWOm8DRoHtZDGlnX20Z--