Skip to content

sqlx 0.5.10 install problem #1678

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

Closed
Ezward opened this issue Feb 4, 2022 · 1 comment
Closed

sqlx 0.5.10 install problem #1678

Ezward opened this issue Feb 4, 2022 · 1 comment

Comments

@Ezward
Copy link

Ezward commented Feb 4, 2022

I am attempting to use sqlx with actix, but got stuck immediately at an installation bug related to #1604

I'm running MacOS Big Sur 11.6.2

$ rustc --version
rustc 1.58.0 (02072b482 2022-01-11)

I initially tried to install with just the 'postgres' feature, based on the instructions in this tutorial and got an error.

$ cargo install sqlx-cli --no-default-features --features postgres
...
error: one of the features ['runtime-actix-native-tls', 'runtime-async-std-native-tls', 'runtime-tokio-native-tls', 'runtime-actix-rustls', 'runtime-async-std-rustls', 'runtime-tokio-rustls'] must be enabled
  --> /Users/edmurphy/.cargo/registry/src/github.com.-1ecc6299db9ec823/sqlx-rt-0.5.10/src/lib.rs:9:1
   |
9  | / compile_error!(
10 | |     "one of the features ['runtime-actix-native-tls', 'runtime-async-std-native-tls', \
11 | |      'runtime-tokio-native-tls', 'runtime-actix-rustls', 'runtime-async-std-rustls', \
12 | |      'runtime-tokio-rustls'] must be enabled"
13 | | );
   | |_^

error: could not compile `sqlx-rt` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `sqlx-cli v0.5.10`, intermediate artifacts can be found at `/var/folders/hx/2g4wddts0mb9f3tbg471c75m0000gn/T/cargo-installiHvI4w`

So I then retried the install, including an actix runtime, but I still got an error,

$ cargo install sqlx-cli --no-default-features --features runtime-actix-rustls,postgres
    Updating crates.io index
  Installing sqlx-cli v0.5.10
error: failed to compile `sqlx-cli v0.5.10`, intermediate artifacts can be found at `/var/folders/hx/2g4wddts0mb9f3tbg471c75m0000gn/T/cargo-installnOGGPg`

Caused by:
  Package `sqlx-cli v0.5.10` does not have the feature `runtime-actix-rustls`

I then also tried with actix native tls

$ cargo install sqlx-cli --no-default-features --features runtime-actix-native-tls,postgres
    Updating crates.io index
  Installing sqlx-cli v0.5.10
error: failed to compile `sqlx-cli v0.5.10`, intermediate artifacts can be found at `/var/folders/hx/2g4wddts0mb9f3tbg471c75m0000gn/T/cargo-installiPw3bH`

Caused by:
  Package `sqlx-cli v0.5.10` does not have the feature `runtime-actix-native-tls`

The intermediate artifacts are just a .rustc_info.json with the following contents;

{
  "rustc_fingerprint":91532511382400490,
  "outputs":{
    "931469667778813386":{
      "success":true,
      "status":"",
      "code":0,
      "stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/edmurphy/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",
      "stderr":""
    },
    "2797684049618456168":{
      "success":true,
      "status":"",
      "code":0,
      "stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n",
      "stderr":""
    },
    "17598535894874457435":{
      "success":true,
      "status":"",
      "code":0,
      "stdout":"rustc 1.58.0 (02072b482 2022-01-11)\nbinary: rustc\ncommit-hash: 02072b482a8b5357f7fb5e5637444ae30e423c40\ncommit-date: 2022-01-11\nhost: x86_64-apple-darwin\nrelease: 1.58.0\nLLVM version: 13.0.0\n",
      "stderr":""
    }
  },
  "successes":{
    
  }
}

I'm not sure how to proceed.

@Ezward Ezward changed the title sqlx 5.10.0 install problem sqlx 0.5.10 install problem Feb 4, 2022
@abonander
Copy link
Collaborator

See the new install instructions here: https://github.com./launchbadge/sqlx/tree/master/sqlx-cli#with-rust-toolchain

The ones shown on crates.io are out of date.

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

No branches or pull requests

2 participants