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

--with-sqlite3-include option doesn't take precedence over system libraries #138

Closed
danfinnie opened this issue Sep 27, 2014 · 3 comments
Closed

Comments

@danfinnie
Copy link

Hi,

I'm running into an issue where the system sqlite3 libraries were not compiled with some compilation flags that I want. I tried to specify a --with-sqlite3-dir option to include my own version, but it was ignored for the system header files/libraries.

This behavior is documented in Ruby bug 9760 and Nokogiri accepted a patch to change this behavior. What do you think about doing something similar for sqlite3?

@danfinnie
Copy link
Author

One downside to doing the patch from Nokogiri is that when that patch was accepted to Nokogiri, it seemed like a temporary fix until mkmf.rb was "fixed." But now, based on the Ruby bug, it seems like it will not be fixed as the Nokogiri patch assumes.

@luislavena
Copy link
Member

@danfinnie do you experience the same behavior when using -- --with-opt-dir instead of sqlite3-dir?

@danfinnie
Copy link
Author

@luislavena I just spent some time trying --with-opt-dir instead of --with-sqlite3-dir. That definitely made it use my header file over the system header file. I still couldn't make it use my dynamic library over the system one, though. I'm not too confident in if I was naming the library correctly and such though, so I wouldn't worry too much about it.

What I ended up doing was creating a fork of the sqlite3 gem that does not attempt to dynamically link sqlite3. I just copied in the sqlite3 source and header files.

I'm going to close this because I found a workaround and this is really a mkmf bug IMHO.

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

No branches or pull requests

2 participants