-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Cross-compiling from Linux to Windows #380
Comments
The _Unwind_Resume problem is known, but not fixed. It's not Rend3. See |
Tracy is already feature gated: https://github.com/BVE-Reborn/rend3/blob/trunk/examples/scene-viewer/Cargo.toml#L27-L28 Unfortunately I don't know much about cross compiling, I always use native builds through CI, so I'm not going to be much help here. |
Thanks. The undefined symbol isn't a Rend3 problem, anyway. Where do I turn the feature off? It's apparently on by default if I just build "rend3" with its examples. |
Sorry, version problem. With the current Github Rend3, "tracy" is not loaded by default. So, past that problem. |
Great! Going to close as the rest of this seems outside of rend3's jurisdiction |
It's not a Rend3 problem. Now that I have it working, though, here's what's required: I've been able to run most of the Rend3 tests and my own application, cross-compiled from Linux to Windows and then run under Wine. Notes:
Rust is supposed to statically link the standard C++ libraries, but it doesn't for some C++ dependencies. Ref: Rust issue #67408 |
Fixed dependency issue. I was still pulling in the deprecated "basis" package, which pulls in those DLLs. After revising my code to load the skybox without using "basis", the Windows executable ran under Wine 7.0 with no need to provide extra DLLs. So Rend3 now cross-compiles nicely. |
Great to hear! |
It almost works. But not quite.
Tried to build Rend3 on Linux with Windows target "i686-pc-windows-gnu". This fails because Tracy won't build.
Rust Tracy dev blames upstream C++ Tracy project and MinGW C++ environment. See
nagisa/rust_tracy_client#31
This isn't really a Rend3 problem. But perhaps Tracy inclusion in the project could be tied to a "tracy" feature gate.
I use this in my own code:
With a "tracy" feature gate I can better debug and report cross-compile problems.
When I compile my own application, with the "tracy" feature gate off, I get all the way to linking, and then fail.
The missing symbol needed is _Unwind_Resume, which is part of the C++ exception system.
This came up in some other Rust context at: rust-lang/rust#77394
This is probably a "need to install some library"/"missing dependency" problem. I'm using the current release Rust on Ubuntu 20.04 LTS, so in theory I'm current.
(I don't use Windows much and have only an old Windows 7 machine without MSVC.)
Attached entire compile.
crosscompilelinkfail.txt
The text was updated successfully, but these errors were encountered: