electrs: Fails compiling against Bionic libc
Compiling against Bionic libc with the Android NDK gives:
Compiling sysconf v0.3.4
error[E0081]: discriminant value `96` already exists
--> /home/builder/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4/src/raw.rs:83:19
|
20 | macro_rules! sc { ($var:ident) => (libc::$var as isize) }
| ------------------- first use of `96`
...
83 | Sc2CVersion = 96, // TODO(joshlf): Switch to a libc constant once it's added
| ^^ enum already has `96`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0081`.
error: could not compile `sysconf`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `electrs v0.8.3 (/home/builder/.termux-build/electrs/src)`, intermediate artifacts can be found at `/home/builder/.termux-build/electrs/src/target`
Looks like it’s an issue with the sysconf dep. Is it possible to work around this?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 22 (16 by maintainers)
Thanks!
It seems to get worked until a point where it tries to use llvm-config. LLVM/Clang is the main compiler on this version of FreeBSD but apparently this tool wasn’t included. I’m installing the llvm version from ports and will report back once its finished compiling.
The tooling I’m using to create the Android build actually supports having a load of
*.patchfiles it’ll automatically apply after pulling the source so I’ll have a go at patching this on my end for now.Thanks!
FYI: https://github.com/ZeroCostGoods/sysconf.rs/issues/19
Taking a look at it.