JuliaLang/julia — pull request #4959 by mbauman (2013-11-27 23:22:18+00:00)
Title: Add a specific error message for PCRE conflicts

When a different PCRE library is loaded than that which the stdlib was compiled against, the compiled regular expressions may fail. This compares the version strings of the compiled and loaded libpcre, and if different aborts (similarly to how Julia will abort with a BLAS linking error).

This is designed to give a more helpful error message when a different version of libpcre causes compiled regular expressions to fail. Notably, the first regex that gets hit by this is the cause of issue #3838 https://github.com/JuliaLang/julia/issues/3838.

This exploits the fact that the constant Base.PCRE.VERSION is set and stored at compile-time, while a `ccall` Expr is not, but as a new Julia user I'm not entirely sure how stable that is.