Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android build instructions #687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpellegrini
Copy link
Contributor

  • In recent Android versions, one needs to pass LDFLAGS to point ld to the right path
  • ld itself is in a different package, binutils-is-llvm

Should fix #658

* In recent Android versions, one needs to pass LDFLAGS to point
  ld to the right path
* ld itself is in a different package, binutils-is-llvm
@jpellegrini
Copy link
Contributor Author

However, in Android loading libraries doesn't seem to work, because %library-prefix is not set properly.

In extraconf.h, this is what we have:

#define PREFIXDIR               "/data/data/com.termux/files/usr"
#define SCMDIR                  "${datarootdir}"
#define DEFAULT_BOOT_FILE       "${datarootdir}/boot.img"
#define EXECDIR                 "${exec_prefix}/lib"
#define BUILD_OS                "Linux-4.14.113-g1c8cbedf56fe"

So we will have:

stklos> (load-path)
("." "${exec_prefix}/lib" "${datarootdir}")

Now if I do

./configure LDFLAGS=-L/system/lib64/  --prefix /data/data/com.termux/files/usr/  
                   --datadir=/data/data/com.termux/files/usr/share/stklos 
                   --libdir=/data/data/com.termux/files/usr/lib/stklos

Then STklos will not look for .so files, even when loading readline:

~/STklos $ stklos
#[condition &error-message 510340201536]: cannot open object file /data/data/com.termux/files/usr/lib/stklos/readline-complete.so (dlopen failed: cannot locate symbol "rl_completer_word_break_characters" referenced by "/data/data/com.termux/files/usr/lib/stklos/readline-complete.so"...)
**** FATAL ERROR: no handler present!
ABORT

But if I use the -n flag,

~/STklos$ stklos -n
  \    STklos version 2.00.565 (unstable -- 6338e863)
   \   Copyright (C) 1999-2024 Erick Gallesio <[email protected]>
  / \  [Linux-4.14.113-g1c8cbedf56fe-aarch64/pthreads/readline/utf8]
 /   \ Type ',h' for help
stklos> (import (scheme list))
stklos>

It loads libraries...

This only happens in Android...

@jpellegrini
Copy link
Contributor Author

On my Android phone:

$ strings /data/data/com.termux/files/usr/lib/stklos/2.10/readline-complete.so|grep rl_completer_word_break_characters
rl_completer_word_break_characters
rl_completer_word_break_characters

On my notebook:

strings /usr/local/lib/stklos/2.10/readline-complete.so |grep rl_completer_word_break_characters
rl_completer_word_break_characters
rl_completer_word_break_characters
rl_completer_word_break_characters

One more reference on the notebook...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Small build problem on android
1 participant