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

anchor-lang and solana-client dependency conflict #3451

Open
hengshanMWC opened this issue Dec 24, 2024 · 8 comments
Open

anchor-lang and solana-client dependency conflict #3451

hengshanMWC opened this issue Dec 24, 2024 · 8 comments
Labels

Comments

@hengshanMWC
Copy link

I need the get_account method of solana-client, but they have conflicting dependencies
image
image

@docongminh
Copy link

docongminh commented Dec 26, 2024

For detail your problem. Please check issue-26688
Solution:
You can check my Cargo.toml
or
Another way use anchor-client use also use solana-client

use anchor_client::solana_client::*;

@hengshanMWC

@hengshanMWC
Copy link
Author

@docongminh Hello, using anchor-client dependency build error
`[package]
name = "anchor-test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "anchor_test"

[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
[dependencies]
anchor-lang = { version = "0.30.1", features = ["init-if-needed"] }
anchor-spl = "0.30.1"
anchor-client = { version = "0.30.1 ", features = ["async"] }`

anchor build

1668 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_RECVTOS)
| ^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1702:53
|
1702 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IP_HDRINCL)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IP_HDRINCL in module sys
--> src/socket.rs:1702:72
|
1702 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IP_HDRINCL)
| ^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1738:22
|
1738 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IP_HDRINCL in module sys
--> src/socket.rs:1739:22
|
1739 | sys::IP_HDRINCL,
| ^^^^^^^^^^ not found in sys

error[E0422]: cannot find struct, variant or union type Ipv6Mreq in module sys
--> src/socket.rs:1754:25
|
1754 | let mreq = sys::Ipv6Mreq {
| ^^^^^^^^ not found in sys

error[E0425]: cannot find function to_in6_addr in module sys
--> src/socket.rs:1755:36
|
1755 | ipv6mr_multiaddr: sys::to_in6_addr(multiaddr),
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1762:22
|
1762 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_ADD_MEMBERSHIP in module sys
--> src/socket.rs:1763:22
|
1763 | sys::IPV6_ADD_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^^ not found in sys

error[E0422]: cannot find struct, variant or union type Ipv6Mreq in module sys
--> src/socket.rs:1778:25
|
1778 | let mreq = sys::Ipv6Mreq {
| ^^^^^^^^ not found in sys

error[E0425]: cannot find function to_in6_addr in module sys
--> src/socket.rs:1779:36
|
1779 | ipv6mr_multiaddr: sys::to_in6_addr(multiaddr),
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1786:22
|
1786 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_DROP_MEMBERSHIP in module sys
--> src/socket.rs:1787:22
|
1787 | sys::IPV6_DROP_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1800:53
|
1800 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_HOPS)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_MULTICAST_HOPS in module sys
--> src/socket.rs:1800:72
|
1800 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_HOPS)
| ^^^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1814:22
|
1814 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_MULTICAST_HOPS in module sys
--> src/socket.rs:1815:22
|
1815 | sys::IPV6_MULTICAST_HOPS,
| ^^^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1865:53
|
1865 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_IF)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_MULTICAST_IF in module sys
--> src/socket.rs:1865:72
|
1865 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_IF)
| ^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1879:22
|
1879 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_MULTICAST_IF in module sys
--> src/socket.rs:1880:22
|
1880 | sys::IPV6_MULTICAST_IF,
| ^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1893:53
|
1893 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_LOOP)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_MULTICAST_LOOP in module sys
--> src/socket.rs:1893:72
|
1893 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_LOOP)
| ^^^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1906:22
|
1906 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_MULTICAST_LOOP in module sys
--> src/socket.rs:1907:22
|
1907 | sys::IPV6_MULTICAST_LOOP,
| ^^^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1918:53
|
1918 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_UNICAST_HOPS)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_UNICAST_HOPS in module sys
--> src/socket.rs:1918:72
|
1918 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_UNICAST_HOPS)
| ^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1930:22
|
1930 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_UNICAST_HOPS in module sys
--> src/socket.rs:1931:22
|
1931 | sys::IPV6_UNICAST_HOPS,
| ^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1944:53
|
1944 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_V6ONLY)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_V6ONLY in module sys
--> src/socket.rs:1944:72
|
1944 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_V6ONLY)
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1961:22
|
1961 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_V6ONLY in module sys
--> src/socket.rs:1962:22
|
1962 | sys::IPV6_V6ONLY,
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:1988:53
|
1988 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_RECVTCLASS)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_RECVTCLASS in module sys
--> src/socket.rs:1988:72
|
1988 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_RECVTCLASS)
| ^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_IPV6 in module sys
--> src/socket.rs:2015:22
|
2015 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPV6_RECVTCLASS in module sys
--> src/socket.rs:2016:22
|
2016 | sys::IPV6_RECVTCLASS,
| ^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function keepalive_time in module sys
--> src/socket.rs:2055:14
|
2055 | sys::keepalive_time(self.as_raw())
| ^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function set_tcp_keepalive in module sys
--> src/socket.rs:2196:14
|
2196 | sys::set_tcp_keepalive(self.as_raw(), params)
| ^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_TCP in module sys
--> src/socket.rs:2206:52
|
2206 | getsockopt::(self.as_raw(), sys::IPPROTO_TCP, sys::TCP_NODELAY)
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value TCP_NODELAY in module sys
--> src/socket.rs:2206:70
|
2206 | getsockopt::(self.as_raw(), sys::IPPROTO_TCP, sys::TCP_NODELAY)
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_TCP in module sys
--> src/socket.rs:2222:22
|
2222 | sys::IPPROTO_TCP,
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value TCP_NODELAY in module sys
--> src/socket.rs:2223:22
|
2223 | sys::TCP_NODELAY,
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value AF_INET in module sys
--> src/lib.rs:213:42
|
213 | pub const IPV4: Domain = Domain(sys::AF_INET);
| ^^^^^^^ not found in sys

