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

Cannot build version 0.9 #87

Open
Peepo-Juice opened this issue May 11, 2024 · 2 comments
Open

Cannot build version 0.9 #87

Peepo-Juice opened this issue May 11, 2024 · 2 comments

Comments

@Peepo-Juice
Copy link

Peepo-Juice commented May 11, 2024

I ran into this problem while trying to get it to work with Bevy game engine, via the bevy_mod_scripting crate. But I made a simplified version that does nothing and only has the following dependency:

tealr = { version = "0.9", features = [
    "mlua_luajit",
    "mlua_vendored",
    "mlua_send",
    "mlua_macros",
] }

I am on NixOS (x86_64)

Error:
error[E0463]: can't find crate for 'tealr_derive'
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu.rs:93:9
   |
93 | pub use tealr_derive::MluaFromTo...
   |         ^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for 'tealr_derive'
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu.rs:100:9
    |
100 | pub use tealr_derive::MluaTealD...
    |         ^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for 'tealr_derive'
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu.rs:109:9
    |
109 | pub use tealr_derive::MluaUserD...
    |         ^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for 'tealr_derive'
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:29:9
   |
29 | pub use tealr_derive::ToTypename;
   |         ^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for 'tealr_derive'
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:36:9
   |
36 | pub use tealr_derive::compile_in...
   |         ^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for 'tealr_derive'
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:42:9
   |
42 | pub use tealr_derive::embed_comp...
   |         ^^^^^^^^^^^^ can't find crate

error[E0432]: unresolved imports 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename', 'crate::ToTypename'
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu/teal_data.rs:1:5
   |
1  | use crate::ToTypename;
   |     ^^^^^^^^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu/teal_data_fields.rs:3:5
   |
3  | use crate::ToTypename;
   |     ^^^^^^^^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu/teal_data_methods.rs:5:29
   |
5  | ...tiValue, ToTypename};
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu/typed_function.rs:5:29
   |
5  | ...tiValue, ToTypename};
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu/user_data_proxy.rs:5:45
   |
5  | ...nerator, ToTypename, Type, Ty...
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/mlu/user_data_wrapper.rs:9:62
   |
9  | ...tiValue, ToTypename, TypeName};
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/export_instance.rs:3:54
   |
3  | ...dOfType, ToTypename, TypeName};
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/teal_multivalue.rs:3:46
   |
3  | ...dOfType, ToTypename, Type};
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:32:71
   |
32 | ...amePart, ToTypename, Type, Ty...
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_representation.rs:1:59
   |
1  | ...gleType, ToTypename, Type};
   |             ^^^^^^^^^^
   |
  ::: /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_walker.rs:3:42
   |
3  | ...amePart, ToTypename, Type, Ty...
   |             ^^^^^^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/exported_function.rs:23:5
   |
23 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/exported_function.rs:32:9
   |
32 |         tealr(remote = X)
   |         ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/teal_multivalue.rs:17:5
   |
17 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/teal_multivalue.rs:23:9
   |
23 |         tealr(remote =  String))]
   |         ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:135:5
    |
135 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:142:9
    |
142 | ...   tealr(remote =  RecordGen...
    |       ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:171:5
    |
171 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:178:5
    |
178 |     tealr(remote = V)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:232:5
    |
232 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:243:5
    |
243 |     tealr(remote = V)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:286:5
    |
286 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_generator.rs:297:9
    |
297 |         tealr(remote = V)
    |         ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_representation.rs:44:5
   |
44 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_representation.rs:138:5
    |
138 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_representation.rs:147:9
    |
147 |         tealr(remote =  String))]
    |         ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_walker.rs:19:5
   |
19 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_walker.rs:25:9
   |
25 |         tealr(remote =  String))]
   |         ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_walker.rs:30:9
   |
30 |         tealr(remote =  V))]
   |         ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_walker.rs:52:5
   |
52 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/type_walker.rs:73:5
   |
73 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:62:5
   |
62 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:68:5
   |
68 |     tealr(remote =  String))]
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
  --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:93:5
   |
93 |     tealr(tealr_name = crate)
   |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:113:5
    |
113 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:133:5
    |
133 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:153:5
    |
153 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:159:9
    |
159 |         tealr(remote =  Type))]
    |         ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:164:9
    |
164 |         tealr(remote =  Type))]
    |         ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:182:5
    |
182 |     tealr(tealr_name = crate)
    |     ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:196:13
    |
196 | ...   tealr(remote =  NewTypeAr...
    |       ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:203:13
    |
203 | ...   tealr(remote =  Type))]
    |       ^^^^^

error: cannot find attribute 'tealr' in this scope
   --> /home/peepo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tealr-0.9.1/src/lib.rs:212:13
    |
212 | ...   tealr(remote =  NewTypeAr...
    |       ^^^^^

Some errors have detailed explanations: E0432, E0463.
For more information about an error, try 'rustc --explain E0432'.
error: could not compile 'tealr' (lib) due to 39 previous errors

I noticed #80 but i should have the fix in my rustc. Turns out its being caused by the Mold linker. If I just use whatever the default linker is, it works fine. This is not an acceptable solution though, cus it increases compile times from 1.5 seconds to 15 seconds. I will open a ticket in the Mold repo to see if they can fix it.

@lenscas
Copy link
Owner

lenscas commented May 11, 2024

I don't use mold and so far never had a need to. I'm however not entirely sure how a linker would create this problem as it complains about tealr_derive missing. Which is a proc_macro crate. So, I fail to see how/why a linker would matter for it?

@Peepo-Juice
Copy link
Author

I don't use mold and so far never had a need to. I'm however not entirely sure how a linker would create this problem as it complains about tealr_derive missing. Which is a proc_macro crate. So, I fail to see how/why a linker would matter for it?

Yeah, I have no idea either. But changing the compiler doesn't change anything. Only Rust's default linker works. When I try either lld or mold, I get the same issue.

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

No branches or pull requests

2 participants