Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 712424

Summary: dev-util/cbindgen-0.13.1 : error: cannot produce proc-macro for serde_derive v1.0.104 as the target x86_64-unknown-linux-musl does
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED CANTFIX    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
dev-util:cbindgen-0.13.1:20200313-210149.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2

Description Toralf Förster gentoo-dev 2020-03-13 21:09:04 UTC
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-util/cbindgen-0.13.1/work/cbindgen-0.13.1 ...
error: cannot produce proc-macro for serde_derive v1.0.104 as the target x86_64-unknown-linux-musl does not support these crate types
 * ERROR: dev-util/cbindgen-0.13.1::gentoo failed (compile phase):
 *   cargo build failed
 * 

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200311-204810

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.2.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.1 *

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Fri, 13 Mar 2020 16:39:23 +0000
emerge -qpvO dev-util/cbindgen
[ebuild  N    ] dev-util/cbindgen-0.13.1  USE="-debug"
Comment 1 Toralf Förster gentoo-dev 2020-03-13 21:09:07 UTC
Created attachment 618686 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-13 21:09:09 UTC
Created attachment 618688 [details]
dev-util:cbindgen-0.13.1:20200313-210149.log
Comment 3 Toralf Förster gentoo-dev 2020-03-13 21:09:12 UTC
Created attachment 618690 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-03-13 21:09:15 UTC
Created attachment 618692 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-03-13 21:09:18 UTC
Created attachment 618694 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-13 21:09:21 UTC
Created attachment 618696 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-03-13 21:09:24 UTC
Created attachment 618698 [details]
temp.tbz2
Comment 8 Georgy Yakovlev archtester gentoo-dev 2020-03-13 22:38:55 UTC
Yeah it’s known limitation of rust on musl, you have to add custom rustflags, check rust’s postinst message.
I’ll reach out on IRC to guide you how to do that, otherwise tou gonna file a lot more similar bugs :-)
Comment 9 Georgy Yakovlev archtester gentoo-dev 2020-03-13 22:45:41 UTC
closing, please add 

RUSTFLAGS="-C target-feature=-crt-static" to make.conf on musl, like discussed on IRC.

rust on musl compiles static binaries by default and above setting changes it to dynamic, as some crates can't be compiled as static and everything that depends on those crates will fail like that, that's known limitation and musl users know it (unless they use smaeul's fork with already does this internally by default)