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

Error while compiling with Aur package #191

Closed
LuisB79 opened this issue May 31, 2023 · 27 comments
Closed

Error while compiling with Aur package #191

LuisB79 opened this issue May 31, 2023 · 27 comments

Comments

@LuisB79
Copy link
Collaborator

LuisB79 commented May 31, 2023

i have seem to run into an error while compiling, cargo cannot compile notan_graphics

error: /home/[REDACTED]/.cache/paru/clone/oculante/src/oculante-0.6.64/target/release/deps/libnotan_macro-a1472673a4fa611c.so: undefined symbol: sc_internal_compiler_glsl_build_combined_image_samplers
  --> /home/[REDACTED]/.cargo/registry/src/github.com-1ecc6299db9ec823/notan_graphics-0.9.5/src/prelude.rs:13:9
   |
13 | pub use notan_macro::{
   |         ^^^^^^^^^^^

error: /home/[REDACTED]/.cache/paru/clone/oculante/src/oculante-0.6.64/target/release/deps/libnotan_macro-a1472673a4fa611c.so: undefined symbol: sc_internal_compiler_glsl_build_combined_image_samplers
  --> /home/[REDACTED]/.cargo/registry/src/github.com-1ecc6299db9ec823/notan_graphics-0.9.5/src/lib.rs:26:9
   |
26 | pub use notan_macro::{
   |         ^^^^^^^^^^^

error: could not compile `notan_graphics` due to 2 previous errors

i have attempted at cleaning the cargo cache, it did not fixed it.

@LuisB79
Copy link
Collaborator Author

LuisB79 commented May 31, 2023

it is worth noting that other notan modules do get compiled

@woelper
Copy link
Owner

woelper commented Jun 3, 2023

This is interesting. Since this seems to happen in notan, I would suggest to open an issue there perhaps? If you like, you could try cloning notan itself on your machine and see if it builds.

@LuisB79 LuisB79 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2023
@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 10, 2023

i'm being told that notan graphics and notan macro has the same metadata and that it should be recompiled with diferent metadata

@LuisB79 LuisB79 closed this as completed Jun 10, 2023
@LuisB79 LuisB79 reopened this Jun 10, 2023
@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 10, 2023

It seems there is a typo and cmake is missing in makedepends, quoting petsam in the aur

modify the target dir for the .desktop file. It currently creates a subfolder with extension .desktop, which is obviously not where it is meant to be installed in (typo?).

Change this:

install -Dm644 res/oculante.desktop -t "${pkgdir}/usr/share/applications/${pkgname}.desktop"

To this:

install -Dm644 res/oculante.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"

@woelper
Copy link
Owner

woelper commented Jun 10, 2023

Thank you so much! I got an email with the comment, but could not make much sense of it. Thank you for the context - I made the changes and will publish the update in the next release. Please let me know and reopen if this still fails.

@woelper woelper closed this as completed Jun 10, 2023
@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 11, 2023

I added cmake to makedepends and removed the -t in pkgbuild and res/pkgbuild and i'm still getting the same error

@woelper woelper reopened this Jun 11, 2023
@woelper
Copy link
Owner

woelper commented Jun 11, 2023

I think it would probably make sense to report this as an issue in notan. I've been looking at their requirements and it is not obvious that we are missing a required package/library.
Before we do that, could you please test the following:

  • can you clone oculante and successfully run it from master? (git clone https://github.com/woelper/oculante.git && cd oculante && cargo run) - maybe this gives us a hint.
  • can you run examples from notan? (git clone https://github.com/Nazariglez/notan.git && cd notan && cargo run --example text_hello)?

This is a wild guess, but the error looks like it could have something to do with compiling shaders, maybe there is something specific AUR packages are built vs. how you build as a regular user?

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 11, 2023

Oculante compiles successfully and runs as intended, i was unable to run the example from notan, the error i got was error: target `text_hello` in package `notan` requires the features: `text` Consider enabling them by passing, e.g., `--features="text" It is indeed something specific from AUR packages i would assume

@woelper
Copy link
Owner

woelper commented Jun 12, 2023

Thanks for testing. For notan you need to pass --features="text" (git clone https://github.com/Nazariglez/notan.git && cd notan && cargo run --example text_hello --features="text") - sorry for the incomplete instructions.
I doubt that this makes a difference though.

I guess since it compiles fine when run locally, I assume that there is either something missing in depends or makedepends or there is a fundamental difference how these packages are built. Also the error is not obvious to me from the error message.

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 19, 2023

i am sad to announce that the 6.65 AUR package has the same error

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 27, 2023

i am sad to announce, that the 6.66 AUR package has the same error, why not ask for help in the AUR?, i truly don't know what is the issue, and people in notan also don't know what the issue is :c

@woelper
Copy link
Owner

woelper commented Jun 27, 2023

Yeah, I am sorry for that. I also don't know anything about Arch/AUR, and am not sure where to start. I can try asking for help, but I can't test.

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 27, 2023

i could test it if you wish

@Adhalianna
Copy link
Contributor

@LuisB79 I have been using the AUR package successfully for a while so I wonder if there is something specific in your system that could be causing it. If you have tried reaching for help at some Arch users forums would you mind linking the discussion here? Otherwise, would you mind sharing some more details about your system? I probably won't be able to help much soon but I am very curious about source of the issue. Also, sorry for the -t typo. I hope to learn to write better pkgbuilds in the future 🙏

Some simple details about my system for comparison:
Distro: EndeavoursOS
Kernel: 6.3.9-arch1-1 (x86-64)
WM: sway (Wayland)
Rustc version: 1.70.0

I worry this might be much more difficult to track than finding differences but it would be a start.

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 27, 2023

@LuisB79 I have been using the AUR package successfully for a while so I wonder if there is something specific in your system that could be causing it. If you have tried reaching for help at some Arch users forums would you mind linking the discussion here? Otherwise, would you mind sharing some more details about your system? I probably won't be able to help much soon but I am very curious about source of the issue. Also, sorry for the -t typo. I hope to learn to write better pkgbuilds in the future pray

Some simple details about my system for comparison: Distro: EndeavoursOS Kernel: 6.3.9-arch1-1 (x86-64) WM: sway (Wayland) Rustc version: 1.70.0

I worry this might be much more difficult to track than finding differences but it would be a start.

Sure, its all been on discord i havent made a proper thread in the aur forums

Distro: Arch
Kernel: 6.3.9-arch1-1 (x86-64)
WM: Kwin x11
rustc version: 1.70.0 (90c541806 2023-05-31)

im using paru for installing aur packages

@Adhalianna
Copy link
Contributor

I tried to install it with paru and it worked fine.

I also took a peek at notan and I am suspecting something related to this function to be a potential source of issues. The function is invoked as part of the macros that fail to compile. Further I think it might be related the glsl_to_spirv crate that is used there, it has some interesting dependencies, quite complex code, and it seems to be deprecated.

I don't have X11 anywhere at hand so this might be as much as I can do for this week.

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jun 28, 2023

are you suggesting the use of x11 could be the issue and that it would be solved if i moved to a wayland wm?

@Adhalianna
Copy link
Contributor

Adhalianna commented Jun 28, 2023 via email

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Jul 28, 2023

Tried with wayland, still the same error, its pretty weird ngl

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Sep 3, 2023

i still have this issue on 7.4

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Sep 17, 2023

With 7.5 there seems to be more errros compiling

error[E0432]: unresolved imports `crate::handlers::AppCallback`, `crate::handlers::AppHandler`, `crate::handlers::DrawCallback`, `crate::handlers::DrawHandler`, `crate::handlers::EventCallback`, `crate::handlers::EventHandler`, `crate::handlers::ExtensionHandler`, `crate::handlers::InitCallback`, `crate::handlers::InitHandler`, `crate::handlers::PluginHandler`, `crate::handlers::SetupCallback`
 --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/builder.rs:7:5
  |
7 |     AppCallback, AppHandler, DrawCallback, DrawHandler, EventCallback, EventHandler,
  |     ^^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^^^^^^  ^^^^^^^^^^^^ no `EventHandler` in `handlers`
  |     |            |           |             |            |
  |     |            |           |             |            no `EventCallback` in `handlers`
  |     |            |           |             no `DrawHandler` in `handlers`
  |     |            |           no `DrawCallback` in `handlers`
  |     |            no `AppHandler` in `handlers`
  |     no `AppCallback` in `handlers`
8 |     ExtensionHandler, InitCallback, InitHandler, PluginHandler, SetupCallback,
  |     ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^^^^^^  ^^^^^^^^^^^^^
  |     |                 |             |            |
  |     |                 |             |            no `PluginHandler` in `handlers`
  |     |                 |             no `InitHandler` in `handlers`
  |     |                 no `InitCallback` in `handlers`
  |     no `ExtensionHandler` in `handlers`

error[E0432]: unresolved import `crate::handlers::SetupHandler`
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/builder.rs:23:9
   |
23 | pub use crate::handlers::SetupHandler;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `SetupHandler` in `handlers`

error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `notan_macro` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
 --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:8:1
  |
8 | notan_macro::handler_once!(Setup<&mut App, &mut Assets, &mut Graphics, &mut Plugins> -> S);
  | ^^^^^^^^^^^

error: cannot determine resolution for the macro `notan_macro::handler_once`
 --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:8:1
  |
8 | notan_macro::handler_once!(Setup<&mut App, &mut Assets, &mut Graphics, &mut Plugins> -> S);
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `notan_macro` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
 --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:9:1
  |
9 | notan_macro::handler_once!(Init<&mut App, &mut Assets, &mut Plugins, &mut S>);
  | ^^^^^^^^^^^

error: cannot determine resolution for the macro `notan_macro::handler_once`
 --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:9:1
  |
9 | notan_macro::handler_once!(Init<&mut App, &mut Assets, &mut Plugins, &mut S>);
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `notan_macro` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:10:1
   |
10 | notan_macro::handler!(App<&mut App, &mut Assets, &mut Plugins, &mut S>);
   | ^^^^^^^^^^^

error: cannot determine resolution for the macro `notan_macro::handler`
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:10:1
   |
10 | notan_macro::handler!(App<&mut App, &mut Assets, &mut Plugins, &mut S>);
   | ^^^^^^^^^^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `notan_macro` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:11:1
   |
11 | notan_macro::handler!(Event<&mut App, &mut Assets, &mut Plugins, &mut S, Event>);
   | ^^^^^^^^^^^

error: cannot determine resolution for the macro `notan_macro::handler`
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:11:1
   |
11 | notan_macro::handler!(Event<&mut App, &mut Assets, &mut Plugins, &mut S, Event>);
   | ^^^^^^^^^^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `notan_macro` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:12:1
   |
12 | notan_macro::handler!(Draw<&mut App, &mut Assets, &mut Graphics, &mut Plugins, &mut S>);
   | ^^^^^^^^^^^

error: cannot determine resolution for the macro `notan_macro::handler`
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:12:1
   |
12 | notan_macro::handler!(Draw<&mut App, &mut Assets, &mut Graphics, &mut Plugins, &mut S>);
   | ^^^^^^^^^^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `notan_macro` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:13:1
   |
13 | notan_macro::handler!(Plugin<&mut App, &mut Assets, &mut Graphics, &mut Plugins> -> !S); // !S sta...
   | ^^^^^^^^^^^

error: cannot determine resolution for the macro `notan_macro::handler`
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:13:1
   |
13 | notan_macro::handler!(Plugin<&mut App, &mut Assets, &mut Graphics, &mut Plugins> -> !S); // !S sta...
   | ^^^^^^^^^^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `notan_macro` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:14:1
   |
14 | notan_macro::handler!(Extension<&mut App, &mut Assets, &mut Graphics, &mut Plugins> -> $S); // $S ...
   | ^^^^^^^^^^^

error: cannot determine resolution for the macro `notan_macro::handler`
  --> /home/[REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/notan_app-0.10.0/src/handlers.rs:14:1
   |
14 | notan_macro::handler!(Extension<&mut App, &mut Assets, &mut Graphics, &mut Plugins> -> $S); // $S ...
   | ^^^^^^^^^^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

Some errors have detailed explanations: E0432, E0519.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `notan_app` (lib) due to 16 previous errors
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'oculante-0.7.5-1': 
error: packages failed to build: oculante-0.7.5-1
´´´

I tried removing all the cache saved in cargo, sadly it didn't fixed the problem

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Sep 17, 2023

Jesus christ, the error was lto, it was lto on the makepkg.conf, literally flew on top of my head because i didnt have the -flto.

@woelper
Copy link
Owner

woelper commented Sep 19, 2023

I don't fully understand this is about - you are referring to Link Time Optimization?

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Sep 19, 2023

Yes, arch uses makepkg and there are some flags enabled by default, others that you can tune in, anyhow, lto messes with how its compiled, and is well known that various rust programs have difficulties compiling thanks to lto

@woelper
Copy link
Owner

woelper commented Sep 19, 2023

I do have a couple of optimizations enabled in my Cargo.toml, and one of them is lto:

[profile.release]
codegen-units = 1
# incremental = false
lto = true
strip = true
opt-level = 3
panic = "abort"

Do you think this will cause trouble in your case, or is #226 enough and I should edit the PKGBUILD?

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Sep 19, 2023

I do have a couple of optimizations enabled in my Cargo.toml, and one of them is lto:

[profile.release]
codegen-units = 1
# incremental = false
lto = true
strip = true
opt-level = 3
panic = "abort"

Do you think this will cause trouble in your case, or is #226 enough and I should edit the PKGBUILD?

i am not sure, since disabling the lto flag in my makepkg.conf is what let me compile the program, i didnt edit the cargo.toml, i wonder if makepkg adds another flag on top of that

@LuisB79
Copy link
Collaborator Author

LuisB79 commented Sep 19, 2023

i am not sure, since disabling the lto flag in my makepkg.conf is what let me compile the program, i didnt edit the cargo.toml, i wonder if makepkg adds another flag on top of that

its worth noting that lto is enabled by default in arch

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

3 participants