all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66508: 30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7
@ 2023-10-12 21:19 Takesi Ayanokoji
  2024-01-10 22:04 ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Takesi Ayanokoji @ 2023-10-12 21:19 UTC (permalink / raw)
  To: 66508

[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]

Hello,

After building and installing Emacs Android port with  libxml2 and
ImageMagick, Emacs crashed during startup with such bellow error on logcat
output.

10-13 06:00:10.489 22999 22999 I SELinux : SELinux: seapp_context_lookup:
seinfo=untrusted, level=s0:c512,c768, pkgname=org.gnu.emacs
10-13 06:00:10.873 22999 22999 W linker  :
"/data/app/org.gnu.emacs-qyrcKpWJ8LCBp8R1gwRLIg==/lib/arm64/libc++_shared.so"
unused DT entry: type 0x70000001 arg 0x0
10-13 06:00:10.888 22999 22999 W linker  :
"/data/app/org.gnu.emacs-qyrcKpWJ8LCBp8R1gwRLIg==/lib/arm64/libc++_shared.so"
unused DT entry: type 0x70000001 arg 0x0
10-13 06:00:11.005 22999 22999 E AndroidRuntime: Process: org.gnu.emacs,
PID: 22999
10-13 06:00:11.005 22999 22999 E AndroidRuntime:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol
"UCNV_TO_U_CALLBACK_STOP_64" referenced by
"/data/app/org.gnu.emacs-qyrcKpWJ8LCBp8R1gwRLIg==/lib/arm64/libxml2_emacs.so"...
10-13 06:00:11.005 22999 22999 E AndroidRuntime:        at
org.gnu.emacs.EmacsNative.<clinit>(EmacsNative.java:322)
10-13 06:00:11.005 22999 22999 E AndroidRuntime:        at
org.gnu.emacs.EmacsNative.setupSystemThread(Native Method)
10-13 06:00:11.005 22999 22999 E AndroidRuntime:        at
org.gnu.emacs.EmacsApplication.onCreate(EmacsApplication.java:84)

And below are nm out put,

this one is when build with libxml2 only,

nm arm64-v8a/libxml2_emacs.so |grep -i ucnv
                 U UCNV_FROM_U_CALLBACK_STOP_56
                 U UCNV_TO_U_CALLBACK_STOP_56
                 U ucnv_close_56
                 U ucnv_convertEx_56
                 U ucnv_open_56
                 U ucnv_setFromUCallBack_56
                 U ucnv_setToUCallBack_56

and below is when build with libxml2 and ImageMagick7

nm arm64-v8a/libxml2_emacs.so |grep -i ucnv
                 U UCNV_FROM_U_CALLBACK_STOP_64
                 U UCNV_TO_U_CALLBACK_STOP_64
                 U ucnv_close_64
                 U ucnv_convertEx_64
                 U ucnv_open_64
                 U ucnv_setFromUCallBack_64
                 U ucnv_setToUCallBack_64

I think this is caused by a conflict due to static libraries *.a  having
the same name during build.
(not *.o because they are made unique by prefixing path to *.o.)

Thanks,

[-- Attachment #2: Type: text/html, Size: 3365 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66508: 30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7
  2023-10-12 21:19 bug#66508: 30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7 Takesi Ayanokoji
@ 2024-01-10 22:04 ` Stefan Kangas
  2024-01-11  1:29   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2024-01-10 22:04 UTC (permalink / raw)
  To: Takesi Ayanokoji; +Cc: Po Lu, 66508

Takesi Ayanokoji <ayanokoji.takesi@gmail.com> writes:

> Hello,
>
> After building and installing Emacs Android port with  libxml2 and ImageMagick, Emacs crashed during startup with such
> bellow error on logcat output.
>
> 10-13 06:00:10.489 22999 22999 I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768,
> pkgname=org.gnu.emacs
> 10-13 06:00:10.873 22999 22999 W linker  :
> "/data/app/org.gnu.emacs-qyrcKpWJ8LCBp8R1gwRLIg==/lib/arm64/libc++_shared.so" unused DT entry: type 0x70000001
> arg 0x0
> 10-13 06:00:10.888 22999 22999 W linker  :
> "/data/app/org.gnu.emacs-qyrcKpWJ8LCBp8R1gwRLIg==/lib/arm64/libc++_shared.so" unused DT entry: type 0x70000001
> arg 0x0
> 10-13 06:00:11.005 22999 22999 E AndroidRuntime: Process: org.gnu.emacs, PID: 22999
> 10-13 06:00:11.005 22999 22999 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol
> "UCNV_TO_U_CALLBACK_STOP_64" referenced by
> "/data/app/org.gnu.emacs-qyrcKpWJ8LCBp8R1gwRLIg==/lib/arm64/libxml2_emacs.so"...
> 10-13 06:00:11.005 22999 22999 E AndroidRuntime:        at org.gnu.emacs.EmacsNative.<clinit>(EmacsNative.java:322)
> 10-13 06:00:11.005 22999 22999 E AndroidRuntime:        at org.gnu.emacs.EmacsNative.setupSystemThread(Native
> Method)
> 10-13 06:00:11.005 22999 22999 E AndroidRuntime:        at org.gnu.emacs.EmacsApplication.onCreate
> (EmacsApplication.java:84)
>
> And below are nm out put,
>
> this one is when build with libxml2 only,
>
> nm arm64-v8a/libxml2_emacs.so |grep -i ucnv
>                  U UCNV_FROM_U_CALLBACK_STOP_56
>                  U UCNV_TO_U_CALLBACK_STOP_56
>                  U ucnv_close_56
>                  U ucnv_convertEx_56
>                  U ucnv_open_56
>                  U ucnv_setFromUCallBack_56
>                  U ucnv_setToUCallBack_56
>
> and below is when build with libxml2 and ImageMagick7
>
> nm arm64-v8a/libxml2_emacs.so |grep -i ucnv
>                  U UCNV_FROM_U_CALLBACK_STOP_64
>                  U UCNV_TO_U_CALLBACK_STOP_64
>                  U ucnv_close_64
>                  U ucnv_convertEx_64
>                  U ucnv_open_64
>                  U ucnv_setFromUCallBack_64
>                  U ucnv_setToUCallBack_64
>
> I think this is caused by a conflict due to static libraries *.a  having the same name during build.
> (not *.o because they are made unique by prefixing path to *.o.)
>
> Thanks,

Po Lu, could you take a look at this one?  Thanks in advance.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66508: 30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7
  2024-01-10 22:04 ` Stefan Kangas
@ 2024-01-11  1:29   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-11 22:16     ` Takesi Ayanokoji
  0 siblings, 1 reply; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-11  1:29 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 66508, Takesi Ayanokoji

Stefan Kangas <stefankangas@gmail.com> writes:

> Po Lu, could you take a look at this one?  Thanks in advance.

If I'm not mistaken, the ImageMagick repository provides its own copy of
libxml2 with dependencies that conflict with those users are directed to
install in java/INSTALL.  Ayanokoji-san, is Emacs compatible with
ImageMagick's libxml2?  (This can be established by verifying that Emacs
continues to detect libxml2 and build after removing the standard
libxml2 from --with-ndk-path.)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66508: 30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7
  2024-01-11  1:29   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-01-11 22:16     ` Takesi Ayanokoji
  2024-01-12  1:49       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Takesi Ayanokoji @ 2024-01-11 22:16 UTC (permalink / raw)
  To: Po Lu; +Cc: Stefan Kangas, 66508


[-- Attachment #1.1: Type: text/plain, Size: 1321 bytes --]

Hello, Po-san.

I build Emacs with ImageMagick7 Only.

In this build, I made some modifications to java/INSTALL, bellow .

1. Remove unnecessary hunks
 due to #66506.

2. Add LOCAL_SHARED_LIBRARIES libstdc++ to make/libmagickwand-7.mk
 to avoid Emacs crash(see attachment).

3. Fix typo in original source
 change "echo." to "echo".

In report-emacs-bug(see attachment), it configured with libxml2, but in the
apk's lib/ there is not libxml2.so.

(In the build log, libxml2 was build as static library).

Build script:
https://github.com/ayatakesi/my-emacs/actions/runs/7494305673/workflow

Build log(4MB archived log):
https://github.com/ayatakesi/my-emacs/suites/19718814430/logs?attempt=1

Thanks,

2024年1月11日(木) 午前10:29 Po Lu <luangruo@yahoo.com>:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
> > Po Lu, could you take a look at this one?  Thanks in advance.
>
> If I'm not mistaken, the ImageMagick repository provides its own copy of
> libxml2 with dependencies that conflict with those users are directed to
> install in java/INSTALL.  Ayanokoji-san, is Emacs compatible with
> ImageMagick's libxml2?  (This can be established by verifying that Emacs
> continues to detect libxml2 and build after removing the standard
> libxml2 from --with-ndk-path.)
>

[-- Attachment #1.2: Type: text/html, Size: 2559 bytes --]

[-- Attachment #2: # # # 1 logcat-output.txt --]
[-- Type: text/plain, Size: 977 bytes --]

01-12 05:15:10.073 20552 20552 I         : SS_ART_lib [I]: permission is absent: /data/app/org.gnu.emacs-Ycza48C9NkkiWaaIZzJZOg==/base.apk
01-12 05:15:15.233 20700 20700 I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=org.gnu.emacs
01-12 05:15:16.888 20700 20700 E AndroidRuntime: Process: org.gnu.emacs, PID: 20700
01-12 05:15:16.888 20700 20700 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZNSt6__ndk111__call_onceERVmPvPFvS2_E" referenced by "/data/app/org.gnu.emacs-Ycza48C9NkkiWaaIZzJZOg==/lib/arm64/libmagickcore-7_emacs.so"...
01-12 05:15:16.888 20700 20700 E AndroidRuntime:        at org.gnu.emacs.EmacsNative.<clinit>(EmacsNative.java:343)
01-12 05:15:16.888 20700 20700 E AndroidRuntime:        at org.gnu.emacs.EmacsNative.setupSystemThread(Native Method)
01-12 05:15:16.888 20700 20700 E AndroidRuntime:        at org.gnu.emacs.EmacsApplication.onCreate(EmacsApplication.java:148)

[-- Attachment #3: # # # report-emacs-bug.txt --]
[-- Type: text/plain, Size: 3155 bytes --]

In GNU Emacs 30.0.50 (build 1, aarch64-unknown-linux-android24) of
 2024-01-12 built on fv-az1113-273
Repository revision: 750350dea9df7c33f5e79389e9381aaea9fc43a6
Repository branch: my/master
Windowing system distributor 'samsung', version 26.0.0
System Description: samsung/SC-02H/SC-02H:8.0.0/R16NW/SC02HOMU1CSI1:user/release-keys

Configured using:
 'configure --with-png=yes --with-webp=yes --with-gif=yes
 --with-json=ifavailable --with-jpeg=yes --with-xml2=yes
 --with-sqlite3=yes --with-gnutls=ifavailable --with-tiff=yes
 --with-selinux=yes --with-modules=yes --with-tree-sitter=ifavailable
 --with-imagemagick=yes --with-lcms2=yes --with-mailutils=
 --with-pop=no-by-default --with-harfbuzz=yes
 --enable-check-lisp-object-type= 'CFLAGS=
 -Werror=implicit-function-declaration''

Configured features:
IMAGEMAGICK LCMS2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP TIFF ZLIB

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils japan-util rmc iso-transl tooltip cus-start cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel android-win term/common-win touch-screen ls-lisp
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote inotify android
lcms2 multi-tty move-toolbar make-network-process emacs)

Memory information:
((conses 16 41014 9057) (symbols 48 5114 0) (strings 32 13769 1049)
 (string-bytes 1 359596) (vectors 16 9515)
 (vector-slots 8 146956 11812) (floats 8 36 25) (intervals 56 394 0)
 (buffers 976 10))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66508: 30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7
  2024-01-11 22:16     ` Takesi Ayanokoji
@ 2024-01-12  1:49       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-12  1:49 UTC (permalink / raw)
  To: Takesi Ayanokoji; +Cc: Stefan Kangas, 66508

Takesi Ayanokoji <ayanokoji.takesi@gmail.com> writes:

> Hello, Po-san.
>
> I build Emacs with ImageMagick7 Only.
>
> In this build, I made some modifications to java/INSTALL, bellow .
>
> 1. Remove unnecessary hunks 
>  due to #66506.
>
> 2. Add LOCAL_SHARED_LIBRARIES libstdc++ to make/libmagickwand-7.mk
>  to avoid Emacs crash(see attachment).
>
> 3. Fix typo in original source
>  change "echo." to "echo".
>
> In report-emacs-bug(see attachment), it configured with libxml2, but in the apk's lib/ there is not libxml2.so.
>
> (In the build log, libxml2 was build as static library).
>
> Build script:
> https://github.com/ayatakesi/my-emacs/actions/runs/7494305673/workflow
>
> Build log(4MB archived log):
> https://github.com/ayatakesi/my-emacs/suites/19718814430/logs?attempt=1

I will look into this in a bit, thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-12  1:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 21:19 bug#66508: 30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7 Takesi Ayanokoji
2024-01-10 22:04 ` Stefan Kangas
2024-01-11  1:29   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 22:16     ` Takesi Ayanokoji
2024-01-12  1:49       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.