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

Can't install. Failed to build gem native extension. #8

Open
egze opened this issue Mar 16, 2012 · 3 comments · May be fixed by #22
Open

Can't install. Failed to build gem native extension. #8

egze opened this issue Mar 16, 2012 · 3 comments · May be fixed by #22

Comments

@egze
Copy link
Contributor

egze commented Mar 16, 2012

I'm getting this error. Can you help?

Thanks

Installing recommendify (0.3.6) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/xxx/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 

make
mkdir -p ../bin
gcc -Wall recommendify.c -lhiredis -o ../bin/recommendify
recommendify.c:4:29: error: hiredis/hiredis.h: No such file or directory
recommendify.c: In functionmain’:
recommendify.c:20: error: ‘redisContextundeclared (first use in this function)
recommendify.c:20: error: (Each undeclared identifier is reported only once
recommendify.c:20: error: for each function it appears in.)
recommendify.c:20: error: ‘cundeclared (first use in this function)
recommendify.c:21: error: ‘redisReplyundeclared (first use in this function)
recommendify.c:21: error: ‘all_itemsundeclared (first use in this function)
recommendify.c:22: error: ‘replyundeclared (first use in this function)
recommendify.c:83: warning: implicit declaration of functionredisConnectWithTimeoutrecommendify.c:92: warning: implicit declaration of functionredisCommandrecommendify.c:100: warning: implicit declaration of functionfreeReplyObjectrecommendify.c:111: error: ‘REDIS_REPLY_ARRAYundeclared (first use in this function)
recommendify.c:161: warning: implicit declaration of functionredisAppendCommandrecommendify.c:162: warning: implicit declaration of functionredisGetReplymake: *** [build] Error 1
@asmuth
Copy link
Owner

asmuth commented Mar 16, 2012

Hey Aleksandr,

the problem is the missing hiredis dependency. On OSX run:

brew install hiredis

and on Ubuntu:

apt-get install libhiredis-dev

on other platforms:

git clone https://github.com/antirez/hiredis.git && cd hiredis && make && sudo make install && sudo ldconfig

best regards :)

@egze
Copy link
Contributor Author

egze commented Mar 16, 2012

Thanks a lot. Worked like a charm.

Can you add it to the README please so people don't get stuck like me? :)

@tienle
Copy link

tienle commented Mar 27, 2012

👍 update README

JDutil added a commit to JDutil/recommendify that referenced this issue Feb 8, 2013
@JDutil JDutil linked a pull request Feb 8, 2013 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants