我想安装rrdiff gem,但它给我的错误是lrsync不存在,如何为mac apple m1芯片安装和配置lrsync?

kyxcudwk  于 2021-09-29  发布在  Java
关注(0)|答案(0)|浏览(282)

我想安装rrdiff gem,但它给我的错误是lrsync不存在,如何为macapplem1芯片安装和配置lrsync,使rrdiff的gem安装正常工作?
以下是lrsync:
lrsync github链接
以下是mkmf.log和gem_make.out文件:
mkmf.log:

  1. have_library: checking for -lrsync... -------------------- no
  2. "gcc -o conftest -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/-darwin20 -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/backward -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0 -I. -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -Wno-error=implicit-function-declaration -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib -lruby.2.7 "
  3. checked program was:
  4. /* begin */
  5. 1: #include "ruby.h"
  6. 2:
  7. 3: int main(int argc, char**argv)
  8. 4: {
  9. 5: return !!argv[argc];
  10. 6: }
  11. /* end */
  12. "gcc -o conftest -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/-darwin20 -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/backward -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0 -I. -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -Wno-error=implicit-function-declaration -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib -lruby.2.7 -lrsync "
  13. ld: library not found for -lrsync
  14. clang: error: linker command failed with exit code 1 (use -v to see invocation)
  15. checked program was:
  16. /* begin */
  17. 1: #include "ruby.h"
  18. 2:
  19. 3: /*top*/
  20. 4: extern int t(void);
  21. 5: int main(int argc, char**argv)
  22. 6: {
  23. 7: if (argc > 1000000) {
  24. 8: int (* volatile tp)(void)=(int (*)(void))&t;
  25. 9: printf("%d", (*tp)());
  26. 10: }
  27. 11:
  28. 12: return !!argv[argc];
  29. 13: }
  30. 14:
  31. 15: int t(void) { ; return 0; }
  32. /* end */
  33. --------------------

宝石制作:

  1. current directory: /Users/aashishgangwani/.rvm/gems/ruby-2.7.1/bundler/gems/rrdiff-6742766bf0e0/ext/rrdiff
  2. /Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/bin/ruby -I /Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0 -r ./siteconf20210727-47852-a9wtwt.rb extconf.rb
  3. checking for -lrsync... no
  4. ***extconf.rb failed***
  5. Could not create Makefile due to some reason, probably lack of necessary
  6. libraries and/or headers. Check the mkmf.log file for more details. You may
  7. need configuration options.
  8. Provided configuration options:
  9. --with-opt-dir
  10. --with-opt-include
  11. --without-opt-include=${opt-dir}/include
  12. --with-opt-lib
  13. --without-opt-lib=${opt-dir}/lib
  14. --with-make-prog
  15. --without-make-prog
  16. --srcdir=.
  17. --curdir
  18. --ruby=/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/bin/$(RUBY_BASE_NAME)
  19. --with-rsync-dir
  20. --without-rsync-dir
  21. --with-rsync-include
  22. --without-rsync-include=${rsync-dir}/include
  23. --with-rsync-lib
  24. --without-rsync-lib=${rsync-dir}/lib
  25. --with-rsynclib
  26. --without-rsynclib
  27. extconf.rb:3:in `<main>': unhandled exception
  28. To see why this extension failed to compile, please check the mkmf.log which can be found here:
  29. /Users/aashishgangwani/.rvm/gems/ruby-2.7.1/bundler/gems/extensions/-darwin-20/2.7.0/rrdiff-6742766bf0e0/mkmf.log
  30. extconf failed, exit code 1

rrdif mkmf.log文件
rrdiff gem_make.out文件
我试图克隆lrsync的存储库并将其“make”到文件夹中,但这并不能解决我的问题。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题