GNU bug report logs - #66508
30.0.50; Emacs Android port crashes due to link error when build with libxml2 and ImageMagick7

Previous Next

Package: emacs;

Reported by: Takesi Ayanokoji <ayanokoji.takesi <at> gmail.com>

Date: Thu, 12 Oct 2023 21:20:02 UTC

Severity: normal

Found in version 30.0.50

To reply to this bug, email your comments to 66508 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#66508; Package emacs. (Thu, 12 Oct 2023 21:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Takesi Ayanokoji <ayanokoji.takesi <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 12 Oct 2023 21:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Takesi Ayanokoji <ayanokoji.takesi <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Emacs Android port crashes due to link error when build with
 libxml2 and ImageMagick7
Date: Fri, 13 Oct 2023 06:19:05 +0900
[Message part 1 (text/plain, inline)]
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,
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66508; Package emacs. (Wed, 10 Jan 2024 22:05:01 GMT) Full text and rfc822 format available.

Message #8 received at 66508 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Takesi Ayanokoji <ayanokoji.takesi <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 66508 <at> debbugs.gnu.org
Subject: Re: bug#66508: 30.0.50; Emacs Android port crashes due to link error
 when build with libxml2 and ImageMagick7
Date: Wed, 10 Jan 2024 14:04:17 -0800
Takesi Ayanokoji <ayanokoji.takesi <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66508; Package emacs. (Thu, 11 Jan 2024 01:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 66508 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 66508 <at> debbugs.gnu.org, Takesi Ayanokoji <ayanokoji.takesi <at> gmail.com>
Subject: Re: bug#66508: 30.0.50; Emacs Android port crashes due to link
 error when build with libxml2 and ImageMagick7
Date: Thu, 11 Jan 2024 09:29:05 +0800
Stefan Kangas <stefankangas <at> 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.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66508; Package emacs. (Thu, 11 Jan 2024 22:18:02 GMT) Full text and rfc822 format available.

Message #14 received at 66508 <at> debbugs.gnu.org (full text, mbox):

From: Takesi Ayanokoji <ayanokoji.takesi <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Stefan Kangas <stefankangas <at> gmail.com>, 66508 <at> debbugs.gnu.org
Subject: Re: bug#66508: 30.0.50; Emacs Android port crashes due to link error
 when build with libxml2 and ImageMagick7
Date: Fri, 12 Jan 2024 07:16:56 +0900
[Message part 1 (text/plain, inline)]
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 <at> yahoo.com>:

> Stefan Kangas <stefankangas <at> 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.)
>
[Message part 2 (text/html, inline)]
[# # # 1 logcat-output.txt (text/plain, attachment)]
[# # # report-emacs-bug.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66508; Package emacs. (Fri, 12 Jan 2024 01:50:02 GMT) Full text and rfc822 format available.

Message #17 received at 66508 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Takesi Ayanokoji <ayanokoji.takesi <at> gmail.com>
Cc: Stefan Kangas <stefankangas <at> gmail.com>, 66508 <at> debbugs.gnu.org
Subject: Re: bug#66508: 30.0.50; Emacs Android port crashes due to link
 error when build with libxml2 and ImageMagick7
Date: Fri, 12 Jan 2024 09:49:26 +0800
Takesi Ayanokoji <ayanokoji.takesi <at> 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.




This bug report was last modified 1 year and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.