-
Notifications
You must be signed in to change notification settings - Fork 342
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
Explicitly specify C++17 in libslic3r and libslic3r_cgal cmake, fixing build on Fedora 40 #4172
Conversation
…. Also excluded template-id-cdtor from Werror. These changes fix compilation issues on Fedora 40.
I put the |
you can wait the compiling result from https://github.com/bambulab/BambuStudio/actions/runs/9296852419 |
@lanewei120 Looks like the build succeeded without errors. |
compiling_error.txt |
@lanewei120 that is from the build before my second commit. It looks like the build after the second commit has no compilation errors and the binary was generated successfully. Could you please try re-running the build to confirm? |
https://github.com/MackBambu/BambuStudio/actions/runs/9635067680/job/26571467884 |
Investigating. |
After some digging, I can see that this error is related to the following discussion: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856 In summary, seems like the use of the type This is why the Ubuntu 24.04 build succeeded, but 20.04 failed. I will put in the same gcc version check in |
… from earlier implementation of __int28
@MackBambu I made a change that should make this work. Could you please re-run the build as you did before and check if it works? |
@MackBambu Looks like the build succeeded! One thing to note is that the version check for gcc version 14.1 is somewhat arbitrary. I'm not sure which exact version of gcc will make my changes work. However, > 14.1 is a safe choice because that's the version I tested on Fedora 40. |
https://github.com/MackBambu/BambuStudio/actions/runs/9657794626 |
yes, we will have a try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fedora 40, ubuntu 20, ubuntu 24 is ok
good job
Thank you! This confirms that requiring gcc > 14.1 for the changes I made is a safe choice for But it is important to note that the version number 14.1 is somewhat arbitrary - if a prior version of gcc results in compilation issues as described in the original bug ( #4018 ), then the version check needs to be update to that version. @lanewei120 If you are okay with these changes, please review and I can submit this PR. |
thanks for doing this |
Bambu studio currently fails to build on Fedora 40. This is because the CMake configuration of
libslic3r
andlibslic3r_cgal
currently does not explicitly specify the C++ standard, but it seems like thelibslic3r
andlibslic3r_cgal
code assumes C++17. Without explicit specification, the compiler uses C++20.Also added
-Wno-error=template-id-cdtor
to the compiler flags forClipper2
, preventing this warning from being thrown as an error. Thetemplate-id-cdtor
warning being thrown as an error is a c++20 addition in gcc.This fixes #4018.