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

fix "file too big" error in MinGW Debug #644

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

jacquetc
Copy link
Contributor

@jacquetc jacquetc commented Aug 1, 2023

@ahayzen-kdab
Copy link
Collaborator

Cool thanks! lets see what CI thinks.

And does this now mean that MinGW builds and works on Windows ? As i've then created another task #645 to create a CI runner for it, so we can ensure we don't regress :-)

@jacquetc
Copy link
Contributor Author

jacquetc commented Aug 1, 2023

Cool thanks! lets see what CI thinks.

And does this now mean that MinGW builds and works on Windows ? As i've then created another task #645 to create a CI runner for it, so we can ensure we don't regress :-)

That is a good assumption. I have still errors, but about my own code, so I can't be sure before fixing my own mess. :)

@Be-ing
Copy link
Contributor

Be-ing commented Aug 1, 2023

That is a good assumption. I have still errors, but about my own code, so I can't be sure before fixing my own mess. :)

Please try building the examples in this repo with MinGW so you don't have the uncertainty about your downstream code. I'd like to confirm that MinGW builds do work with this before merging.

@jacquetc jacquetc force-pushed the fix/625-file-too-big-error branch from 3ec2bac to ffb3b64 Compare August 1, 2023 14:04
@Be-ing Be-ing force-pushed the fix/625-file-too-big-error branch from ffb3b64 to 9afa9fb Compare August 1, 2023 15:16
@Be-ing
Copy link
Contributor

Be-ing commented Aug 1, 2023

Can you explicitly confirm this does build now with MinGW? I'm unclear if that's what you meant by the 👍 on my last comment.

@jacquetc
Copy link
Contributor Author

jacquetc commented Aug 1, 2023

Can you explicitly confirm this does build now with MinGW? I'm unclear if that's what you meant by the 👍 on my last comment.

I was only acknowledging the demand, not giving the OK

@jacquetc
Copy link
Contributor Author

jacquetc commented Aug 1, 2023

Problem while compiling cc-rs and no time tonight to debug it.

   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling jobserver v0.1.26
   Compiling winapi v0.3.9
   Compiling memchr v2.5.0
   Compiling once_cell v1.18.0
   Compiling thiserror v1.0.44
   Compiling minimal-lexical v0.2.1
   Compiling cc v1.0.79
   Compiling either v1.9.0
   Compiling unicode-width v0.1.10
   Compiling itertools v0.10.5
   Compiling cxxbridge-flags v1.0.102
   Compiling unicode-segmentation v1.10.1
   Compiling scratch v1.0.7
error[E0615]: attempted to take value of method `into` on type `&String`
    --> C:\Users\cyril\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cc-1.0.79\src\lib.rs:1552:44
     |
1552 |             println!("supported: {}", flag.into);
     |                                            ^^^^ method, not a field
     |
help: use parentheses to call the method
     |
1552 |             println!("supported: {}", flag.into());
     |                                                ++

error[E0615]: attempted to take value of method `into` on type `&String`
    --> C:\Users\cyril\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cc-1.0.79\src\lib.rs:1554:53
     |
1554 |                 println!("supported flag: {}", flag.into);
     |                                                     ^^^^ method, not a field
     |
help: use parentheses to call the method
     |
1554 |                 println!("supported flag: {}", flag.into());
     |                                                         ++

For more information about this error, try `rustc --explain E0615`.
error: could not compile `cc` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@ahayzen-kdab
Copy link
Collaborator

Looks like you have local changes or something broken upstream in cc, but they haven't had a release in a while.

Could try cargo update and ensure you don't have any patches.

@jacquetc
Copy link
Contributor Author

jacquetc commented Aug 1, 2023

I had first to delete the .cargo/registry and then it compiled.
Qt 6 MingGW Debug : Ok
Qt 5 MinGW Debug : Ok

@Be-ing Be-ing merged commit 914ae19 into KDAB:main Aug 1, 2023
@Be-ing
Copy link
Contributor

Be-ing commented Aug 1, 2023

Thanks for your contributions! I'm glad we have MinGW support now!!

@LeonMatthesKDAB
Copy link
Collaborator

@jacquetc Thank you very much for the contribution 🥳

We should probably also investigate whether we can decrease the size of these object files.
This seems like it might be contributing to the issues we're having with long compile times on the C++ side of cxx-qt-lib.
If the object files we're generating are that huge, maybe there's more code generated than we actually need.

@jacquetc
Copy link
Contributor Author

jacquetc commented Aug 9, 2023

@jacquetc Thank you very much for the contribution 🥳

We should probably also investigate whether we can decrease the size of these object files. This seems like it might be contributing to the issues we're having with long compile times on the C++ side of cxx-qt-lib. If the object files we're generating are that huge, maybe there's more code generated than we actually need.

You are welcome 😄 I fear that investigating the size is a bit too low level for my current knowledge.
Also, we must remember to update the documentation.

@LeonMatthesKDAB
Copy link
Collaborator

Right, don't feel obliged to continue on this issue, we can probably look into this ourselves, as the object files are likely just as big on linux. It's just something to keep in mind when we finally get around to optimizing for build times.

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

Successfully merging this pull request may close these issues.

4 participants