这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@metayan
Copy link

@metayan metayan commented Sep 30, 2021

Use SBCL if we have it already, otherwise ECL.
Build with ECL takes around seven times longer than with SBCL.
Yes, in true Lisp fashion, it can build itself. ;)
Possibility to use itself is useful for upgrades.

With the tweaks in the patch file, all internal tests pass.

ansi-test on termux-aarch64 reports 154 failures.
ansi-test on darwin-x8664 reports 145 failures.
So nothing to worry about.

#183 #948 #5415

@metayan
Copy link
Author

metayan commented Sep 30, 2021

Added $TERMUX_PREFIX/bin/ecl, so now ECL should be found.

By the way, the build using ECL takes around 45 minutes on my device. If the automatic build has a timeout set, it might need to be increased.

@metayan
Copy link
Author

metayan commented Sep 30, 2021

Getting

make-config.sh: 226: /data/data/com.termux/files/usr/bin/ecl: Exec format error

here during build.
As I see it it's an aarch64 executable in an aarch64 build. Or?

I have also blacklisted Intel builds now – I wrongly presumed that the blacklisting would propagate from the ecl dependency.

@stale
Copy link

stale bot commented Nov 18, 2021

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Issue won't be fixed label Nov 18, 2021
@metayan
Copy link
Author

metayan commented Nov 18, 2021

This builds fine directly on the device, but haven't figured out how to build in Docker yet.
Any help with this is appreciated.

@stale stale bot removed the wontfix Issue won't be fixed label Nov 18, 2021
@metayan metayan requested a review from a user November 28, 2021 05:29
@finagolfin
Copy link
Member

Please rebase.

Yan added 3 commits November 28, 2021 07:27
Use SBCL if we have it already, otherwise ECL.
Build with ECL takes around seven times longer than with SBCL.
Yes, in true Lisp fashion, it can build itself. ;)
Possibility to use itself is useful for upgrades.

With the tweaks in the patch file, all internal tests pass.

ansi-test on termux-aarch64 reports 154 failures.
ansi-test on darwin-x8664 reports 145 failures.
So most likely nothing to worry about.
Wrongly presumed that the ECL blacklisting would propagate
#include <sys/wait.h>
#include <sys/ioctl.h>
-#if defined __HAIKU__ || defined __DragonFly__ || defined LISP_FEATURE_ANDROID
+#if defined __HAIKU__ || defined __DragonFly__ || defined LISP_FEATURE_ANDROID || defined __TERMUX__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LISP_FEATURE_ANDROID isn't defined?

Copy link
Author

@metayan metayan Nov 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works with __ANDROID__ instead of __TERMUX__ .
Apparently LISP_FEATURE_ANDROID isn't defined. At least when building with SBCL.
Testing with ECL too now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to get it to build on device for now.
Building with SBCL that was built before works, but building with ECL fails now.

;;; Internal error:
;;;   ** Error code 1 when executing
;;; (EXT:RUN-PROGRAM "aarch64-linux-android-clang" ("-I." "-I/data/data/com.termux/files/usr/include/" "-I/data/data/com.termux/files/usr/include" "-D_GNU_SOURCE" "-DPLATFORM_ANDROID" "-DUSE_GET_STACKBASE_FOR_MAIN" "-DIGNORE_DYNAMIC_LOADING" "-fstack-protector-strong" "-Oz" "-fPIC" "-D_THREAD_SAFE" "-Dandroid" "-O2" "-c" "/data/data/com.termux/files/usr/tmp/ecl001l5oZGt.c" "-o" "/data/data/com.termux/files/usr/tmp/ecl001l5oZGt.o")):
;;; In file included from /data/data/com.termux/files/usr/tmp/ecl001l5oZGt.c:5:
;;; In file included from /data/data/com.termux/files/usr/include/ecl/ecl-cmp.h:36:
;;; In file included from /data/data/com.termux/files/usr/include/ecl/ecl.h:22:
;;; In file included from /data/data/com.termux/files/usr/include/sys/types.h:33:
;;; In file included from /data/data/com.termux/files/usr/lib/clang/13.0.0/include/stdint.h:52:
;;; In file included from /data/data/com.termux/files/usr/include/stdint.h:32:
;;; In file included from /data/data/com.termux/files/usr/include/bits/wchar_limits.h:36:
;;; In file included from /data/data/com.termux/files/usr/include/sys/cdefs.h:371:
;;; /data/data/com.termux/files/usr/include/android/api-level.h:174:50: error: expected a platform name, e.g., 'macos'
;;; int android_get_application_target_sdk_version() __INTRODUCED_IN(24);
;;;                                                  ^
;;; /data/data/com.termux/files/usr/include/android/versioning.h:62:36: note: expanded from macro '__INTRODUCED_IN'
;;; #define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
;;;                                    ^
;;; /data/data/com.termux/files/usr/include/android/versioning.h:57:71: note: expanded from macro '__BIONIC_AVAILABILITY'
;;; #define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,strict,__what)))
;;;                                                                       ^
;;; <command line>:6:17: note: expanded from here
;;; #define android 1
;;;                 ^
;;; In file included from /data/data/com.termux/files/usr/tmp/ecl001l5oZGt.c:5:
;;; In file included from /data/data/com.termux/files/usr/include/ecl/ecl-cmp.h:36:
;;; In file included from /data/data/com.termux/files/usr/include/ecl/ecl.h:29:
;;; In file included from /data/data/com.termux/files/usr/include/stdio.h:47:
;;; In file included from /data/data/com.termux/files/usr/include/string.h:36:
;;; /data/data/com.termux/files/usr/include/bits/strcasecmp.h:56:87: error: expected a platform name, e.g., 'macos'
;;; int strcasecmp_l(const char* __s1, const char* __s2, locale_t __l) __attribute_pure__ __INTRODUCED_IN(23);
;;;                                                                                       ^
;;; /data/data/com.termux/files/usr/include/android/versioning.h:62:36: note: expanded from macro '__INTRODUCED_IN'
;;; #define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
;;;                                    ^
;;; /data/data/com.termux/files/usr/include/android/versioning.h:57:71: note: expanded from macro '__BIONIC_AVAILABILITY'
;;; #define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,strict,__what)))
;;;                                                                       ^
;;; <command line>:6:17: note: expanded from here
;;; #define android 1
;;;                 ^

