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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 7034 invoked from network); 7 Mar 2022 07:58:00 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 7 Mar 2022 07:58:00 -0000 Received: (qmail 25973 invoked by uid 550); 7 Mar 2022 07:57:58 -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 25941 invoked from network); 7 Mar 2022 07:57:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=kkRog2oy/lg2Qf6xYTV3WBAcDrMcHqtR6FiXzOJcM4s=; b=i//v+7SR9Zs8mF5yhauKmv/S0Pl3VOIQ0ApSKhXHzQKKs52ACxXF3y8jGRuwNjYaU5 wkMCJjcTfOyGLGvMRff9HDAMxsgHS50XugnSVh+cEK+m+tOgcNXZNW51yvQe2xiWjVG7 1BXFsLZRdPbuvEw41XkLLXqaSKa8htKAOXVaz07N28Dt4fDOC49emryI5QYuxUSL8TWf cUf6D3Nj3r+e91fjRu1HsCk6ZqbyFvt38RwTdg+9V6MZfGgAiJEClMAGTAFlmGJIa6DH EH+JAjFP0ZU44LvLZGt9B5g/+X49rDCPQz5w/YFWY5TeZnzwDA9otcDoIvEqw5CGv9bq 5ckg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=kkRog2oy/lg2Qf6xYTV3WBAcDrMcHqtR6FiXzOJcM4s=; b=VqoDuR4zhwy+eYsurDep0jejeB4m9Ux04yHrrWdS7vrXOmJ9VL6AJT8cXW8k2tm1Fh Kzj+ts9pTO5PnmmGrPZwd8P3VMHPf5IaekEhIcuR+Kiire+gDcV0eAuIFBSH524bmSBU qxJiV7UwvJ2oDZW3Kczjip7rhbQHrVaNuiCY0heyDGCdiMmdHUgwIt3MYRul7BkZWZ9G s0bXL+kGiPOmj5JKmIXROGyk/imaJfPS1I0u6WPC7hs//mvr5PUoZ2WuwWyRb3n+kuUr UA0nPx/K17oOvuO098OxrUshsjAX2u/V1kGVjxHd400zCjOsNkZhCBeDRoHVgReHblpG kbDQ== X-Gm-Message-State: AOAM532wlQXzpA5+r+T/x2R3RSp5OecMo3xzNw9xmYWd8Dsg4POA/Vij RVSpsZ7fBgyiLm3tDejlZdyrjfF3vgvzMsgHhQAfPuE1 X-Google-Smtp-Source: ABdhPJy4Rm1wYBZDZyY9rDMFQU5fP3EhIOVv6G8MrvPAmi3lG05Hx9SzjfIZXRmI1bkBi+Bf9nAnUVprqAQjRxnyY0Y= X-Received: by 2002:a05:6402:491:b0:413:6c2e:bb2c with SMTP id k17-20020a056402049100b004136c2ebb2cmr10044837edv.196.1646639866310; Sun, 06 Mar 2022 23:57:46 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4CFE6DA7-ED06-4CA4-9CFC-617CBB8387A3@adelielinux.org> References: <4CFE6DA7-ED06-4CA4-9CFC-617CBB8387A3@adelielinux.org> From: naruto canada Date: Mon, 7 Mar 2022 07:57:45 +0000 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] need help with libGL On 3/7/22, A. Wilcox wrote: > On Mar 6, 2022, at 11:50 PM, naruto canada wrote= : >> >> =EF=BB=BFhi >> >> 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 >=3D 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=3D35268 >> >> 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 =3D 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