summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-12-09 12:45:42 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-12-09 12:45:42 -0800
commit8ce981e0ec11341c4e9dc9b3814d935e686fd484 (patch)
tree888976124d9bd2969d1bb4b11612a240c95f9f65
parent903f849d65a4bd6564398f6175d96514ad9a8d07 (diff)
downloadlibyajl2-gem-8ce981e0ec11341c4e9dc9b3814d935e686fd484.tar.gz
add libgmp-dev notes
-rw-r--r--README.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6d81bb5..70fb7f8 100644
--- a/README.md
+++ b/README.md
@@ -7,3 +7,53 @@ libyajl2-gem
[![Gem Version](https://badge.fury.io/rb/libyajl2.svg)](http://badge.fury.io/rb/libyajl2)
gem to install the libyajl2 c-library for distributions which do not have it
+
+## NOTE
+
+To build this depends on libgmp and its headers being installed. On Ubuntu:
+
+```
+apt-get install libgmp-dev
+```
+
+If you get a mysterious "unhandled exception" build failure like:
+
+```
+Building native extensions. This could take a while...
+ERROR: Error installing libyajl2:
+ ERROR: Failed to build gem native extension.
+
+ /home/lamont/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151209-53133-1aq7vdk.rb extconf.rb
+ creating Makefile
+ /home/lamont/.rvm/gems/ruby-2.2.3/gems/libyajl2-1.2.0/ext/libyajl2
+ extconf.rb:104:in `makemakefiles': unhandled exception
+ from extconf.rb:138:in `<main>'
+
+ extconf failed, exit code 1
+
+ Gem files will remain installed in /home/lamont/.rvm/gems/ruby-2.2.3/gems/libyajl2-1.2.0 for inspection.
+ Results logged to /home/lamont/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/libyajl2-1.2.0/gem_make.out
+```
+
+Look at the output of make.out in the same directory as extconf.rb, for my
+example above that looks like:
+
+```
+# cat /home/lamont/.rvm/gems/ruby-2.2.3/gems/libyajl2-1.2.0/ext/libyajl2/make.out
+compiling yajl_buf.c
+compiling yajl.c
+compiling yajl_gen.c
+compiling yajl_tree.c
+compiling yajl_encode.c
+compiling yajl_parser.c
+compiling yajl_alloc.c
+compiling yajl_version.c
+compiling yajl_lex.c
+linking shared-object libyajl.so
+/usr/bin/ld: cannot find -lgmp
+collect2: error: ld returned 1 exit status
+make: *** [libyajl.so] Error 1
+```
+
+Which gives the correct error that -lgmp was not found...
+