From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65319: compilation error on Android (Termux) Date: Wed, 16 Aug 2023 09:35:59 +0800 Message-ID: <87h6ozlqf4.fsf@yahoo.com> References: <7932888.4pN7iFggcO@nimes> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21688"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65319@debbugs.gnu.org To: Bruno Haible Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 16 03:37:19 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 1qW5TK-0005Os-LF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Aug 2023 03:37:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW5T9-0002tg-UX; Tue, 15 Aug 2023 21:37:07 -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 1qW5T5-0002sK-20 for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 21:37:03 -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 1qW5T4-0008Pd-PR for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 21:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW5T4-0001rd-Ef for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 21:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2023 01:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65319 X-GNU-PR-Package: emacs Original-Received: via spool by 65319-submit@debbugs.gnu.org id=B65319.16921497777099 (code B ref 65319); Wed, 16 Aug 2023 01:37:02 +0000 Original-Received: (at 65319) by debbugs.gnu.org; 16 Aug 2023 01:36:17 +0000 Original-Received: from localhost ([127.0.0.1]:38412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW5SL-0001qR-1u for submit@debbugs.gnu.org; Tue, 15 Aug 2023 21:36:17 -0400 Original-Received: from sonic303-22.consmr.mail.ne1.yahoo.com ([66.163.188.148]:41371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW5SJ-0001qF-2v for 65319@debbugs.gnu.org; Tue, 15 Aug 2023 21:36:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692149769; bh=1l33xiyjQ6Kw1IrWCXpbaJ5/bjms+uMzsiN7Gcr/mq4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=r7Kb3X3AcYgecjApUUcoV7Cc++Fgms28ZGbDBAGudDA83NXiea88t33JNd5KM8jnwoX8DArt493I/tVz7ndqCoaNyRGrBSonjesmn6kBpOXXdCvbpjF9X3ufEj/aPMuOaXtKhR6sWSKHZtSVHF4JtnEmmRWPu761aOzlxogHytsgjhbl9PaRw46YsiRQ1tpFeIs0mTwF40rMH5q9RB10E1tng5c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dmyCfcXEawyKedd Q9UP8fDSFz1DDJR4RiFZ9aCvNtBJ_8xGlyfZ1ojDcPZqHJJsYm7c50eKcc9bdw240ffEixcrZlEW FwhdnT4gxKNiUkckb8jiyrz4KRsPYeCSq4UNaq37KdEWE1sIFK0YYIOO7Z7Elb0E8KOIv0JCuaPc typE2eZ5d9qFlgfMy.luFI9QlvaS9HVSF0lGBpUjsCpvJni5LupU0qjnqBBjZ.rtllRZnvdLOW.G GJJVQN5s8PZYraWI9RAHMHXZ3nEosSO5p0AWjFisvNcFkEkEQGkZm9WOGl4H9MhGRzQ7HH7NmF2r 35I.JbubtSNLAPm3MPt5sfTFl32eMMHOOWZw76PJCeUIhsFbC_o1AUAgBa1629RAL70Q8iU6Ls8N EJAvuot1ZT9j92oMcJQRdF0q7SX4HrXcUmSsuv1bkb X-Sonic-MF: X-Sonic-ID: 02c452e2-5438-4b60-a51b-afb47014cb61 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Wed, 16 Aug 2023 01:36:09 +0000 Original-Received: by hermes--production-sg3-69654d8bd-cgvfq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 84c61ae8c6a4d9a23cfedeaa6ff25f22; Wed, 16 Aug 2023 01:36:03 +0000 (UTC) In-Reply-To: <7932888.4pN7iFggcO@nimes> (Bruno Haible's message of "Tue, 15 Aug 2023 22:28:25 +0200") X-Mailer: WebService/1.1.21732 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:267534 Archived-At: Bruno Haible writes: > Hi, > > Compiling a current Emacs checkout from today on Android, inside the Termux > app, produces a compilation error: > > ../../src/dired.c:1140:16: warning: call to undeclared function 'getpwent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > while ((pw = getpwent ())) > ^ > ../../src/dired.c:1140:14: error: incompatible integer to pointer conversion assigning to 'struct passwd *' from 'int' [-Wint-conversion] > while ((pw = getpwent ())) > ^ ~~~~~~~~~~~ > > The reason is that the default Android API level in Termux is 24, > the Android declares getpwent() only starting with API level 26: > > #if __ANDROID_API__ >= 26 > struct passwd* getpwent(void) __INTRODUCED_IN(26); > ... > > yet HAVE_GETPWENT and HAVE_ENDPWENT come out as 1. > > I can see two possible fixes: > a) use > gl_CHECK_FUNCS_ANDROID([getpwent], [[#include ]]) > instead of > AC_CHECK_FUNCS(... getpwent ...) > in configure.ac, > b) add > AC_CHECK_DECLS([getpwent], [], [], [[ > #include > #include > ]]) > to configure.ac, and a '&& HAVE_DECL_GETPWENT' in > src/dired.c line 1137. > > Bruno Thanks. What does config.guess say in Termux? And are you trying to build the Android port on Android, or just Emacs itself? P.S: our bug tracker intercepts all mail and resends individual messages itself, so you must use the X-Debbugs-Cc header instead of the carbon copy list when initially opening a bug. If you don't, I get the message you send to the bug tracker, instead of the message it resends. Thanks.