From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.emacs.bugs Subject: bug#65340: further build failure on Android (Termux) Date: Thu, 17 Aug 2023 00:46:06 +0200 Message-ID: <4828256.zszEgyNBEI@nimes> References: <5179404.0rcFjyTpgd@nimes> <87350jjh53.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4265"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65340@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 17 00:47:28 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 1qWPIW-0000uz-76 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Aug 2023 00:47:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWPI9-0000l8-I9; Wed, 16 Aug 2023 18:47:05 -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 1qWPI7-0000kt-2B for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 18:47: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 1qWPI6-0005Tt-3e for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 18:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWPI5-0005LF-LE for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 18:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bruno Haible Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2023 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65340 X-GNU-PR-Package: emacs Original-Received: via spool by 65340-submit@debbugs.gnu.org id=B65340.169222597420476 (code B ref 65340); Wed, 16 Aug 2023 22:47:01 +0000 Original-Received: (at 65340) by debbugs.gnu.org; 16 Aug 2023 22:46:14 +0000 Original-Received: from localhost ([127.0.0.1]:42298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWPHJ-0005KB-81 for submit@debbugs.gnu.org; Wed, 16 Aug 2023 18:46:13 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.219]:34195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWPHE-0005Jw-Vy for 65340@debbugs.gnu.org; Wed, 16 Aug 2023 18:46:11 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1692225967; cv=none; d=strato.com; s=strato-dkim-0002; b=GlhoxBzur8AKmNpvzIKdMS5UrqaHKW0M1lJ9D67YLTruSM7f/ywy3WGYggZGeMjjMw ce+TzTsztotLlndIx8RRhlkJgh4xmGkfjxWwk3EoHx3ZfPAUVCEj2U6fU1KI3ZLaMOGm eY93lnFdCLydZJktsyB0FhIq6dbnH8m7v7tc3e2XJV1BeEOOS9PTTkxTvdFbz9Eso6Qr IOOMmVLzLdJIqBNc+d4RLeoY8OLF+4lnd1ghS9MrlcwBrWAe9imv0MRQ9cvTsv3pNPYE jmgITS8T7a54vl8ryg1WjkNWRlBc6JC6VgGHkOVWqgXCaiILpVyV/Lv8kyEigzOdG+zc ZkZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1692225967; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=qD7f9Myd+9oAVIA2uBxd3JDaXQq0USg22i9EE1CXgZI=; b=Sl5/khti4MVjsI2dM+saT8rmDT4vFRymbLLEeX+riqoAAw6YLdQ/RJjaZn9v3Js3Ia 4F38Z631TZPvjeccGgHIkxrMgxV/pgBISh25gFGqBZqYPpEWQ9CpU9NrRrWoaLt6ePmP Qp7FRskh74zvIRw4Pd0LlLe9uRMx7bkKSFvitdecgZvXePdpg9Us9jup0IN+V2Fcab0/ g4eAOSWt1ogJ+xNWLYi6vFvz88ebmi8VKHGJV2hNz72+gKfqYLX7Yzh91J6wxQihzNza QHVZYAN70QBG0YOaj5MCyZUP/7x+3m6cv0X13xJ52fWsRoIx40l9veAgItadw7y1nN/b 6uXQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1692225967; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=qD7f9Myd+9oAVIA2uBxd3JDaXQq0USg22i9EE1CXgZI=; b=Y1uJ0925O9tG3mdnUZ5XGY2Tx60yhdpkI2QLdvwn9vT2uHGLVYeQ9m2AmumZJ6KBBi 5Za3kiBrW5Rb7cYcBH5GGQTsZDFc3kRiRknSSuXOMoGQ0t2JXjcsFydaHN7n7XPmZpzi RT1FuT888UCQNRMk08F/vsCS8/e2B8MjhiSl6laapXng2HgXHkqh0Zztm3sT9rvPLu7s XWBcOf1oE1hH4S9CxWoRr3+/ABd4MywTuoUciAeLCBPHq+Bw7P9d00ujjZW7cT2m5e0j d0hV7pQgBHNZRkyP6kQmBGODB6hpCc/I2d1j2YU6FWg1ofkftdbcKrW1eI7iyoewsXJO IdTA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1692225967; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=qD7f9Myd+9oAVIA2uBxd3JDaXQq0USg22i9EE1CXgZI=; b=tDWr6P3nJARh/fMr4KNQsuYDvy9AGZjfXS0dAFkS7m88n1KTkDnnFpIhynaiZ5Us9O NpVeoR1MqAfyZDLS4vBQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPFj/3y/BdC/O4p0sxvWlc6lavFwA==" Original-Received: from nimes.localnet by smtp.strato.de (RZmta 49.6.6 AUTH) with ESMTPSA id 3eda2cz7GMk71uf (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 17 Aug 2023 00:46:07 +0200 (CEST) In-Reply-To: <87350jjh53.fsf@yahoo.com> 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:267617 Archived-At: Po Lu wrote: > As with the bug you previously reported, this should also now be fixed. > Please test and ack. In my previous build, I had mistakenly forgotten to include the configure '--host=armv7l-linux-androideabi' option. Thus my build skipped a couple of of stumbling stones. Sorry about that. Now, with this option included, I'm getting two other problems in the first place: 1) Although I have installed ncurses-6.4 and put -I and -L options so that libncurses should be found, the build fails while linking the 'temacs.tmp' executable: ---------------------------------------------------------------------- clang -ferror-limit=0 -o temacs.tmp \ -Demacs -I. -I. -I../lib -I../lib -MMD -MF deps/.d -MP -Wno-switch -Wno-pointer-sign -Wno-string-plus-int -Wno-unknown-attributes -Wno-unknown-pragmas -Wno-initializer-overrides -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -O2 -DHAVE_CONFIG_H -L/data/data/com.termux/files/home/local/lib -Wl,-rpath,/data/data/com.termux/files/home/local/include \ dispnew.o frame.o scroll.o xdisp.o menu.o window.o charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o emacs.o keyboard.o macros.o keymap.o sysdep.o bignum.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o alloc.o pdumper.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o sort.o font.o print.o lread.o syntax.o bytecode.o comp.o process.o gnutls.o callproc.o region-cache.o sound.o timefns.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o lcms.o profiler.o decompress.o thread.o systhread.o sqlite.o treesit.o itree.o tparam.o lastfile.o ../lib/libgnu.a -lutil -lm - lgmp ld.lld: error: undefined symbol: tputs >>> referenced by cm.c >>> cm.o:(cmcostinit) >>> referenced by cm.c >>> cm.o:(cmcostinit) >>> referenced by cm.c >>> cm.o:(cmcostinit) >>> referenced 114 more times >>> did you mean: fputs >>> defined in: /system/lib/libc.so ld.lld: error: undefined symbol: tgetent >>> referenced by term.c >>> term.o:(init_tty) ld.lld: error: undefined symbol: tgetstr >>> referenced by term.c >>> term.o:(init_tty) >>> referenced by term.c >>> term.o:(init_tty) >>> referenced by term.c >>> term.o:(init_tty) >>> referenced 76 more times ld.lld: error: undefined symbol: tgetflag >>> referenced by term.c >>> term.o:(init_tty) >>> referenced by term.c >>> term.o:(init_tty) >>> referenced by term.c >>> term.o:(init_tty) >>> referenced 9 more times ld.lld: error: undefined symbol: tgetnum >>> referenced by term.c >>> term.o:(init_tty) >>> referenced by term.c >>> term.o:(init_tty) >>> referenced by term.c >>> term.o:(init_tty) >>> referenced 4 more times ld.lld: error: undefined symbol: PC >>> referenced by term.c >>> term.o:(init_tty) clang-15: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [Makefile:743: temacs] Error 1 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 reason is that in src/config.h, the macro TERMINFO is no longer defined. The cause are these two pieces of configure.ac: AC_CACHE_CHECK([for library containing tputs], [emacs_cv_tputs_lib], [if test "${opsys}" = "mingw32" || test "$opsys" = "android"; then emacs_cv_tputs_lib='none required' else # curses precedes termcap because of AIX (Bug#9736#35) and OpenIndiana. tputs_libraries='tinfo ncurses terminfo curses termcap tinfow ncursesw' mingw32 | android) TERMINFO=no LIBS_TERMCAP= ;; $opsys is apparently 'android' in the Termux build, derived from $host_os. I got past this stumbling block by hand-editing the generated configure file, taking out these two comparisons of $opsys with 'android'. 2) Then it fails later, while loading "version.el": ------------------------------------------------------------------------------- ./temacs --batch -l loadup --temacs=pbootstrap \ --bin-dest /data/data/com.termux/files/home/local/bin/ --eln-dest /data/data/com.termux/files/home/local/lib/emacs/30.0.50/ Loading loadup.el (source)... Dump mode: pbootstrap Using load-path (/data/data/com.termux/files/home/emacs/lisp /data/data/com.termux/files/home/emacs/lisp/emacs-lisp /data/data/com.termux/files/home/emacs/lisp/progmodes /data/data/com.termux/files/home/emacs/lisp/language /data/data/com.termux/files/home/emacs/lisp/international /data/data/com.termux/files/home/emacs/lisp/textmodes /data/data/com.termux/files/home/emacs/lisp/vc) Loading emacs-lisp/debug-early (source)... Loading emacs-lisp/byte-run (source)... Loading emacs-lisp/backquote (source)... Loading subr (source)... Loading keymap (source)... Loading version (source)... Opening input file: No such file or directory, /assets/build_info Error: file-missing ("Opening input file" "No such file or directory" "/assets/build_info") mapbacktrace((closure ((prin1 . prin1) t) (evald func args _flags) (let ((args args)) (if evald (progn (princ " ") (funcall prin1 func) (princ "(")) (progn (princ " (") (setq args (cons func args)))) (if args (while (progn (funcall prin1 (car args)) (setq args (cdr args))) (princ " "))) (princ ")\n")))) (let ((print-escape-newlines t) (print-escape-control-characters t) (print-escape-nonascii t) (prin1 (if (and (fboundp 'cl-prin1) (fboundp 'cl-defmethod) (condition-case nil (require 'cl-print) (error nil))) #'cl-prin1 #'prin1))) (mapbacktrace #'(lambda (evald func args _flags) (let ((args args)) (if evald (progn (princ " ") (funcall prin1 func) (princ "(")) (progn (princ " (") (setq args (cons func args)))) (if args (while (progn (funcall prin1 (car args)) (setq args (cdr args))) (princ " "))) (princ ")\n"))))) debug-early-backtrace() debug-early(error (file-missing "Opening input file" "No such file or directory" "/assets/build_info")) insert-file-contents("/assets/build_info") (progn (insert-file-contents "/assets/build_info") (let ((string (buffer-substring 1 (line-end-position)))) (and (not (equal string "Unknown")) string))) (unwind-protect (progn (insert-file-contents "/assets/build_info") (let ((string (buffer-substring 1 (line-end-position)))) (and (not (equal string "Unknown")) string))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents "/assets/build_info") (let ((string (buffer-substring 1 (line-end-position)))) (and (not (equal string "Unknown")) string))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (with-current-buffer temp-buffer (unwind-protect (progn (insert-file-contents "/assets/build_info") (let ((string (buffer-substring 1 (line-end-position)))) (and (not (equal string "Unknown")) string))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (with-current-buffer temp-buffer (unwind-protect (progn (insert-file-contents "/assets/build_info") (let ((string (buffer-substring 1 (line-end-position)))) (and (not (equal string "Unknown")) string))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (with-temp-buffer (insert-file-contents "/assets/build_info") (let ((string (buffer-substring 1 (line-end-position)))) (and (not (equal string "Unknown")) string))) android-read-build-system() (and (eq system-type 'android) (android-read-build-system)) (or (and (eq system-type 'android) (android-read-build-system)) (system-name)) (defconst emacs-build-system (or (and (eq system-type 'android) (android-read-build-system)) (system-name)) "Name of the system on which Emacs was built, or nil if not available.") load("version") load("loadup.el") make[2]: *** [Makefile:1012: bootstrap-emacs.pdmp] Error 255 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. ------------------------------------------------------------------------------- Looking at version.el, this looks like some (eq system-type 'android) test that was meant for the Android GUI, now applying to the Android Termux build. 3) I'll get to testing the "Error: permission-denied" from function add-name-to-file only after I'm past the errors 1) and 2), since it comes from a later point in loadup.el. Bruno