Will have to try more some other day.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seem to be a new issue with ndk-r23, unrelated to sbcl. I can reproduce it with:

$ cat test.c
#include <sys/types.h>
int main() {
        return 0;
};
$ clang -Dandroid test.c

@finagolfin
Copy link
Member

This won't actually be used by almost anyone unless it's cross-compiled. You don't need Docker, any linux x86_64 distro will do to try building it with our packaging scripts.

@Neo-Oli Neo-Oli removed their request for review November 29, 2021 12:09
@ravener ravener removed their request for review December 15, 2021 16:10
@ghost ghost closed this Dec 30, 2021
robertkirkman added a commit to robertkirkman/termux-packages that referenced this pull request Apr 18, 2025
- Fixes termux#948
- Partially fixes termux#24176
- Partially fixes termux#183

Previous attempts and progress:

- termux@880983e (2016)
- termux#7625 (2021)
- termux#14435 (2023)

This PR mainly implements the package in a termux-packages downstream-oriented way (heavy use of internal termux-packages repository code shared with other termux-packages).

There is discussion regarding the upstream-oriented way of implementation from the SBCL side (trying to non-cross-compile while avoiding use of any internal termux-packages repository code) here:
https://bugs.launchpad.net/sbcl/+bug/1956852
robertkirkman added a commit to robertkirkman/termux-packages that referenced this pull request Apr 18, 2025
- Fixes termux#948
- Partially fixes termux#24176
- Partially fixes termux#183

Previous attempts and progress:

- termux@880983e (2016)
- termux#7625 (2021)
- termux#14435 (2023)

This PR mainly implements the package in a termux-packages downstream-oriented way (heavy use of internal termux-packages repository code shared with other termux-packages).

There is discussion regarding the upstream-oriented way of implementation from the SBCL side (trying to non-cross-compile while avoiding use of any internal termux-packages repository code) here:
https://bugs.launchpad.net/sbcl/+bug/1956852
robertkirkman added a commit to robertkirkman/termux-packages that referenced this pull request Apr 18, 2025
- Fixes termux#948
- Partially fixes termux#24176
- Partially fixes termux#183

Previous attempts and progress:

- termux@880983e (2016)
- termux#7625 (2021)
- termux#14435 (2023)

This PR mainly implements the package in a termux-packages downstream-oriented way (heavy use of internal termux-packages repository code shared with other termux-packages).

There is discussion regarding the upstream-oriented way of implementation from the SBCL side (trying to non-cross-compile while avoiding use of any internal termux-packages repository code) here:
https://bugs.launchpad.net/sbcl/+bug/1956852
robertkirkman added a commit that referenced this pull request Apr 26, 2025
- Fixes #948
- Partially fixes #24176
- Partially fixes #183

Previous attempts and progress:

- 880983e (2016)
- #7625 (2021)
- #14435 (2023)

This PR mainly implements the package in a termux-packages downstream-oriented way (heavy use of internal termux-packages repository code shared with other termux-packages).

There is discussion regarding the upstream-oriented way of implementation from the SBCL side (trying to non-cross-compile while avoiding use of any internal termux-packages repository code) here:
https://bugs.launchpad.net/sbcl/+bug/1956852
termux-pacman-bot added a commit to termux-pacman/termux-packages that referenced this pull request Apr 26, 2025
- Fixes termux/termux-packages#948
- Partially fixes termux/termux-packages#24176
- Partially fixes termux/termux-packages#183

Previous attempts and progress:

- termux/termux-packages@880983e (2016)
- termux/termux-packages#7625 (2021)
- termux/termux-packages#14435 (2023)

This PR mainly implements the package in a termux-packages downstream-oriented way (heavy use of internal termux-packages repository code shared with other termux-packages).

There is discussion regarding the upstream-oriented way of implementation from the SBCL side (trying to non-cross-compile while avoiding use of any internal termux-packages repository code) here:
https://bugs.launchpad.net/sbcl/+bug/1956852
shadichy pushed a commit to shadichy/termux-packages that referenced this pull request Apr 28, 2025
- Fixes termux#948
- Partially fixes termux#24176
- Partially fixes termux#183

Previous attempts and progress:

- termux@880983e (2016)
- termux#7625 (2021)
- termux#14435 (2023)

This PR mainly implements the package in a termux-packages downstream-oriented way (heavy use of internal termux-packages repository code shared with other termux-packages).

There is discussion regarding the upstream-oriented way of implementation from the SBCL side (trying to non-cross-compile while avoiding use of any internal termux-packages repository code) here:
https://bugs.launchpad.net/sbcl/+bug/1956852
This pull request was closed.
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.

3 participants