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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 5725 invoked from network); 3 Aug 2021 19:12:06 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2021 19:12:06 -0000 Received: (qmail 13425 invoked by uid 550); 3 Aug 2021 19:12:03 -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 13407 invoked from network); 3 Aug 2021 19:12:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:date:date:message-id:from :from:references:subject:subject:received; s=mail20150812; t= 1628017908; bh=nPMp4fepUyO27D1hjuqIq3lj8oimbb2K4vUyc9XS7xw=; b=O DmPYtGR6fbMuqDjFvf+Y3pzMXOKoqfQokHzpbKtwo5AbbVMIbe2nG9Hc61gh9K3s PtRElV6xKTyLyjpAPGFbqZpzwAD5CJp1xJJ6MRbyDGWpZnfvEiSqD4JGYjdXnW3A nt1whDTjlj9SoC2jaCVNvGiYRuzfpApv+iJ0/R83r10nc6qSBpMBb1CB7+Pj/xly 2LqX07BHVwhfrgk5YDbQNNMTH/9AppzVi8t3UUdezU8psBuPKcGZbjcP3bjDT+8a dvxN1mcjs/A9DdpihfQSlBK1XJ4LMXIqA+RQPjTQMHHBU0W/sQfETlZa5YLxaS8t q+kv2kWbyAgJnMIoiCW3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1628017910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OZy1n/OVuDONSMtx6H6AMT699eLsR+rAauu3WfCpnOQ=; b=VjXf0A+CVAQyUj6Jrx4VyeCz5+3vQeov5769gyocf+wO/mv653xffeze10mU41fU1INObQ Nc1iFDDquVNKnoZGU63wQ2FzorfS6pyGsEYbzvuwH/Wk4jKPl/8lsoKz6TXB6lMUm3ZVGZ /IoHMK6xcDlhvcwr2isb5mtZTd40caZVdDgt+KZRIjnMp//ZwsePJUUEtpyx6NZmOianit uYx39nKtcdYv++bEEh8qpqukWiWO30GUsutz1vMQ00PsP2kg5QRk6OTa4MEJjrcLgRxwUI Px5sPs14pzmkcRL8HySyHMZm9A8w7935h17dc8ZuynUXoUU59iMhfjLk1gfIZA== X-Virus-Scanned: amavisd-new at heinlein-support.de To: musl@lists.openwall.com References: From: bluemoon Message-ID: Date: Tue, 3 Aug 2021 21:11:48 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2EC6318B9 X-Rspamd-UID: c063b7 Subject: Re: [musl] Compilation error with mesa 21.1.6 Am 03.08.21 um 19:35 schrieb Érico Nogueira: > On Tue Aug 3, 2021 at 4:18 AM -03, bluemoon wrote: >> Hi, >> >> I’m 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’t 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 for your explanation. I’ll open an issue at Mesa’s GitLab repository. For reference, the code in question is here: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/nine/nine_memory_helper.c#L1012 >> >> 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=master > Alpine disables gallium-nine for all targets (line 147 in the APKBUILD) so they don’t need to patch.