error[E0425]: cannot find value AF_INET6 in module sys
--> src/lib.rs:216:42
|
216 | pub const IPV6: Domain = Domain(sys::AF_INET6);
| ^^^^^^^^ not found in sys

error[E0425]: cannot find value AF_UNIX in module sys
--> src/lib.rs:219:42
|
219 | pub const UNIX: Domain = Domain(sys::AF_UNIX);
| ^^^^^^^ not found in sys

error[E0425]: cannot find value SOCK_STREAM in module sys
--> src/lib.rs:258:40
|
258 | pub const STREAM: Type = Type(sys::SOCK_STREAM);
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value SOCK_DGRAM in module sys
--> src/lib.rs:263:39
|
263 | pub const DGRAM: Type = Type(sys::SOCK_DGRAM);
| ^^^^^^^^^^ not found in sys

error[E0425]: cannot find value SOCK_SEQPACKET in module sys
--> src/lib.rs:275:43
|
275 | pub const SEQPACKET: Type = Type(sys::SOCK_SEQPACKET);
| ^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value SOCK_RAW in module sys
--> src/lib.rs:283:37
|
283 | pub const RAW: Type = Type(sys::SOCK_RAW);
| ^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_ICMP in module sys
--> src/lib.rs:310:48
|
310 | pub const ICMPV4: Protocol = Protocol(sys::IPPROTO_ICMP);
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_ICMPV6 in module sys
--> src/lib.rs:313:48
|
313 | pub const ICMPV6: Protocol = Protocol(sys::IPPROTO_ICMPV6);
| ^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_TCP in module sys
--> src/lib.rs:316:45
|
316 | pub const TCP: Protocol = Protocol(sys::IPPROTO_TCP);
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value IPPROTO_UDP in module sys
--> src/lib.rs:319:45
|
319 | pub const UDP: Protocol = Protocol(sys::IPPROTO_UDP);
| ^^^^^^^^^^^ not found in sys

