-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fatal error: 'stddef.h' file not found #1
Comments
I think i have found the cause, because ndk clang version and zig clang version are different, the resource is placed in wrong place, i will fix this soon |
This commit b41eaeb should fix this. |
Got another error saying
|
reported zig_resource_dir=/usr/local/bin/lib/clang/11.0.1
which zig do your currently in use?
…________________________________
From: Muhammad Brian Abdillah ***@***.***>
Sent: Monday, November 27, 2023 9:26
To: zongou/mini-ndk ***@***.***>
Cc: zongou ***@***.***>; Comment ***@***.***>
Subject: Re: [zongou/mini-ndk] Fatal error: 'stddef.h' file not found (Issue #1)
Got another error saying unable to find library -lgcc
Here's the full log:
./zig-ndk setup android-ndk-r26b
zig_resource_dir=/usr/local/bin/lib/clang/11.0.1
ndk_resource_dir=android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17
ndk_sysroot=android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot
Copying ndk_resource_dir to zig_resource_dir ...
Copying ndk_sysroot to zig_resource_dir ...
Create wrapper ld.lld
Create wrapper ld
Create wrapper clang
Create wrapper clang++
Create wrapper ar
Test compiling C hello world progarm ...
ld.lld: error: unable to find library -lgcc
ld.lld: error: unable to find library -lgcc
zig: error: linker command failed with exit code 1 (use -v to see invocation)
—
Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFRAYUHXWJVBETAMDNCOANDYGPT4JAVCNFSM6AAAAAA7WFSCAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWHE4TCNZYGM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
this tool only work for clang version above 16, only version above 16 can recognize ndk multilib resource to setup search dirs correctly
…________________________________
From: ZongOu Huang ***@***.***>
Sent: Monday, November 27, 2023 10:15
To: Muhammad Brian Abdillah ***@***.***>; zongou/mini-ndk ***@***.***>; zongou/mini-ndk ***@***.***>
Cc: Comment ***@***.***>
Subject: Re: [zongou/mini-ndk] Fatal error: 'stddef.h' file not found (Issue #1)
reported zig_resource_dir=/usr/local/bin/lib/clang/11.0.1
which zig do your currently in use?
________________________________
From: Muhammad Brian Abdillah ***@***.***>
Sent: Monday, November 27, 2023 9:26
To: zongou/mini-ndk ***@***.***>
Cc: zongou ***@***.***>; Comment ***@***.***>
Subject: Re: [zongou/mini-ndk] Fatal error: 'stddef.h' file not found (Issue #1)
Got another error saying unable to find library -lgcc
Here's the full log:
./zig-ndk setup android-ndk-r26b
zig_resource_dir=/usr/local/bin/lib/clang/11.0.1
ndk_resource_dir=android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17
ndk_sysroot=android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot
Copying ndk_resource_dir to zig_resource_dir ...
Copying ndk_sysroot to zig_resource_dir ...
Create wrapper ld.lld
Create wrapper ld
Create wrapper clang
Create wrapper clang++
Create wrapper ar
Test compiling C hello world progarm ...
ld.lld: error: unable to find library -lgcc
ld.lld: error: unable to find library -lgcc
zig: error: linker command failed with exit code 1 (use -v to see invocation)
—
Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFRAYUHXWJVBETAMDNCOANDYGPT4JAVCNFSM6AAAAAA7WFSCAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWHE4TCNZYGM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Oh yeah, my bad, I set it up in the wrong environment. root@22:~/mini-ndk# ./zig-ndk setup ~/android-ndk-r26b
zig_resource_dir=/snap/zig/lib/clang/16
ndk_resource_dir=/root/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17
ndk_sysroot=/root/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot
Copying ndk_resource_dir to zig_resource_dir ...
Copying ndk_sysroot to zig_resource_dir ...
Create wrapper ld.lld
Create wrapper ld
Create wrapper clang
Create wrapper clang++
Create wrapper ar
Test compiling C hello world progarm ...
In file included from <stdin>:1:
In file included from /snap/zig/lib/clang/16/sysroot/usr/include/stdio.h:42:
/snap/zig/lib/clang/16/sysroot/usr/include/sys/types.h:32:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
^~~~~~~~~~
1 error generated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OS: Ubuntu 20.04 LTS
Zig Version: 0.11.0
Ndk Version: 26.1.10909125
The text was updated successfully, but these errors were encountered: