-
Notifications
You must be signed in to change notification settings - Fork 14
Use Requires.private only for static linking #42
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
Use Requires.private only for static linking #42
Conversation
GitHub: - ruby-gnome#41 (comment) - ruby-gnome#41 (comment) By default, exclude `Requires.private` dependencies from cflags and libs output to match pkgconf's behavior. When the new `static: true` option is specified, include `Requires.private` dependencies for static linking scenarios. This change makes the default behavior consistent with pkgconf while still supporting static linking use-cases through an explicit option. Co-Authored-By: kou <kou@clear-code.com>
2a3e40a to
c59ea43
Compare
c59ea43 to
183cb7b
Compare
|
On Windows, some test failed because of cflags... ref: https://github.com/otegami/pkg-config/actions/runs/19729356341/job/56526836780#step:9:24 The pkgconf's behavior might be different between RubyInstaller and MSYS2. RubyInstaller (pkgconf 2.5.1)Output includes Requires.private cflags. MSYS2 (pkgconf 2.5.1)Output does NOT include Requires.private cflags. |
|
The difference is caused by pkgconf's system include path filtering. MSYS2 environmentIn MSYS2, pkgconf recognizes '/ucrt64/include' as a system include path and excludes it by default.
ref: https://github.com/otegami/pkg-config/actions/runs/19730472975/job/56530192519#step:5:97 Difference between RubyInstaller and MSYS2
This is likely due to different pkgconf build configurations or environment settings between the two? |
|
Could you show the results of |
Sure, the result is the following. RubyInstaller's MSYS2no-RubyInstaller MSYS2 |
|
Could you also share |
Sure. RubyInstaller MSYS2pkgconf --helpのログno RubyInstaller MSYS2pkgconf --helpのログ |
|
I looked into the pkgconf source code. It seems that pkgconf includes To match pkgconf's behavior, we need to implement this system path filtering in the pkg-config gem. |
How did you confirm it? Could you share the result of |
|
I confirmed it using the following information. This is also documented in the NEWS file.
I will check it now. |
|
Then, we should keep the current implementation (use |
|
Yes. So I will close this PR because this specification doesn't follow pkgconf's behaviors. |
GitHub:
By default, exclude
Requires.privatedependencies from cflags and libs output to match pkgconf'sbehavior.
When the new
static: trueoption is specified,include
Requires.privatedependencies for static linking scenarios.This change makes the default behavior consistent with pkgconf while still supporting static linking
use-cases through an explicit option.