deepfryed / ots

ruby bindings to open text summarizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

el capitan ots issues

ashabbir opened this issue · comments

OTS worked in previous versions of osx but stopped working in ElCapitan

below is the error msg

➜ ~ gem install ots
Building native extensions. This could take a while...
ERROR: Error installing ots:
ERROR: Failed to build gem native extension.

/Users/amd/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20151011-28077-1bhpu1y.rb extconf.rb

checking for main() in -lglib-2.0... yes
checking for main() in -lxml2... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling libots/article.c
libots/article.c:107:37: warning: passing 'const unsigned char ' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if ((aWord == NULL) || (0==strlen(aWord)) ||(NULL==aLine)) return;
^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/string.h:82:28: note: passing argument to parameter here
size_t strlen(const char *);
^
libots/article.c:109:68: warning: passing 'const unsigned char *' to parameter of type 'const gchar *' (aka 'const char *') converts between pointers to integer types with different sign [-Wpointer-sign]
aLine->words = g_list_append (aLine->words, (gpointer) g_strdup (aWord));
^~~~~
/usr/local/Cellar/glib/2.46.0/include/glib-2.0/glib/gstrfuncs.h:216:52: note: passing argument to parameter 'str' here
gchar
g_strdup (const gchar *str) G_GNUC_MALLOC;
^
2 warnings generated.
compiling libots/dictionary.c
libots/dictionary.c:28:10: fatal error: 'libxml/xmlmemory.h' file not found

include <libxml/xmlmemory.h>

     ^

1 error generated.
make: *** [libots/dictionary.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/amd/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/ots-0.5.4 for inspection.
Results logged to /Users/amd/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/ots-0.5.4/gem_make.out

Sorry, I don't have an Apple Mac to test this on. Would you be able to look at it and send me a pull request ?

+1@ashabbir were you able to resolve this?

I was able to resolve the issue by doing
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2
and then building the gem
gem install ots

Thanks sandeep45, that problem could have gone on for days!

@sandeep45, I tried the solution which you mentioned but it not helps me. Any other suggestions or any other steps which is required because I follow all the steps which was mentioned in gem doc.

Thanks

moved to docker :) ubuntu