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

Zig build "warning: Encountered error: FileNotFound" #20294

Open
lualvsil opened this issue May 23, 2024 · 4 comments · May be fixed by #22442
Open

Zig build "warning: Encountered error: FileNotFound" #20294

lualvsil opened this issue May 23, 2024 · 4 comments · May be fixed by #22442
Labels
bug report Something is not working properly inactive No activity in a certain period of time upstream issue It is an upstream issue

Comments

@lualvsil
Copy link

Problem description

When i run zig build the output is:
warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.
warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.
install
└─ install zigexample
└─ zig build-lib zigexample Debug native failure
error: warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.

install
└─ install zigexample
└─ zig build-exe zigexample Debug native failure
error: warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.

What steps will reproduce the bug?

zig init
zig build

What is the expected behavior?

.

System information

Termux Variables:
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true                  TERMUX_APP__APK_PATH=/data/app/com.termux-bjdckkFvJ3MS6KACT9nGBg==/base.apk
TERMUX_APP__APK_RELEASE=GITHUB
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=true                       TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=26303
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c118,c258,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app:s0:c118,c258,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=10630
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=118
TERMUX_APP__VERSION_NAME=0.118.0+9b06e61
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0+9b06e61
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.org/apt/termux-main/ stable main
Updatable packages:
apt/stable 2.7.12-1 arm [upgradable from: 2.4.5]
bash/stable 5.2.26-1 arm [upgradable from: 5.1.16-1]
ca-certificates/stable 1:2024.03.11-2 all [upgradable from: 1:2022.03.29]
command-not-found/stable 2.4.0-25 arm [upgradable from: 1.75]
coreutils/stable 9.5 arm [upgradable from: 9.1]
curl/stable 8.8.0 arm [upgradable from: 7.83.0]
dash/stable 0.5.12 arm [upgradable from: 0.5.11.5-1]
debianutils/stable 5.17 arm [upgradable from: 5.7]
dialog/stable 1.3-20240307-0 arm [upgradable from: 1.3-20220117-0]
diffutils/stable 3.10 arm [upgradable from: 3.8]
dos2unix/stable 7.5.2 arm [upgradable from: 7.4.2]
dpkg/stable 1.22.6 arm [upgradable from: 1.21.1-1]
ed/stable 1.20.2 arm [upgradable from: 1.18]
findutils/stable 4.9.0-2 arm [upgradable from: 4.9.0-1]
gawk/stable 5.3.0 arm [upgradable from: 5.1.1-1]
gpgv/stable 2.4.5-1 arm [upgradable from: 2.3.5]
grep/stable 3.11 arm [upgradable from: 3.7-2]
gzip/stable 1.13 arm [upgradable from: 1.12]
inetutils/stable 2.4-1 arm [upgradable from: 1.9.4-13]
less/stable 633-1 arm [upgradable from: 590]
libandroid-support/stable 28-3 arm [upgradable from: 28-2]
libassuan/stable 2.5.7 arm [upgradable from: 2.5.5]
libc++/stable 26b arm [upgradable from: 23b-3]
libcap-ng/stable 2:0.8.5 arm [upgradable from: 2:0.8.3]
libcurl/stable 8.8.0 arm [upgradable from: 7.83.0]
libevent/stable 2.1.12-2 arm [upgradable from: 2.1.12-1]
libexpat/stable 2.6.2 arm [upgradable from: 2.4.8]
libgcrypt/stable 1.10.3 arm [upgradable from: 1.10.1]
libgmp/stable 6.3.0 arm [upgradable from: 6.2.1-1]
libgnutls/stable 3.8.5 arm [upgradable from: 3.7.3]
libgpg-error/stable 1.49 arm [upgradable from: 1.45]
libiconv/stable 1.17 arm [upgradable from: 1.16-3]
libidn2/stable 2.3.7 arm [upgradable from: 2.3.2]
liblz4/stable 1.9.4 arm [upgradable from: 1.9.3]
liblzma/stable 5.6.1+really5.4.5 arm [upgradable from: 5.2.5-1]
libmpfr/stable 4.2.1 arm [upgradable from: 4.1.0-1]
libnettle/stable 3.9.1 arm [upgradable from: 3.7.3]
libnghttp2/stable 1.62.1 arm [upgradable from: 1.47.0]
libnpth/stable 1.6-2 arm [upgradable from: 1.6-1]
libssh2/stable 1.11.0 arm [upgradable from: 1.10.0-2]
libtirpc/stable 1.3.4-1 arm [upgradable from: 1.3.2-1]
libunistring/stable 1.1 arm [upgradable from: 1.0]
lsof/stable 4.99.3 arm [upgradable from: 4.95.0]
nano/stable 8.0 arm [upgradable from: 6.2]
ncurses/stable 6.4.20231001-3 arm [upgradable from: 6.3]
openssl/stable 1:3.2.1-1 arm [upgradable from: 3.0.2]
pcre2/stable 10.43 arm [upgradable from: 10.40]
procps/stable 3.3.17-5 arm [upgradable from: 3.3.17-1]
psmisc/stable 23.7 arm [upgradable from: 23.4]
readline/stable 8.2.10 arm [upgradable from: 8.1.1]
sed/stable 4.9-1 arm [upgradable from: 4.8-2]
tar/stable 1.35 arm [upgradable from: 1.34]
termux-am-socket/stable 1.5.0 arm [upgradable from: 1.3.0]
termux-am/stable 0.8.0 all [upgradable from: 0.4]
termux-keyring/stable 3.12 all [upgradable from: 3.3]
termux-licenses/stable 2.0-3 all [upgradable from: 2.0-2]
termux-tools/stable 1.42.1 all [upgradable from: 0.175]
unbound/stable 1.20.0 arm [upgradable from: 1.15.0-1]
unzip/stable 6.0-9 arm [upgradable from: 6.0-7]
util-linux/stable 2.39.3-4 arm [upgradable from: 2.38]
xxhash/stable 0.8.2 arm [upgradable from: 0.8.1]
xz-utils/stable 5.6.1+really5.4.5 arm [upgradable from: 5.2.5-1]
zlib/stable 1.3.1 arm [upgradable from: 1.2.12]
Android version:
9
Kernel build information:
Linux localhost 3.18.120-perf-g3e480e17e11f-04280-g407726838ebf #1 SMP PREEMPT Sat Apr 4 12:24:37 CDT 2020 armv7l Android
Device manufacturer:
motorola
Device model:
moto g(6) play
@lualvsil lualvsil added bug report Something is not working properly untriaged labels May 23, 2024
@TomJo2000
Copy link
Member