error[E0425]: cannot find value MSG_TRUNC in module sys
--> src/lib.rs:382:23
|
382 | self.0 & sys::MSG_TRUNC != 0
| ^^^^^^^^^ not found in sys

error[E0412]: cannot find type MaybeUninitSlice in module sys
--> src/lib.rs:390:38
|
390 | pub struct MaybeUninitSlice<'a>(sys::MaybeUninitSlice<'a>);
| ^^^^^^^^^^^^^^^^ not found in sys

error[E0412]: cannot find type msghdr in module sys
--> src/lib.rs:606:17
|
606 | inner: sys::msghdr,
| ^^^^^^ not found in sys

error[E0425]: cannot find function set_msghdr_name in module sys
--> src/lib.rs:628:14
|
628 | sys::set_msghdr_name(&mut self.inner, addr);
| ^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function set_msghdr_iov in module sys
--> src/lib.rs:638:14
|
638 | sys::set_msghdr_iov(&mut self.inner, ptr, bufs.len());
| ^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function set_msghdr_control in module sys
--> src/lib.rs:648:14
|
648 | sys::set_msghdr_control(&mut self.inner, ptr, buf.len());
| ^^^^^^^^^^^^^^^^^^ not found in sys

error[E0412]: cannot find type c_int in module sys
--> src/lib.rs:655:45
|
655 | pub fn with_flags(mut self, flags: sys::c_int) -> Self {
| ^^^^^ not found in sys
|
help: consider importing one of these items
|
61 + use core::ffi::c_int;
|
61 + use std::ffi::c_int;
|
61 + use std::os::raw::c_int;
|
help: if you import c_int, refer to it directly
|
655 - pub fn with_flags(mut self, flags: sys::c_int) -> Self {
655 + pub fn with_flags(mut self, flags: c_int) -> Self {
|

error[E0425]: cannot find function set_msghdr_flags in module sys
--> src/lib.rs:656:14
|
656 | sys::set_msghdr_flags(&mut self.inner, flags);
| ^^^^^^^^^^^^^^^^ not found in sys

error[E0412]: cannot find type msghdr in module sys
--> src/lib.rs:674:17
|
674 | inner: sys::msghdr,
| ^^^^^^ not found in sys

error[E0425]: cannot find function set_msghdr_name in module sys
--> src/lib.rs:701:14
|
701 | sys::set_msghdr_name(&mut self.inner, addr);
| ^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function set_msghdr_iov in module sys
--> src/lib.rs:710:14
|
710 | sys::set_msghdr_iov(&mut self.inner, bufs.as_mut_ptr().cast(), bufs.len());
| ^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function set_msghdr_control in module sys
--> src/lib.rs:719:14
|
719 | sys::set_msghdr_control(&mut self.inner, buf.as_mut_ptr().cast(), buf.len());
| ^^^^^^^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function msghdr_flags in module sys
--> src/lib.rs:725:14
|
725 | sys::msghdr_flags(&self.inner)
| ^^^^^^^^^^^^ not found in sys

error[E0425]: cannot find function msghdr_control_len in module sys
--> src/lib.rs:734:14
|
734 | sys::msghdr_control_len(&self.inner)
| ^^^^^^^^^^^^^^^^^^ not found in sys

error[E0433]: failed to resolve: use of undeclared crate or module imp
--> src/lib.rs:291:5
|
291 | imp::getrandom_inner(dest)
| ^^^ use of undeclared crate or module imp

For more information about this error, try rustc --explain E0433.
error: could not compile getrandom (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Some errors have detailed explanations: E0412, E0422, E0425, E0432, E0433, E0583.
For more information about an error, try rustc --explain E0412.
error: could not compile socket2 (lib) due to 218 previous errors
The following warnings were emitted during compilation:

warning: [email protected]: In file included from crypto/curve25519/curve25519.c:22:
warning: [email protected]: In file included from include/ring-core/mem.h:60:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/curve25519/curve25519.c:24:
warning: [email protected]: In file included from crypto/curve25519/internal.h:20:
warning: [email protected]: In file included from crypto/curve25519/../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/172e8fe49fe517e0-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
warning: [email protected]: In file included from include/ring-core/aes.h:52:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
warning: [email protected]: In file included from crypto/fipsmodule/aes/../../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/cf1be0f3c161d833-aes_nohw.o" "-c" "crypto/fipsmodule/aes/aes_nohw.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/bn/montgomery.c:109:
warning: [email protected]: In file included from crypto/fipsmodule/bn/internal.h:126:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/fipsmodule/bn/montgomery.c:109:
warning: [email protected]: In file included from crypto/fipsmodule/bn/internal.h:135:
warning: [email protected]: In file included from crypto/fipsmodule/bn/../../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/8debc3e725d2f0ed-montgomery.o" "-c" "crypto/fipsmodule/bn/montgomery.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/bn/montgomery_inv.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/bn/internal.h:126:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/fipsmodule/bn/montgomery_inv.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/bn/internal.h:135:
warning: [email protected]: In file included from crypto/fipsmodule/bn/../../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/8debc3e725d2f0ed-montgomery_inv.o" "-c" "crypto/fipsmodule/bn/montgomery_inv.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/ecp_nistz.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/ec/ecp_nistz.h:18:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/fipsmodule/ec/ecp_nistz.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/ec/ecp_nistz.h:20:
warning: [email protected]: In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:20:
warning: [email protected]: In file included from crypto/fipsmodule/ec/../../limbs/../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-ecp_nistz.o" "-c" "crypto/fipsmodule/ec/ecp_nistz.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/gfp_p256.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/ec/./p256_shared.h:22:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/fipsmodule/ec/gfp_p256.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/ec/./p256_shared.h:24:
warning: [email protected]: In file included from crypto/fipsmodule/ec/./../bn/internal.h:135:
warning: [email protected]: In file included from crypto/fipsmodule/ec/./../bn/../../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-gfp_p256.o" "-c" "crypto/fipsmodule/ec/gfp_p256.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/gfp_p384.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:18:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/fipsmodule/ec/gfp_p384.c:15:
warning: [email protected]: In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:20:
warning: [email protected]: In file included from crypto/fipsmodule/ec/../../limbs/../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-gfp_p384.o" "-c" "crypto/fipsmodule/ec/gfp_p384.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/p256.c:19:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/fipsmodule/ec/p256.c:21:
warning: [email protected]: In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:20:
warning: [email protected]: In file included from crypto/fipsmodule/ec/../../limbs/../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-p256.o" "-c" "crypto/fipsmodule/ec/p256.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/limbs/limbs.c:15:
warning: [email protected]: In file included from crypto/limbs/limbs.h:18:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/limbs/limbs.c:15:
warning: [email protected]: In file included from crypto/limbs/limbs.h:20:
warning: [email protected]: In file included from crypto/limbs/../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/7ee7113b20ac8aeb-limbs.o" "-c" "crypto/limbs/limbs.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/mem.c:57:
warning: [email protected]: In file included from include/ring-core/mem.h:60:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/mem.c:58:
warning: [email protected]: In file included from crypto/internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/0f1e39740815ef8c-mem.o" "-c" "crypto/mem.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/poly1305/poly1305.c:19:
warning: [email protected]: In file included from include/ring-core/poly1305.h:18:
warning: [email protected]: In file included from include/ring-core/base.h:74:
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/poly1305/poly1305.c:22:
warning: [email protected]: In file included from crypto/poly1305/../internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
warning: [email protected]: 27 | # include <assert.h>
warning: [email protected]: | ^~~~~~~~~~
warning: [email protected]: 2 errors generated.
warning: [email protected]: ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/123d8a351a02283d-poly1305.o" "-c" "crypto/poly1305/poly1305.c" with args clang did not execute successfully (status code exit status: 1).

error: failed to run custom build command for ring v0.17.8

Caused by:
process didn't exit successfully: /Applications/code/demo/anchor-test/target/release/build/ring-b0eba395caa577ef/build-script-build (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
OPT_LEVEL = Some(3)
OUT_DIR = Some(/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out)
TARGET = Some(sbf-solana-solana)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CC_sbf-solana-solana
CC_sbf-solana-solana = None
cargo:rerun-if-env-changed=CC_sbf_solana_solana
CC_sbf_solana_solana = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = Some(/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang)
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
cargo:rerun-if-env-changed=CFLAGS_sbf-solana-solana
CFLAGS_sbf-solana-solana = None
cargo:rerun-if-env-changed=CFLAGS_sbf_solana_solana
CFLAGS_sbf_solana_solana = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
CARGO_ENCODED_RUSTFLAGS = Some(-Zremap-cwd-prefix=)
cargo:warning=In file included from crypto/curve25519/curve25519.c:22:
cargo:warning=In file included from include/ring-core/mem.h:60:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/curve25519/curve25519.c:24:
cargo:warning=In file included from crypto/curve25519/internal.h:20:
cargo:warning=In file included from crypto/curve25519/../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.
exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/172e8fe49fe517e0-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
cargo:warning=In file included from include/ring-core/aes.h:52:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
cargo:warning=In file included from crypto/fipsmodule/aes/../../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/cf1be0f3c161d833-aes_nohw.o" "-c" "crypto/fipsmodule/aes/aes_nohw.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/bn/montgomery.c:109:
cargo:warning=In file included from crypto/fipsmodule/bn/internal.h:126:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/fipsmodule/bn/montgomery.c:109:
cargo:warning=In file included from crypto/fipsmodule/bn/internal.h:135:
cargo:warning=In file included from crypto/fipsmodule/bn/../../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/8debc3e725d2f0ed-montgomery.o" "-c" "crypto/fipsmodule/bn/montgomery.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/bn/montgomery_inv.c:15:
cargo:warning=In file included from crypto/fipsmodule/bn/internal.h:126:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/fipsmodule/bn/montgomery_inv.c:15:
cargo:warning=In file included from crypto/fipsmodule/bn/internal.h:135:
cargo:warning=In file included from crypto/fipsmodule/bn/../../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/8debc3e725d2f0ed-montgomery_inv.o" "-c" "crypto/fipsmodule/bn/montgomery_inv.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/ecp_nistz.c:15:
cargo:warning=In file included from crypto/fipsmodule/ec/ecp_nistz.h:18:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/fipsmodule/ec/ecp_nistz.c:15:
cargo:warning=In file included from crypto/fipsmodule/ec/ecp_nistz.h:20:
cargo:warning=In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:20:
cargo:warning=In file included from crypto/fipsmodule/ec/../../limbs/../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-ecp_nistz.o" "-c" "crypto/fipsmodule/ec/ecp_nistz.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/gfp_p256.c:15:
cargo:warning=In file included from crypto/fipsmodule/ec/./p256_shared.h:22:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/fipsmodule/ec/gfp_p256.c:15:
cargo:warning=In file included from crypto/fipsmodule/ec/./p256_shared.h:24:
cargo:warning=In file included from crypto/fipsmodule/ec/./../bn/internal.h:135:
cargo:warning=In file included from crypto/fipsmodule/ec/./../bn/../../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-gfp_p256.o" "-c" "crypto/fipsmodule/ec/gfp_p256.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/gfp_p384.c:15:
cargo:warning=In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:18:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/fipsmodule/ec/gfp_p384.c:15:
cargo:warning=In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:20:
cargo:warning=In file included from crypto/fipsmodule/ec/../../limbs/../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-gfp_p384.o" "-c" "crypto/fipsmodule/ec/gfp_p384.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/fipsmodule/ec/p256.c:19:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/fipsmodule/ec/p256.c:21:
cargo:warning=In file included from crypto/fipsmodule/ec/../../limbs/limbs.h:20:
cargo:warning=In file included from crypto/fipsmodule/ec/../../limbs/../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/c727d2a0dbf21ef5-p256.o" "-c" "crypto/fipsmodule/ec/p256.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/limbs/limbs.c:15:
cargo:warning=In file included from crypto/limbs/limbs.h:18:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/limbs/limbs.c:15:
cargo:warning=In file included from crypto/limbs/limbs.h:20:
cargo:warning=In file included from crypto/limbs/../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/7ee7113b20ac8aeb-limbs.o" "-c" "crypto/limbs/limbs.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/mem.c:57:
cargo:warning=In file included from include/ring-core/mem.h:60:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/mem.c:58:
cargo:warning=In file included from crypto/internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/0f1e39740815ef8c-mem.o" "-c" "crypto/mem.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=In file included from crypto/poly1305/poly1305.c:19:
cargo:warning=In file included from include/ring-core/poly1305.h:18:
cargo:warning=In file included from include/ring-core/base.h:74:
cargo:warning=include/ring-core/target.h:64:2: error: "Unknown target CPU"
cargo:warning= 64 | #error "Unknown target CPU"
cargo:warning= | ^
cargo:warning=In file included from crypto/poly1305/poly1305.c:22:
cargo:warning=In file included from crypto/poly1305/../internal.h:115:
cargo:warning=include/ring-core/check.h:27:11: fatal error: 'assert.h' file not found
cargo:warning= 27 | # include <assert.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=2 errors generated.

exit status: 1
cargo:warning=ToolExecError: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/123d8a351a02283d-poly1305.o" "-c" "crypto/poly1305/poly1305.c" with args clang did not execute successfully (status code exit status: 1).

--- stderr

error occurred in cc-rs: Command LC_ALL="C" "/Users/wencanma/.local/share/solana/install/releases/stable-7104d713ccc8fe0fcff1e296068d9844e4256b83/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=sbf-solana-solana" "-I" "include" "-I" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Applications/code/demo/anchor-test/target/sbf-solana-solana/release/build/ring-b95c0a593d90bde5/out/123d8a351a02283d-poly1305.o" "-c" "crypto/poly1305/poly1305.c" with args clang did not execute successfully (status code exit status: 1).

@docongminh
Copy link

@hengshanMWC how about your current OS ?

@acheroncrypto
Copy link
Collaborator

Yeah anchor-client exports solana-client:

pub use solana_client;

You should generally avoid adding solana-* dependencies if Anchor exports them to not have these kinds of conflicts.

On the other hand, the problem you mentioned in #3451 (comment) is a completely separate issue. It happens because you ran anchor build with anchor-client as a dependency. anchor-client is an off-chain client that uses restricted functionality that's not available for Solana programs. To solve, you should use the normal cargo build command instead.

Leaving this issue open for now because we may be able to improve the error message and explain the problem, similar to how we'll warn having solana-program as a dependency (#3250) in the next version (#3259).

@hengshanMWC
Copy link
Author

hengshanMWC commented Dec 27, 2024

@hengshanMWC how about your current OS ?您当前的操作系统怎么样?

@docongminh
Hello
Darwin wencandeMacBook-Pro.local 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103 arm64

@hengshanMWC
Copy link
Author

@acheroncrypto You can use cargo build, but the anchor command is no longer available, and anchor test is also unavailable.
image

@hengshanMWC
Copy link
Author

I want to generate AccountInfo from an address for airdrop sol and token. Which library should I use? The language is rust

@docongminh
Copy link

No, you can't.
Solana’s runtime transaction model enforces parallel execution by requiring that all accounts a program needs to read or write be declared and passed in when an instruction is dispatched.
Suggestion: You can use remainning_accounts to pass dynamic amount of accounts in instructions.
@hengshanMWC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants