feat: MiniPortile#mkmf_config which supports pkg-config files to configure compiler and linker flags#131
Merged
flavorjones merged 4 commits intomainfrom Sep 13, 2023
Merged
Conversation
2434045 to
9a51dfe
Compare
Owner
Author
|
Boom, got the failure we wanted: https://github.com/flavorjones/mini_portile/actions/runs/6132073726/job/16642608209?pr=131#step:7:1788 |
2 tasks
d7937bd to
74ac5a1
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 10, 2023
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 10, 2023
74ac5a1 to
696d25d
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 10, 2023
Owner
Author
|
Early feedback from sparklemotion/sqlite3-ruby#405 indicates that this approach isn't sufficient to replace using pkg-config. sqlite has static libs that must be on the link line; another example is libxml2 which has a non-standard include directory. So what I'm going to try next is to take all the hacks around pkg-config and put them into mini_portile. |
696d25d to
570534f
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 10, 2023
570534f to
2bc8ae3
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 10, 2023
1385ce6 to
c250c54
Compare
667b7c8 to
d5e0278
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 10, 2023
d5e0278 to
1fd071b
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 10, 2023
b2e9c20 to
ad78dae
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 11, 2023
pkgconf library path issuepkgconf for setting compiler and linker flags in an extconf
ad78dae to
2dbbb83
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 11, 2023
pkgconf for setting compiler and linker flags in an extconfMiniPortile.activate_mkmf which uses pkg-config files to configure compiler and linker flags
2dbbb83 to
9ea08f7
Compare
flavorjones
added a commit
to sparklemotion/sqlite3-ruby
that referenced
this pull request
Sep 11, 2023
22e03ca to
045b7b9
Compare
MiniPortile.activate_mkmf which uses pkg-config files to configure compiler and linker flagsMiniPortile.activate_mkmf which supports pkg-config files to configure compiler and linker flags
MiniPortile.activate_mkmf which supports pkg-config files to configure compiler and linker flagsMiniPortile.mkmf_config which supports pkg-config files to configure compiler and linker flags
also: - extract public methods `native_path` and `posix_path` - fix LDFLAGS path on windows to use native path separators
and a local pkgconf file. This should catch the issue with fedora's pkgconf in #118.
045b7b9 to
2a3bff5
Compare
which will set $LDFLAGS and $CFLAGS for the recipe, including a new feature to support pkg-config files for the library. This should allow gems with C extensions that use mini_portile to more easily configure compiler and linker flags.
2a3bff5 to
b17522b
Compare
MiniPortile.mkmf_config which supports pkg-config files to configure compiler and linker flagsMiniPortile#mkmf_config which supports pkg-config files to configure compiler and linker flags
Owner
Author
|
OK, this version is green (locally) for sqlite3-ruby, rcee, and nokogiri, so I'm going to merge it and ship a prerelease so I can kick the tires more thoroughly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #118
Currently, each C extension is responsible for figuring out the compiler and linker flags; and even using pkg-config is fraught because of lack of features or bugs in older Rubies and OS platforms.
The approach taken here is for a new method,
MiniPortile#mkmf_config, to support reading a pkg-config file and set$LDFLAGSand$CFLAGSappropriately, doing all the hacky things that require specialized knowledge but that I don't want gem authors to have to learn how to do.This should mean we don't need to use the pkgconf trick in extconf.rb anymore, which completely avoids the behavior of Fedora's pkgconf described in #118.