Please first of all update your packages (pkg up) and try again.
Termux uses a rolling release model, and we do not offer support for partial upgrades, or out of date dependencies.

@sylirre
Copy link
Member

sylirre commented May 23, 2024

I think this is due to accessing /usr/bin/env:

~/test $ strace -fv zig build |& grep ENOENT
openat(AT_FDCWD, "/usr/bin/env", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)

Temporary workaround is termux-chroot

Screenshot_20240523-104242_Termux

@TomJo2000
Copy link
Member

I think this is due to accessing /usr/bin/env

That would do it.

@truboxl truboxl added the upstream issue It is an upstream issue label May 25, 2024
@dosy4ev
Copy link

dosy4ev commented May 26, 2024

upsteam issue: ziglang/zig#14146

@stale stale bot added the inactive No activity in a certain period of time label Aug 10, 2024
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 2, 2024
Closes termux#20294

Zig uses FHS-type path to guess the ABI and dynamic linker of `env` binary. That leads to a warning like in termux#20294
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 2, 2024
Closes termux#20294

Zig uses FHS-type path to guess the ABI and dynamic linker of `env` binary. That leads to a warning like in termux#20294
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 2, 2024
Closes termux#20294

Zig uses FHS-type path to guess the ABI and dynamic linker of `env` binary. That leads to a warning like in termux#20294
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 2, 2024
Closes termux#20294

Zig uses FHS-type path to guess the ABI and dynamic linker of `env` binary. That leads to a warning like in termux#20294
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 3, 2024
Closes termux#20294

Zig uses FHS-type path to guess the ABI and dynamic linker of `env` binary. That leads to a warning like in termux#20294
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 3, 2024
Closes termux#20294

Zig uses FHS-type path to guess the dynamic linker of `env` binary. That leads to a warning like in termux#20294
Zig also tries to find the include dir via `clang`, but it failed. I have no idea why.
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 3, 2024
Closes termux#20294

Zig uses FHS-type path to guess the dynamic linker of `env` binary. That leads to a warning like in termux#20294
Zig also tries to find the include dir via `clang`, but it failed. I have no idea why.
mbekkomo added a commit to mbekkomo/termux-packages that referenced this issue Dec 17, 2024
Closes termux#20294

Zig uses FHS-type path to guess the dynamic linker of `env` binary. That leads to a warning like in termux#20294
Zig also tries to find the include dir via `clang`, but it failed. I have no idea why.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly inactive No activity in a certain period of time upstream issue It is an upstream issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants