Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

building servo on ubuntu 16.04 fails at mozjs #435

Open
paddywwoof opened this issue Aug 21, 2018 · 5 comments
Open

building servo on ubuntu 16.04 fails at mozjs #435

paddywwoof opened this issue Aug 21, 2018 · 5 comments

Comments

@paddywwoof
Copy link

not clear how this error can be fixed without altering the source.

   Compiling mozjs v0.8.0                                                       
error[E0277]: the trait bound `u8: std::convert::From<rust::MutableHandle<'_, u8>>` is not satisfied
    -->.../mozjs-0.8.0/src/rust.rs:1205:52
     |
1205 |             wrap!(@inner $saved <> ($($acc,)* $arg.into(),) <> $($rest)*);
     |                                                    ^^^^ the trait `std::convert::From<rust::MutableHandle<'_, u8>>` is not implemented for `u8`
     | 
    ::: .../mozjs-0.8.0/src/jsapi_wrappers.in:44:1
     |
44   | wrap!(jsapi: pub fn FinishMultiOffThreadScriptsDecoder(cx: *mut JSContext, token: *mut ::std::os::raw::c_void, scripts: MutableHandle<ScriptVector>) -> bool);
     | -------------------------------------------------------------------------------------------------------------------------------------------------------------- in this macro invocation
     |
     = help: the following implementations were found:
               <u8 as std::convert::From<bool>>
     = note: required because of the requirements on the impl of `std::convert::Into<u8>` for `rust::MutableHandle<'_, u8>`

error[E0277]: the trait bound `u8: std::convert::From<rust::MutableHandle<'_, u8>>` is not satisfied
    --> .../mozjs-0.8.0/src/rust.rs:1348:113
     |
1348 |             wrap!(@inner $saved <> ($($declargs)* $arg: &mut MutableHandle<$gentype> , )  <> ($($acc,)* (*$arg).into(),) <> $($rest)*);
     |                                                                                                                 ^^^^ the trait `std::convert::From<rust::MutableHandle<'_, u8>>` is not implemented for `u8`
     | 
    .../mozjs-0.8.0/src/jsapi_wrappers.in:44:1
@jdm
Copy link
Member

jdm commented Aug 22, 2018

This is caused by a too-old version of llvm being used for libclang. Replacing it with a newer version should make it go away.

@jdm
Copy link
Member

jdm commented Oct 3, 2018

Oh, this may be caused by a version of clang that is less than 3.9.

@rohit-136
Copy link

rohit-136 commented Mar 1, 2019

@jdm
I updated my clang version to version 6 but it still shows the same error.
error

@jdm
Copy link
Member

jdm commented Mar 1, 2019

@rohit-136 In general, that means that you have an older version of clang that is being found before the updated version.

@rohit-136
Copy link

@jdm I uninstalled clang 3.8 just to be sure and installed clang 6.0.1. The error persists even then.

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

No branches or pull requests

3 participants