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

Can't build for mips-unknown-linux-musl (big endian platforms) #361

Closed
darrint opened this issue Nov 29, 2016 · 4 comments
Closed

Can't build for mips-unknown-linux-musl (big endian platforms) #361

darrint opened this issue Nov 29, 2016 · 4 comments

Comments

@darrint
Copy link

darrint commented Nov 29, 2016

$ cargo build --target mips-unknown-linux-musl   Compiling ring v0.4.3
   Compiling url v1.2.3
   Compiling openssl-sys-extras v0.7.14
   Compiling regex v0.1.80
error: macro undefined: 'u32x2!'
   --> /home/de-user/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.4.3/src/digest/digest.rs:326:9
    |
326 |         u32x2!(0x67452301u32, 0xefcdab89u32),
    |         ^^^^^

error: macro undefined: 'u32x2!'
   --> /home/de-user/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.4.3/src/digest/digest.rs:327:9
    |
327 |         u32x2!(0x98badcfeu32, 0x10325476u32),
    |         ^^^^^

$ cargo --version
cargo 0.13.0-nightly (eca9e15 2016-11-01)

$ rustc --version
rustc 1.13.0 (2c6933acc 2016-11-07)

@briansmith
Copy link
Owner

If you look at the source code for the u32x2 macro you'll see that it is only defined when the target endianness is little-endian. Therefore, we need somebody to contribute a big-endian implementation in order for this code to compile, which should be easy.

After that, in order to get the code to link, we'd need to get the MIPS assembly source code for all the assembly language modules from OpenSSL. BoringSSL removed all the MIPS assembly language code and ring removed all the non-assembly language code. This second task is quite a bit of work.

@darrint
Copy link
Author

darrint commented Nov 29, 2016

Thanks for the info.

@darrint darrint closed this as completed Nov 29, 2016
@briansmith briansmith reopened this Nov 29, 2016
@briansmith briansmith changed the title Can't build for mips-unknown-linux-musl Can't build for mips-unknown-linux-musl (big endian platforms) Nov 29, 2016
@briansmith
Copy link
Owner

If somebody's interested in getting ring to work on MIPS, I'm happy to assist. At least getting things to compile for big-endian should be easy.

@briansmith
Copy link
Owner

Closing this as a dupe of #562.

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

No branches or pull requests

2 participants