Skip to content
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

Allow developers to disable default includes and libs paths #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kalbasit
Copy link

Due to a mismatch between the GCC we use for our project, and the new version delivered on Ubuntu 22.04, our bundle started failing. I traced the issue to GCC being called with -I/usr/include. By adding --without-default-header-paths to the gem install call make it work for us.

Due to a mismatch between the GCC we use for our project, and the new
version delivered on Ubuntu 22.04, our bundle started failing. I traced
the issue to GCC being called with `-I/usr/include`. By adding
`--without-default-header-paths` to the gem install call make it work
for us.
@kalbasit kalbasit force-pushed the keeptruckin/DEVPRD-571/fix-rgeo-proj4 branch from 6bdd629 to 8096d2f Compare June 17, 2022 21:22
Copy link
Member

@keithdoggett keithdoggett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kalbasit thanks for the PR sorry I let this slip. This looks good to me and seems like a reasonable solution.

@BuonOmo what are your thoughts on this? You're definitely more familiar with extconfs and building Ruby extensions than I am so maybe you've seen a better way to handle this.

Copy link
Member

@BuonOmo BuonOmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I traced the issue to GCC being called with -I/usr/include

This generates what kind of issue ? Just want to be thorough here :)

I think that adding a specific config here is adding complexity in the build process (one more way to do it), hence we should proceed carefully and with good reasons. If the issue could be fixed upstream, it would be for the best!

ext/proj4_c_impl/extconf.rb Outdated Show resolved Hide resolved
@kalbasit
Copy link
Author

I traced the issue to GCC being called with -I/usr/include

This generates what kind of issue ? Just want to be thorough here :)

I think that adding a specific config here is adding complexity in the build process (one more way to do it), hence we should proceed carefully and with good reasons. If the issue could be fixed upstream, it would be for the best!

I'm sorry it's been a while; Too many GitHub notifications 😢

Anyways, IIRC the build was failing because it was trying to use system dependencies and we needed it to use specified dependencies coming from another place, Nix in this case. Either way, it allows us to disable the system dependencies and provide explicitly where to find dependencies. I don't think that you need to test this as it does not really affect anyone except those looking to explicitly disable system dependencies for one reason or another. Looking at other gems, for example, nokogiri, they also provide similar flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants