-
Notifications
You must be signed in to change notification settings - Fork 53
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
RFE: Set the default build type in RPM builds to RelWithDebInfo #915
Comments
I think we need to update in Fedora to 0.10.6 at the very least to fix stripping the debug symbols (nvm, I've already done that for Alternatively we could check for if we are building within a RPM environment and switch the default, but that seems quite an |
This happens with 0.10.7.
Yes, see the report above: build_type: str = "Release" if "RPM_BUILD_ROOT" not in os.environ else "RelWithDebInfo" |
@henryiii what do you think, should we make a function One slight annoyance is that if you enter Gentoo are considering adding |
What about setting SKBUILD_CMAKE_BUILD_TYPE to "RelWithDebInfo", or setting SKBUILD_INSTALL_STRIP to "false"? We could change the default for RPM_BUILD_ROOT (we have some customizations for conda-build, too, IIRC), but as a first thought if the scikit-build-core recipe on fedora could export an environment variable, that would work. Don't know if it's possible, though? |
That would be my preference as well, but it is a tricky one. @hroncok would it work if Maybe it's not a preferred approach regarding python ecosystem homogeneity, but I think it is warranted because we might want to make sure some |
It would but it goes against the fundamental principle of
Yes. This is exactly how it works e.g. in Fedora ELN/CentOS Stream, where even
Well, we might engineer a solution where individual build-backends packaged in Fedora can install a shell snippet to a well-defined location (containing environment variables) and the pyproject macros would attempt to source/%load/etc. this file when calling |
Hello.
Recently, with @hrnciar we discovered the Fedora RPM build of rapidfuzz fails because the debuginfo could not be found.
I've searched why that is possible and found some information in #875
In Fedora, we found our own CFLAGS (and CXXFLAGS) and they include (amongst others)
-O2
and-g
. I don't know exactly if the build type as explained in https://stackoverflow.com/a/59314670/1839451 overrides those flags or not, but I know at least this:Hence I was wondering if it was acceptable for you to set the default build type to RelWithDebInfo when RPM build is detected. I completely understand if this is not a territory you want to go to -- we can certainly patch our RPM package of scikit-build-core to do this if you are not interested.
The detection should be possible to do like this:
I don't know if this can be here:
scikit-build-core/src/scikit_build_core/settings/skbuild_model.py
Line 64 in f0ae319
Or if it needs to be handled similarly to
scikit-build-core/src/scikit_build_core/settings/skbuild_read_settings.py
Lines 230 to 234 in 8380c9e
Let me know if something like this would be acceptable to you. Thanks.
The text was updated successfully, but these errors were encountered: