Don't use default include and library directories with dir_config #38
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]