From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65339: build failure on Android (Termux) Date: Wed, 16 Aug 2023 17:19:59 +0300 Message-ID: <838rab83xs.fsf@gnu.org> References: <4722817.cl5Wp8zd50@nimes> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24148"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65339@debbugs.gnu.org To: Bruno Haible , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 16 16:20:32 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qWHNw-00067a-QA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Aug 2023 16:20:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWHNZ-0000bU-An; Wed, 16 Aug 2023 10:20:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWHNT-0000a2-2K for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 10:20:06 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWHNS-0002LG-Q6 for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 10:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWHNS-00045Z-AF for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 10:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2023 14:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65339 X-GNU-PR-Package: emacs Original-Received: via spool by 65339-submit@debbugs.gnu.org id=B65339.169219560115706 (code B ref 65339); Wed, 16 Aug 2023 14:20:02 +0000 Original-Received: (at 65339) by debbugs.gnu.org; 16 Aug 2023 14:20:01 +0000 Original-Received: from localhost ([127.0.0.1]:41774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWHNQ-00045F-Qs for submit@debbugs.gnu.org; Wed, 16 Aug 2023 10:20:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWHNP-00044z-3L for 65339@debbugs.gnu.org; Wed, 16 Aug 2023 10:19:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWHNJ-0002JG-1g; Wed, 16 Aug 2023 10:19:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5zXFPpHWCT4D6p93tbhjCCoN/JRLkf7qPZ3I++3YFm4=; b=a2ZglcNNBUnp koA6sry3GHwbxDQwQsJC7C2W34NYi9M6cSDzVBYNwnpck3FDNXaTJqhS2lkcIQJ/SflWk68MJKiAs xhRHXxhBNFbqMelWccbscsAE79nduT25IL3Ay6WqDbbwqqdREugJMC0GnKp8OkCx8oW1e81ruVgZ5 OKFdNY/Kfa4YcDKcD51fOU27isihYaBEpcTaXnxLosAIIe0f3aHz7sWURtj099QsRxZbLcQVzISj6 pnitClPaJQR43nHuHC2aRu+4bs1bLV8mWw3WJr4CXgn0DWvocnSGtptU9gKPlTsz6+ZCuCYieJ5OW tyc/62EWGANLfzhPo6S9Hw==; In-Reply-To: <4722817.cl5Wp8zd50@nimes> (message from Bruno Haible on Wed, 16 Aug 2023 12:25:21 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267592 Archived-At: > From: Bruno Haible > Date: Wed, 16 Aug 2023 12:25:21 +0200 > > fdsan: attempted to close file descriptor 2, expected to be unowned, actually owned by FILE* 0xb678438c > make[2]: *** [Makefile:1012: bootstrap-emacs.pdmp] Aborted > make[2]: *** Deleting file 'bootstrap-emacs.pdmp' > make[2]: Leaving directory '/data/data/com.termux/files/home/emacs/src' > make[1]: *** [Makefile:554: src] Error 2 > make[1]: Leaving directory '/data/data/com.termux/files/home/emacs' > make[1]: Entering directory '/data/data/com.termux/files/home/emacs' > *** > *** "make all" failed with exit status 2. > > The line "fdsan: attempted to close file descriptor 2, expected to be unowned" > is apparently emitted by Android's "file descriptor sanitizer". > > There's a discussion of this message here: > https://github.com/termux/termux-packages/issues/6592 > and a workaround patch has been posted here: > https://github.com/termux/termux-packages/blob/master/packages/emacs/disable-fdsan.patch > > With this workaround patch, the build gets much further: It produces a > working 'src/emacs' executable. > > Would it be possible to > - either change Emacs' FILE / dirfd handling so that it no longer produces > this fdsan alert, > - or include the workaround patch in Emacs upstream? What is problematic with our FILE / dirfd handling that causes wrath on the part of the Android gods?