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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28014 invoked from network); 3 Aug 2021 17:45:19 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2021 17:45:19 -0000 Received: (qmail 14286 invoked by uid 550); 3 Aug 2021 17:45:17 -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 14267 invoked from network); 3 Aug 2021 17:45:16 -0000 X-Virus-Scanned: Debian amavisd-new at disroot.org Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1628012703; bh=XaRjA9ZmYvJ6qqGUcGBdO0HEo/gO2bkiiu81Zkhkhb0=; h=Subject:From:To:Date:In-Reply-To; b=M2ONpdaUa33Ru7usVs37q5fneSPC9hE4RKX3tmR+gTq3+41ShxX/NeCazwX+B6bw5 KdXPOGye/VCvpjVKuXCuDUOJRI6U/Iz1WewEkvbTIklK6zL2o5opGJEUfEa0BIk8Hi hXg2XHbtGNRSRQbo6w/CdoOm2kMWiNTD83/ofTXWupuKb1MIS3Nn65SC28pIkWcUGg UxqoojVhD7irWqxsvpbgXE0Da1vkkbwWifz/rIFcdlWP6MlARzQAOjMGyyFfPXAByq N86Azjw9TrF/5aygTBFVa0RfLZaH3+qSkFNMn2GSAMgBEkBYx6aK8UhPeD4g/bP8nG JF7nK4KeJ2LnQ== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 From: =?utf-8?q?=C3=89rico_Nogueira?= To: Date: Tue, 03 Aug 2021 14:35:05 -0300 Message-Id: In-Reply-To: Subject: Re: [musl] Compilation error with mesa 21.1.6 On Tue Aug 3, 2021 at 4:18 AM -03, bluemoon wrote: > Hi, > > I=E2=80=99m trying to compile mesa 21.1.6 for i686 (Void Linux i686-musl)= . > When > Gallium Nine is enabled compilation fails. It works on x86_64 but they > branch off on 32-bit systems and use memfd. In that code they use > > ulimit(__UL_GETOPENMAX) The ulimit(3) man page documents that a value of 4 doesn't have a macro for it but is implemented to return the max number of fds. Apparently it isn't up to date with the fact that glibc declares a macro, even if prefixed with '__'... musl definitely doesn't implement this extension to ulimit(3), though. > > which is not available in musl. However, in glibc __UL_GETOPENMAX is > assigned the return value of > > sysconf(_SC_OPEN_MAX) > > (cf. sysdeps/posix/ulimit.c) which is defined in musl. > > So before reporting this issue to the mesa developers, I would like to > ask if replacing the former with the latter is ok or if there is a > caveat I don=E2=80=99t see. That is the portable way of obtaining the value; fixing the ulimit call to use sysconf directly sounds like the only correct way forward. They are using a non-documented internal macro in a function that for some reason was stretched out to do more. > > Thank you! PS: might be worth investigating the build configuration, Alpine doesn't carry a patch for this part: https://git.alpinelinux.org/aports/tree/main/mesa?h=3Dmaster