env_logger: 0.8.2 fails to compile with rustc 1.48.0 due to unknown codegen option

   Compiling env_logger v0.8.2                                                                                                                                                                                     
error: unknown codegen option: `embed-bitcode`                                                                                                                                                                     
error: could not compile `env_logger`

$ rustc --version
rustc 1.48.0 (7eac88abb 2020-11-16)

$ cargo --version
cargo 1.48.0 (65cbdd2dc 2020-10-14)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 23 (13 by maintainers)

Most upvoted comments

No problem, great that it worked out!

The output.txt contains nothing more that the error that I am getting in the terminal.

cat output.txt
error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the '1.41.0-x86_64-unknown-linux-gnu' toolchain

When the errors happens, no target folder is created at all.

The following is the contents of target/.rustc_info.json after the successful build (when deleting the rust-toolchain file):

{
   "rustc_fingerprint":15281189911875476545,
   "outputs":{
      "4476964694761187371":{
         "success":true,
         "status":"",
         "code":0,
         "stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/va/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n",
         "stderr":""
      },
      "1164083562126845933":{
         "success":true,
         "status":"",
         "code":0,
         "stdout":"rustc 1.51.0 (2fd73fabe 2021-03-23)\nbinary: rustc\ncommit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0\ncommit-date: 2021-03-23\nhost: x86_64-unknown-linux-gnu\nrelease: 1.51.0\nLLVM version: 11.0.1\n",
         "stderr":""
      },
      "551384519178316037":{
         "success":false,
         "status":"exit code: 1",
         "code":1,
         "stdout":"",
         "stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"
      }
   },
   "successes":{
      
   }
}

I am also attaching the output.txt of the successful build.

output.txt

My Debian installation is a stock Debian stable (with all the latest updates). Nothing special.

Release it out.

Done in eed165155261fcb31f6648485462b9ee3c0ab670. I’ll try to do a release in the coming days, feel free to ping me if I still haven’t gotten to it next week.

Removing the rust-toolchain from the crates.io release should be easy enough and I don’t see a reason not to do that 👍🏼

env_logger doesn’t have a build script or anything else that I can see that could cause this. The string bitcode doesn’t appear anywhere inside this repository. I would recommend you ask for help about this on users.rust-lang.org, Discord, reddit or some other place for general help and advice about Rust.