termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.08k stars 3k forks source link

[Bug]: lua-language-server: cannot open (bootstrap.lua): No such file or directory #21275

Closed MeanderingProgrammer closed 1 month ago

MeanderingProgrammer commented 1 month ago

Problem description

lua-language-server fails on startup with:

/data/data/com.termux/files/usr/share/lua-language-server/bin/lua-language-server:
cannot open (bootstrap.lua): No such file or directory

I'm unsure if this is a known limitation with the google play version, something to do with my local environment, or a recent regression in the package as this was my first attempt at using the lua-language-server package. I haven't come across a similar problem in any posts, sorry if I missed it.

I've tried changing my shell back to bash (normally use zsh) with an empty configuration and re-installing the package, this did not resolve the issue. If others are able to use the current version 3.10.5 then maybe it has to do with the set of packages I've downloaded, but I'm rather at a loss on how to debug this. No recent changes to the lua-language-server repo seem related to this error (at least as far as I can tell).

What steps will reproduce the bug?

  1. Install lua-language-server: pkg install lua-language-server
  2. Attempt to run lua-language-server: lua-language-server

What is the expected behavior?

Successful server startup

System information

Termux Variables:
TERMUX_EXEC__PROC_SELF_EXE=/data/data/com.termux/files/usr/bin/termux-info
TERMUX_VERSION=googleplay.2024.07.07
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.net stable main
Updatable packages:
libluajit/stable 2.1.1724512491 aarch64 [upgradable from: 2.1.1724232689]
termux-tools version:
3.0.8
Android version:
14
Kernel build information:
Linux localhost 5.10.198-android12-9-28575149-abS906USQS6EXG8 #1 SMP PREEMPT Tue Jul 23 06:06:55 UTC 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-S906U
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
TomJo2000 commented 1 month ago

It's possible this is a Playstore issue. I can't replicate the issue on Android 14, AArch64, Github build (v0.118.1).

To quote from the tag about the playstore builds we have on the discord.

[!NOTE] Termux on the Play Store is a fork of an old version with additional, unmerged changes, and is not controlled by the dev team at https://github.com/termux. Despite its existence and version number, it is not the newest or latest version, and is significantly less functional than either the current F-Droid release or Github builds. More detail: https://github.com/termux/termux-app/discussions/4000

Unless you know exactly what you're doing, you should not use the Play Store fork. Install Termux 0.118 from F-Droid Direct link: https://f-droid.org/en/packages/com.termux

If you have currently have the Play Store fork installed and want to install an official build from F-Droid or Github, you must uninstall Termux and all companion apps first. That means uninstalling the main app, as well as Termux:API, :Styling, :Widget, :Task, :Float, and :Boot. Termux:X11 works differently and can be left installed. If you need help with backing up your files: https://wiki.termux.com/wiki/Backing_up_Termux

sylirre commented 1 month ago

TERMUX_VERSION=googleplay.2024.07.07

We are not processing issues that happen on Google Play builds. Please report them to https://github.com/termux-play-store/termux-apps instead.

I can't reproduce the issue on normal Termux.

fornwall commented 1 month ago

This was indeed a play store / bumped targetSdk issue - fixed now in https://github.com/termux-play-store/termux-packages/commit/5cedb177b4929a8a7ba95bfac05b10cb01af840f and updatable with pkg up.

MeanderingProgrammer commented 1 month ago

Gotcha, sorry for the noise. I saw the notes about differences in F-Droid & Google Play but did not realize they were maintained separately. It makes sense though.

Thank you for the super fast fix @fornwall, have updated and it works! Much appreciated!