Don't use default include and library directories with dir_config#38
Open
joast wants to merge 4 commits intoblackwinter:masterfrom
Open
Don't use default include and library directories with dir_config#38joast wants to merge 4 commits intoblackwinter:masterfrom
joast wants to merge 4 commits intoblackwinter:masterfrom
Conversation
Using default directories in publicly available gems can cause problems because the directories are used when building unless all of them are overridden. For this gem it means running "gem install" with "--with-magic-dir=..." and "--with-gnurx-dir=..." (yes, even if gnurx isn't installed on the system). Kind of annoying to have to look at a gem's extconf.rb to see what dir_config calls are being made and what needs to be overridden because of defaults that conflict with how ruby was configured/installed. The above discovery was prompted by having libmagic installed in both the system default location and a non-standard location (that ruby uses for a bunch of other third-party libraries). The following warning was issued when trying to use the gem unless the gem was installed with both '--with-magic-dir=..." and "-with-gnurx-dir=...": FileMagic v0.7.3: compiled magic version [5.40] does not match with shared library magic version [5.43]
This is slightly different from the older changes because it allows --with-magic-* to override the defaults in this file.
Looked at MANY gems and very few set paths for headers and/or libraries. The vast majority expect --with-* options to be used when installing gems that use things in non-standard places. Old commit log entry: Don't use default include and library directories with dir_config Using default directories in publicly available gems can cause problems because the directories are used when building unless all of them are overridden. For this gem it means running "gem install" with "--with-magic-dir=..." and "--with-gnurx-dir=..." (yes, even if gnurx isn't installed on the system). Kind of annoying to have to look at a gem's extconf.rb to see what dir_config calls are being made and what needs to be overridden because of defaults that conflict with how ruby was configured/installed. The above discovery was prompted by having libmagic installed in both the system default location and a non-standard location (that ruby uses for a bunch of other third-party libraries). The following warning was issued when trying to use the gem unless the gem was installed with both '--with-magic-dir=..." and "-with-gnurx-dir=...": FileMagic v0.7.3: compiled magic version [5.40] does not match with shared library magic version [5.43]
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.
Using default directories in publicly available gems can cause problems because the directories are used when building unless all of them are overridden. For this gem it means running "gem install" with "--with-magic-dir=..." and "--with-gnurx-dir=..." (yes, even if gnurx isn't installed on the system). Kind of annoying to have to look at a gem's extconf.rb to see what dir_config calls are being made and what needs to be overridden because of defaults that conflict with how ruby was configured/installed.
The above discovery was prompted by having libmagic installed in both the system default location and a non-standard location (that ruby uses for a bunch of other third-party libraries). The following warning was issued when trying to use the gem unless the gem was installed with both '--with-magic-dir=..." and "-with-gnurx-dir=...":
FileMagic v0.7.3: compiled magic version [5.40] does not match with
shared library magic version [5.43]