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

Issue on legion_prof installation #1780

Open
chenzhuofu opened this issue Oct 22, 2024 · 3 comments
Open

Issue on legion_prof installation #1780

chenzhuofu opened this issue Oct 22, 2024 · 3 comments

Comments

@chenzhuofu
Copy link

Issue

When I tried to install legion_prof with following command (in Windows platform),

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install --locked --all-features --path legion/tools/legion_prof_rs

It will output an error as,

error[E0432]:unresolved import `winapi::um::winuser`
-->C: \Users\home\.cargo\registry\src\index,crates,io-6f17d22bba15001f\eframe-0.25.0\src\native\app icon.rs:83:9
83 use winapi::um::winuser;
                    no `winuser` in `um`
note:found an item that was configured out
-->C:\Users\home\.cargo\registry\src index,crates.i0-6f17d22bba15001f\winapi-0.3.9\src\um\mod.rs:290:37
290 #[cfg(feature ="winuser")] pub mod winuser;
note: the item is gated behind the `winuser` feature
-->C:\Users\home\.cargo\registry\src\index,crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\mod.rs:290:7
290 #[cfg(feature ="winuser")] pub mod winuser;

Solution

How can I walked by is manually updating a depdent crate version and installing w/o --locked.

  • add eframe = "0.28.1" in deps\legion\tools\legion_prof_rs\Cargo.toml: [dependencies]
  • run cargo install --all-features --path . in the same dir

I'm not sure if there is a more elegant approach or fix for this? Or is just my misoperation?

@chenzhuofu chenzhuofu changed the title Issue of legion_prof installation Issue on legion_prof installation Oct 22, 2024
@elliottslaughter
Copy link
Contributor

Unfortunately, Windows is not a platform that we test regularly, so things may be broken there.

I would actually be shocked if eframe 0.28 works for you. The version of eframe needs to match egui, and egui 0.26 was already having issues that I haven't been able to resolve yet. I presume that the larger egui community tests on Windows, so there may be a different version fix that would work (keeping egui at 0.25 but changing something else). But I'm not on a Windows machine so I cannot test that for you.

I think the options are:

  1. Fiddle around with versions until you find something that works with egui 0.25.
  2. Use a Linux/Mac machine to run the profiler for now. (Note that you can always run the viewer inside of a web browser. It's just the offline processing portion that you will need to move to Linux/Mac.)

At some point I may be able to fix newer egui versions, but I was pretty stuck the last time I looked and the available documentation did not indicate how to resolve my problems.

@chenzhuofu
Copy link
Author

I see. For option 2 do you mean using archive mode? I could try it later, but for now windows legion_prof works fine, so I'm good anyway :-)

@elliottslaughter
Copy link
Contributor

I suppose if things work for you, you can just keep on doing what you're doing. 😀

For 2, archive mode would work, or you can serve the live profile (if you can provide an SSH tunnel). You will either need a machine with a working viewer or else to upload the archive to a server with the appropriate CORS headers set and then use the online viewer at https://legion.stanford.edu/prof-viewer/?url=... (where ... is your URL and must end in a /).

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