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

busybox - issues #1

Open
Tracked by #2
kassane opened this issue Aug 24, 2023 · 5 comments
Open
Tracked by #2

busybox - issues #1

kassane opened this issue Aug 24, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@kassane
Copy link
Owner

kassane commented Aug 24, 2023

Busybox

build-system with C ABI

 docker run --rm -v $(pwd):/app -w /app kassany/ziglang:0.11.0 build
warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.

warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.

warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.

zig build-exe hello-world Debug native: error: warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.

Build works without Libc, but with warning!!

@kassane
Copy link
Owner Author

kassane commented Aug 24, 2023

docker run --rm -v $(pwd):/app -w /app kassany/ziglang:0.11.0 libc
Zig attempted to find the path to native system libc headers by executing this command:
cc -E -Wp,-v -xc /dev/null
error: unable to detect native libc: UnableToSpawnCCompiler

@kassane kassane mentioned this issue Aug 24, 2023
6 tasks
@kassane kassane added the bug Something isn't working label Aug 24, 2023
@kassane
Copy link
Owner Author

kassane commented Aug 24, 2023

New update from busybox:

Works on C ABI, except C++ ABI (linux - musl only):

$> docker run --rm -v $(pwd):/app -w /app kassany/ziglang:latest run -lc hello.c -target native-native-musl 
Hello C!!
$> docker run --rm -v $(pwd):/app -w /app kassany/ziglang:latest run hello.zig
Hello Zig!!
$> docker run --rm -it -v $(pwd):/app -w /app kassany/ziglang:latest run -lc++ hello.cpp -target native-native-musl     
Compile C Objects [1344/1344] aio.c... error(compilation): clang failed with stderr: zig: error: unable to make temporary file: No such file or directory

Compile C Objects [1/10] UnwindLevel1.c... error(compilation): clang failed with stderr: zig: error: unable to make temporary file: No such file or directory

error: unable to build libunwind: SubCompilationFailed

## busybox
docker run --rm -it -v $(pwd):/app -w /app kassany/ziglang:latest c++ -v ###
clang version 16.0.6 (https://github.com/ziglang/zig-bootstrap 34644ad5032c58e39327d33d7f96d63d7c330003)
Target: x86_64-unknown-linux-musl
Thread model: posix
InstalledDir: /app

## debian
docker run --rm -it -v $(pwd):/app -w /app kassany/bookworm-ziglang:latest bash
ziguana@ade7867cd389:/app$ zig c++ -v ###
clang version 16.0.6 (https://github.com/ziglang/zig-bootstrap 34644ad5032c58e39327d33d7f96d63d7c330003)
Target: x86_64-unknown-linux-musl
Thread model: posix
InstalledDir: /app

## my host
zig c++ -v ###
clang version 16.0.6 (https://github.com/ziglang/zig-bootstrap 34644ad5032c58e39327d33d7f96d63d7c330003)
Target: x86_64-unknown-linux-musl
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.1
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

@kassane kassane changed the title error: FileNotFound busybox: error: FileNotFound Aug 24, 2023
@kassane kassane changed the title busybox: error: FileNotFound busybox - issues Aug 24, 2023
@kassane
Copy link
Owner Author

kassane commented Aug 26, 2023

Recently there has been an attempt to preload the abi cache. However, it's not done on busybox, but works on debian and alpine.

# force Global-Cache preload
RUN zig c++ -target native-native-musl /dev/null 2>/dev/null; \
    zig c++ -target native-windows /dev/null 2>/dev/null; \
    zig c++ -target native-macos /dev/null 2>/dev/null

## $HOME/.cache/zig (builded: llvm-libcxx/abi + llvm-libunwind + libcompiler-rt + OS-libc [musl/mingw/macos-libc])

@kassane
Copy link
Owner Author

kassane commented Oct 21, 2023

@kassane
Copy link
Owner Author

kassane commented May 30, 2024

0.602 error: download 'https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz' failed: failed to connect to the HTTP server with TlsInitializationFailed

https://github.com/kassane/docker-zig/actions/runs/9303280676/job/25605238505#step:9:153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant