-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: MiniPortile#mkmf_config
which supports pkg-config files to configure compiler and linker flags
#131
Conversation
2434045
to
9a51dfe
Compare
Boom, got the failure we wanted: https://github.com/flavorjones/mini_portile/actions/runs/6132073726/job/16642608209?pr=131#step:7:1788
|
d7937bd
to
74ac5a1
Compare
74ac5a1
to
696d25d
Compare
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
570534f
to
2bc8ae3
Compare
1385ce6
to
c250c54
Compare
667b7c8
to
d5e0278
Compare
d5e0278
to
1fd071b
Compare
b2e9c20
to
ad78dae
Compare
pkgconf
library path issuepkgconf
for setting compiler and linker flags in an extconf
ad78dae
to
2dbbb83
Compare
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
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
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. |
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$LDFLAGS
and$CFLAGS
appropriately, 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.