Getting below error when installing nokogiri i tried
install -y make gcc rpm-build ruby-devel zlib-devel
gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/ext/nokogiri
/usr/local/rvm/rubies/ruby-2.7.1/bin/ruby -I /usr/local/rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0 -r ./siteconf20200716-18065-1jmltdp.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.10
with the following patches applied:
- 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
- 0002-Remove-script-macro-support.patch
- 0003-Update-entities-to-remove-handling-of-ssi.patch
- 0004-libxml2.la-is-in-top_builddir.patch
- 0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.10.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10... OK
Running patch with /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK
Running patch with /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/patches/libxml2/0002-Remove-script-macro-support.patch... OK
Running patch with /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK
Running patch with /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch... OK
Running patch with /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch... OK
Running 'configure' for libxml2 2.9.10... OK
Running 'compile' for libxml2 2.9.10... OK
Running 'install' for libxml2 2.9.10... OK
Activating libxml2 2.9.10 (from /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/ports/x86_64-pc-linux-gnu/libxml2/2.9.10)...
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxslt-1.1.34.
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
************************************************************************
Extracting libxslt-1.1.34.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxslt/1.1.34... OK
Running 'configure' for libxslt 1.1.34... OK
Running 'compile' for libxslt 1.1.34... OK
Running 'install' for libxslt 1.1.34... OK
Activating libxslt 1.1.34 (from /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/ports/x86_64-pc-linux-gnu/libxslt/1.1.34)...
checking for -llzma... yes
checking for xmlParseDoc() in libxml/parser.h... yes
checking for xsltParseStylesheetDoc() in libxslt/xslt.h... yes
checking for exsltFuncRegister() in libexslt/exslt.h... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
current directory: /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/ext/nokogiri
make "DESTDIR=" clean
current directory: /usr/local/rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.10/ext/nokogiri
make "DESTDIR="
compiling html_document.c
compiling html_element_description.c
compiling html_entity_lookup.c
compiling html_sax_parser_context.c
compiling html_sax_push_parser.c
compiling nokogiri.c
compiling xml_attr.c
compiling xml_attribute_decl.c
compiling xml_cdata.c
compiling xml_comment.c
compiling xml_document.c
xml_document.c: In function ‘dealloc’:
xml_document.c:49:3: warning: passing argument 2 of ‘rb_st_foreach’ from incompatible pointer type [enabled by default]
st_foreach(node_hash, dealloc_node_i, (st_data_t)doc);
^
In file included from /usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/intern.h:39:0,
from /usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2148,
from /usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_document.h:4,
from xml_document.c:1:
/usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/st.h:141:5: note: expected ‘int (*)(st_data_t, st_data_t, st_data_t)’ but argument is of type ‘int (*)(struct xmlNode *, struct xmlNode *, struct xmlDoc *)’
int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t);
^
xml_document.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
compiling xml_document_fragment.c
compiling xml_dtd.c
compiling xml_element_content.c
compiling xml_element_decl.c
compiling xml_encoding_handler.c
compiling xml_entity_decl.c
compiling xml_entity_reference.c
compiling xml_io.c
xml_io.c: In function ‘io_read_callback’:
xml_io.c:20:3: warning: passing argument 1 of ‘rb_rescue’ from incompatible pointer type [enabled by default]
string = rb_rescue(read_check, (VALUE)args, read_failed, 0);
^
In file included from /usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33:0,
from ./nokogiri.h:33,
from ./xml_io.h:4,
from xml_io.c:1:
**/usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:1987:7: note: expected ‘VALUE (*)(VALUE)’ but argument is of type ‘VALUE (*)(VALUE *)’
VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);**
^
*xml_io.c:20:3: warning: passing argument 3 of ‘rb_rescue’ from incompatible pointer type [enabled by default]
string = rb_rescue(read_check, (VALUE)args, read_failed, 0);
^*
In file included from /usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33:0,
from ./nokogiri.h:33,
from ./xml_io.h:4,
from xml_io.c:1:
/usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:1987:7: note: expected ‘VALUE (*)(VALUE, VALUE)’ but argument is of type ‘VALUE (*)(void)’
VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
^
xml_io.c: In function ‘io_write_callback’:
xml_io.c:47:3: warning: passing argument 1 of ‘rb_rescue’ from incompatible pointer type [enabled by default]
size = rb_rescue(write_check, (VALUE)args, write_failed, 0);
^
In file included from /usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33:0,
from ./nokogiri.h:33,
from ./xml_io.h:4,
from xml_io.c:1:
/usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:1987:7:
note: expected ‘VALUE ()(VALUE)’ but argument is of type ‘VALUE
()(VALUE )’
VALUE rb_rescue(VALUE()(VALUE),VALUE,VALUE()(VALUE,VALUE),VALUE);
^
xml_io.c:47:3: warning: passing argument 3 of ‘rb_rescue’ from incompatible pointer type [enabled by default]
size = rb_rescue(write_check, (VALUE)args, write_failed, 0);
^
In file included from /usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33:0,
from ./nokogiri.h:33,
from ./xml_io.h:4,
from xml_io.c:1:
/usr/local/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:1987:7:
note: expected ‘VALUE ()(VALUE, VALUE)’ but argument is of type
‘VALUE ()(void)’
VALUE rb_rescue(VALUE()(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
^
***xml_io.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
compiling xml_libxml2_hacks.c
compiling xml_namespace.c
compiling xml_node.c
xml_node.c: In function ‘reparent_node_with’:
xml_node.c:304:7: warning: passing argument 1 of ‘xmlFree’ discards ‘const’ qualifier from pointer target type [enabled by default]
xmlFree(reparentee->ns->prefix);
^***
xml_node.c:304:7: note: expected ‘void *’ but argument is of type ‘const xmlChar *’
xml_node.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
compiling xml_node_set.c
compiling xml_processing_instruction.c
compiling xml_reader.c
compiling xml_relax_ng.c
compiling xml_sax_parser.c
compiling xml_sax_parser_context.c
compiling xml_sax_push_parser.c
compiling xml_schema.c
compiling xml_syntax_error.c
compiling xml_text.c
compiling xml_xpath_context.c
compiling xslt_stylesheet.c
xslt_stylesheet.c:112:13: warning: ‘swallow_superfluous_xml_errors’ defined but not used [-Wunused-function]
static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, ...)
^
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
linking shared-object nokogiri/nokogiri.so
/usr/bin/ld: unrecognized option '--compress-debug-sections=zlib'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make: *** [nokogiri.so] Error 1
make failed, exit code 2
as far as my version of centos is old and /usr/bin/ld is a part of binutils, so my suggestion
$ sudo yum update binutils
helped me (instead of full OS update)
My Centos version was 7.6 and all provided solution for nokogiri was not working. Finally i updated centos to 7.8 and it worked. i tried with centos 7.7 version in other server also, it worked on 7.7 also.
i encountered exactly same problem.
It seems that the real error is
/usr/bin/ld: unrecognized option '--compress-debug-sections=zlib'
The flag "--compress-debug-sections=zlib" is defined in file /usr/local/rvm/gems/ruby-2.7.0/gems/nokogiri-1.10.10/ext/nokogiri/Makefile .
This makefile is created by a mkmf.rb, and default value of flags are in this file /usr/local/rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/x86_64-linux/rbconfig.rb
CONFIG["DLDFLAGS"] = "-Wl,--compress-debug-sections=zlib"
After I changed this line to be
CONFIG["DLDFLAGS"] = ""
gem install nokogiri works well
But I am not sure about the exactly function of flag "--compress-debug-sections=zlib" and what would happen when i removed it
This error comes because the default linker on Centos 7.4 does not support that option --compress-debug-sections=zlib. Centos 7.8 seems to fix this issue.
But in case you could not switch to Centos 7.8, the option is supported by the gold linker (ld.gold).
To enable the use, you could override the linker by doing something like
ln -s /bin/ld.gold ~/bin/ld; PATH=~/bin:$PATH
then run the needed command
It's my very first time with ruby on rails.
I cloned this project from github.
https://github.com/fredwu/angel_nest
it took me a while to setup and figure out things.
i'm having a lot of compatibility issues as this project was made a long time ago.
when i do "bundle install"
I get this error and bundler stops.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/bin/ruby extconf.rb checking for main() in -lobjc... yes creating Makefile
make compiling v8_external.cpp clang: warning: argument unused during
compilation: '-rdynamic' [-Wunused-command-line-argument]
v8_external.cpp:10:9: warning: unused variable 'references'
[-Wunused-variable] VALUE references;
^ 1 warning generated. compiling v8_exception.cpp clang: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] v8_exception.cpp:10:16: warning:
unused variable 'stack' [-Wunused-variable] static void* stack[20];
^ 1 warning generated. compiling v8_function.cpp clang: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_handle.cpp clang:
warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_array.cpp clang:
warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_try_catch.cpp clang:
warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_v8.cpp clang: warning:
argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] v8_v8.cpp:22:49: warning: implicit
conversion loses integer precision: 'long' to 'int'
[-Wshorten-64-to-32]
V8::SetFlagsFromString(RSTRING_PTR(string), RSTRING_LEN(string));
~~ ^~~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:674:6:
note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:670:6:
note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v8_v8.cpp:22:49: warning: implicit conversion loses integer precision:
'long' to 'int' [-Wshorten-64-to-32]
V8::SetFlagsFromString(RSTRING_PTR(string), RSTRING_LEN(string));
~~ ^~~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:675:28:
note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~ 2 warnings generated. compiling v8_callbacks.cpp clang: warning: argument unused during compilation:
'-rdynamic' [-Wunused-command-line-argument] compiling v8_string.cpp
clang: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] v8_string.cpp:18:73: warning:
implicit conversion loses integer precision: 'long' to 'int'
[-Wshorten-64-to-32]
return rr_v8_handle_new(string_class, String::New(RSTRING_PTR(str), RSTRING_LEN(str)));
~~~~~~ ^~~~~~~~~~~~~~~~
/Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:674:6:
note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:670:6:
note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v8_string.cpp:18:73: warning: implicit conversion loses integer
precision: 'long' to 'int' [-Wshorten-64-to-32]
return rr_v8_handle_new(string_class, String::New(RSTRING_PTR(str), RSTRING_LEN(str)));
~~~~~~ ^~~~~~~~~~~~~~~~
/Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:675:28:
note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~ v8_string.cpp:23:79: warning: implicit conversion loses integer precision: 'long' to 'int'
[-Wshorten-64-to-32]
return rr_v8_handle_new(string_class, String::NewSymbol(RSTRING_PTR(str), RSTRING_LEN(str)));
~~~~~~ ^~~~~~~~~~~~~~~~
/Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:674:6:
note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:670:6:
note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v8_string.cpp:23:79: warning: implicit conversion loses integer
precision: 'long' to 'int' [-Wshorten-64-to-32]
return rr_v8_handle_new(string_class, String::NewSymbol(RSTRING_PTR(str), RSTRING_LEN(str)));
~~~~~~ ^~~~~~~~~~~~~~~~
/Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:675:28:
note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~ 4 warnings generated. compiling v8_message.cpp clang: warning: argument unused during compilation:
'-rdynamic' [-Wunused-command-line-argument] compiling rr.cpp clang:
warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] rr.cpp:48:1: warning: control reaches
end of non-void function [-Wreturn-type] } ^ rr.cpp:151:44: warning:
implicit conversion loses integer precision: 'long' to 'int'
[-Wshorten-64-to-32]
return String::New(RSTRING_PTR(value), RSTRING_LEN(value));
~~~~~~ ^~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:674:6:
note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:670:6:
note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rr.cpp:151:44: warning: implicit conversion loses integer precision:
'long' to 'int' [-Wshorten-64-to-32]
return String::New(RSTRING_PTR(value), RSTRING_LEN(value));
~~~~~~ ^~~~~~~~~~~~~~~~~~ /Users/divyanshuverma/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/ruby.h:675:28:
note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~ 3 warnings generated. compiling v8_weakref.cpp clang: warning: argument unused during compilation:
'-rdynamic' [-Wunused-command-line-argument] compiling v8_script.cpp
clang: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_date.cpp clang: warning:
argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_debug.cpp clang:
warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_value.cpp clang:
warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] v8_value.cpp:100:9: warning: unused
function 'ToInt32' [-Wunused-function] VALUE ToInt32(VALUE self) {
^ 1 warning generated. compiling v8_object.cpp clang: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] v8_object.cpp:77:19: warning: unused
variable 'proto' [-Wunused-variable]
Handle proto(rr_rb2v8(prototype));
^ 1 warning generated. compiling v8_locker.cpp clang: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] v8_locker.cpp:45:5: warning: control
reaches end of non-void function [-Wreturn-type]
}
^ v8_locker.cpp:85:5: warning: control reaches end of non-void function [-Wreturn-type]
}
^ 2 warnings generated. compiling v8_template.cpp clang: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8.cpp clang: warning:
argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] compiling v8_context.cpp clang:
warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument] linking shared-object v8.bundle
clang: error: no such file or directory:
'/Users/divyanshuverma/angel_nest/vendor/cache/ruby/1.9.1/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a'
make: *** [v8.bundle] Error 1
Gem files will remain installed in
/Users/divyanshuverma/angel_nest/vendor/cache/ruby/1.9.1/gems/therubyracer-0.9.10
for inspection. Results logged to
/Users/divyanshuverma/angel_nest/vendor/cache/ruby/1.9.1/gems/therubyracer-0.9.10/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.9.10), and Bundler
cannot continue. Make sure that gem install therubyracer -v '0.9.10'
succeeds before bundling.
i've tried all approaches available on stackoverflow for this method but none works!
is there any way to override the requirements of this gem make changes such that project works on the newer version of therubyracer gem
This version is locked only by Gemfile.lock, which means that there're probably no specific requirements in project itself.
You can try updating just this gem without full bundle update via: bundle update therubyracer, most probably newer version will do ok.
I am developing Rails Application on OSX.
I got success on my Mac book pro, but I got error on MacPro when exec 'bundle install'.
Their environment are almost same.
os: OSX High Sierra v10.13.4
postgres: v9.6.8 (I installed it by Homebrew)
ruby:
version: 2.4.2 on MacPro, 2.4.0 on MacBookPro
installed by: rbenv
which: /Users/makiaki/.rbenv/shims/ruby
gem-version: 2.6.13
bunler-version: 1.16.1
Firstly, I was using postgresql version 10.1.
In my MacBookPro, got success with postgresql version 9.6.
Then I tried to uninstall postgresql and installed postgresql version 9.6.
But both way is not effectiveness.
I have got error when exec bundle install or bundle install --path vendor/bundle .
How can I fix this problem?
And this is console:
Fetching pg 0.21.0
Installing pg 0.21.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/makiaki/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/pg-0.21.0/ext
/Users/makiaki/.rbenv/versions/2.4.2/bin/ruby -r ./siteconf20180419-22579-1fcqwvi.rb extconf.rb
checking for pg_config... yes
Using config values from /Users/makiaki/.pyenv/shims/pg_config
pyenv: pg_config: command not found
The `pg_config' command exists in these Python versions:
anaconda3-4.3.0
pyenv: pg_config: command not found
The `pg_config' command exists in these Python versions:
anaconda3-4.3.0
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconnectionUsedPassword()... yes
checking for PQisthreadsafe()... yes
checking for PQprepare()... yes
checking for PQexecParams()... yes
checking for PQescapeString()... yes
checking for PQescapeStringConn()... yes
checking for PQescapeLiteral()... yes
checking for PQescapeIdentifier()... yes
checking for PQgetCancel()... yes
checking for lo_create()... yes
checking for pg_encoding_to_char()... yes
checking for pg_char_to_encoding()... yes
checking for PQsetClientEncoding()... yes
checking for PQlibVersion()... yes
checking for PQping()... yes
checking for PQsetSingleRowMode()... yes
checking for PQconninfo()... yes
checking for PQsslAttribute()... yes
checking for rb_encdb_alias()... yes
checking for rb_enc_alias()... yes
checking for rb_thread_call_without_gvl()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_fd_select()... yes
checking for rb_w32_wrap_io_handle()... no
checking for rb_str_modify_expand()... yes
checking for rb_hash_dup()... yes
checking for PGRES_COPY_BOTH in libpq-fe.h... yes
checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes
checking for PG_DIAG_TABLE_NAME in libpq-fe.h... yes
checking for struct pgNotify.extra in libpq-fe.h... yes
checking for unistd.h... yes
checking for inttypes.h... yes
checking for ruby/st.h... yes
checking for C99 variable length arrays... yes
creating extconf.h
creating Makefile
current directory: /Users/makiaki/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/pg-0.21.0/ext
make "DESTDIR=" clean
current directory: /Users/makiaki/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/pg-0.21.0/ext
make "DESTDIR="
compiling gvl_wrappers.c
compiling pg.c
compiling pg_binary_decoder.c
compiling pg_binary_encoder.c
compiling pg_coder.c
pg_coder.c:200:34: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
res = this->dec_func(this, val, RSTRING_LEN(argv[0]), tuple, field, ENCODING_GET(argv[0]));
~~~~ ^~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:980:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:976:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pg_coder.c:200:34: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
res = this->dec_func(this, val, RSTRING_LEN(argv[0]), tuple, field, ENCODING_GET(argv[0]));
~~~~ ^~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:981:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
2 warnings generated.
compiling pg_connection.c
compiling pg_copy_coder.c
pg_copy_coder.c:225:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
strlen = RSTRING_LEN(subint);
~ ^~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:980:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:976:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pg_copy_coder.c:225:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
strlen = RSTRING_LEN(subint);
~ ^~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:981:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
pg_copy_coder.c:531:23: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_len = end_ptr - start_ptr;
~ ~~~~~~~~^~~~~~~~~~~
3 warnings generated.
compiling pg_errors.c
compiling pg_result.c
compiling pg_text_decoder.c
compiling pg_text_encoder.c
pg_text_encoder.c:170:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
len = out - start;
~ ~~~~^~~~~~~
pg_text_encoder.c:289:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return optr - out;
~~~~~~ ~~~~~^~~~~
pg_text_encoder.c:293:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return 2 + RSTRING_LEN(*intermediate) * 2;
~~~~~~ ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pg_text_encoder.c:501:13: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
nr_elems = RARRAY_LEN(value);
~ ^~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:1026:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
4 warnings generated.
compiling pg_type_map.c
compiling pg_type_map_all_strings.c
compiling pg_type_map_by_class.c
compiling pg_type_map_by_column.c
pg_type_map_by_column.c:161:52: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return dec_func( p_coder, RSTRING_PTR(field_str), RSTRING_LEN(field_str), 0, fieldno, enc_idx );
~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:980:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:976:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pg_type_map_by_column.c:161:52: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return dec_func( p_coder, RSTRING_PTR(field_str), RSTRING_LEN(field_str), 0, fieldno, enc_idx );
~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:981:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
pg_type_map_by_column.c:230:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
conv_ary_len = RARRAY_LEN(conv_ary);
~ ^~~~~~~~~~~~~~~~~~~~
/Users/makiaki/.rbenv/versions/2.4.2/include/ruby-2.4.0/ruby/ruby.h:1026:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
3 warnings generated.
compiling pg_type_map_by_mri_type.c
compiling pg_type_map_by_oid.c
compiling pg_type_map_in_ruby.c
compiling util.c
util.c:119:24: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return (char*)out_ptr - out;
~~~~~~ ~~~~~~~~~~~~~~~^~~~~
1 warning generated.
linking shared-object pg_ext.bundle
ld: file not found: dynamic_lookup
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pg_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/makiaki/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/pg-0.21.0 for inspection.
Results logged to /Users/makiaki/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/pg-0.21.0/gem_make.out
An error occurred while installing pg (0.21.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.21.0'` succeeds before bundling.
In Gemfile:
pg
The point is that:
Using config values from /Users/makiaki/.pyenv/shims/pg_config
pyenv: pg_config: command not found
The `pg_config' command exists in these Python versions:
anaconda3-4.3.0
pyenv: pg_config: command not found
The `pg_config' command exists in these Python versions:
anaconda3-4.3.0
I tried this command:
$ which pg_config
It shows:
/Users/makiaki/.pyenv/shims/pg_config
It is not good.
Fixing ~/.zshrc such like this:
# postgres
export PATH="/usr/local/opt/postgresql#9.6/bin:$PATH"
In this case, it is the mainly problem to put correct pg_config PATH before pyenv PATH setting in my .zshrc .
Fixing that, getting success.
I was getting the same error message, but the log showed I was having a different issue:
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
Running brew link postgresql resolved it
I have problems installing a specific ruby version on my machine running ElCapitan.
The version number is 1.9.3-p551.
It says: BUILD FAILED (OS X 10.11.6 using ruby-build 20160426)
This is the log file (parts of it):
/tmp/ruby-build.20160920112831.62235 ~/Desktop/localhost/project
/tmp/ruby-build.20160920112831.62235/ruby-1.9.3-p551 /tmp/ruby-build.20160920112831.62235 ~/Desktop/localhost/project
configure: WARNING: unrecognized options: --with-openssl-dir, --with-libyaml-dir, --with-readline-dir
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking target system type... x86_64-apple-darwin15.6.0
checking whether the C compiler works... yes
[..]
compiling class.c
bignum.c:1449:23: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
if (a > 0.0) return INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:1460:51: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
if (RBIGNUM_SIGN(x) < RBIGNUM_SIGN(y)) return INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:1462:29: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
return (RBIGNUM_SIGN(x)) ? INT2FIX(-1) : INT2FIX(1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:1464:42: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
return (RBIGNUM_SIGN(x)) ? INT2FIX(1) : INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:1472:34: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
(RBIGNUM_SIGN(x) ? INT2FIX(1) : INT2FIX(-1)) :
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:1473:25: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
(RBIGNUM_SIGN(x) ? INT2FIX(-1) : INT2FIX(1));
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:1493:22: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
if (a > 0.0) rel = INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:1680:20: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
if (!i) return INT2FIX(~(SIGNED_VALUE)0);
^~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:3414:40: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
return RBIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:3538:13: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
return INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
bignum.c:3548:14: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
else return INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
array.c:3341:12: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
return INT2FIX(-1);
^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
[..]
linking shared-object pty.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
linking shared-object psych.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
installing default pty libraries
compiling cparse.c
installing default psych libraries
compiling ossl_cipher.c
compiling readline.c
compiling ossl_config.c
installing default cparse libraries
linking shared-object racc/cparse.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling ossl_digest.c
compiling ripper.c
installing default readline libraries
linking shared-object readline.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling ossl_engine.c
compiling _sdbm.c
ripper.y:6191:5: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
nd_set_line(lex_strterm, ruby_sourceline);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../node.h:278:43: note: expanded from macro 'nd_set_line'
RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))
~~^
compiling ossl_hmac.c
compiling init.c
compiling ossl_ns_spki.c
compiling ossl_ocsp.c
linking shared-object nkf.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
installing default sdbm libraries
linking shared-object sdbm.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
generating constant definitions
ossl_ocsp.c:749:5: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
DefOCSPConst(REVOKED_STATUS_NOSTATUS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ocsp.c:740:52: note: expanded from macro 'DefOCSPConst'
#define DefOCSPConst(x) rb_define_const(mOCSP, #x, INT2NUM(OCSP_##x))
^~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:973:21: note: expanded from macro 'INT2NUM'
# define INT2NUM(v) INT2FIX((int)(v))
^~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
compiling stringio.c
generating constant definitions
compiling basicsocket.c
1 warning generated.
compiling ossl_pkcs12.c
compiling socket.c
compiling ossl_pkcs5.c
installing default stringio libraries
linking shared-object stringio.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling ossl_pkcs7.c
compiling ipsocket.c
compiling strscan.c
compiling tcpsocket.c
compiling tcpserver.c
compiling sockssocket.c
compiling ossl_pkey.c
installing default strscan libraries
linking shared-object strscan.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling udpsocket.c
compiling ossl_pkey_dh.c
compiling unixsocket.c
compiling ossl_pkey_dsa.c
compiling unixserver.c
compiling option.c
compiling bytecode.c
compiling ossl_pkey_ec.c
compiling emitter.c
compiling ancdata.c
compiling ossl_pkey_rsa.c
compiling gram.c
compiling raddrinfo.c
compiling handler.c
compiling ossl_rand.c
compiling implicit.c
compiling ossl_ssl.c
ossl_ssl.c:987:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (rc = SSL_shutdown(ssl))
~~~^~~~~~~~~~~~~~~~~~~
ossl_ssl.c:987:13: note: place parentheses around the assignment to silence this warning
if (rc = SSL_shutdown(ssl))
^
( )
ossl_ssl.c:987:13: note: use '==' to turn this assignment into an equality comparison
if (rc = SSL_shutdown(ssl))
^
==
ossl_ssl.c:1993:5: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
ossl_ssl_def_const(OP_ALL);
^~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:1973:57: note: expanded from macro 'ossl_ssl_def_const'
#define ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2NUM(SSL_##x))
^~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:973:21: note: expanded from macro 'INT2NUM'
# define INT2NUM(v) INT2FIX((int)(v))
^~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
compiling node.c
compiling init.c
compiling rubyext.c
compiling constants.c
2 warnings generated.
compiling ossl_ssl_session.c
compiling ossl_x509.c
compiling syck.c
compiling ossl_x509attr.c
compiling token.c
compiling ossl_x509cert.c
installing default socket libraries
linking shared-object socket.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling syslog.c
installing default syslog libraries
linking shared-object syslog.bundle
compiling ossl_x509crl.c
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling stubs.c
In file included from stubs.c:16:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
# include <X11/Xlib.h>
^
1 error generated.
make[2]: *** [stubs.o] Error 1
make[1]: *** [ext/tk/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling yaml2byte.c
compiling ossl_x509ext.c
compiling ossl_x509name.c
linking shared-object syck.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
ossl_x509name.c:290:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
if (result < 0) return INT2FIX(-1);
^~~~~~~~~~~
../.././include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
checking ../.././parse.y and ../.././ext/ripper/eventids2.c
installing default syck libraries
compiling ossl_x509req.c
compiling ossl_x509revoked.c
1 warning generated.
installing default ripper libraries
compiling ossl_x509store.c
installing default openssl libraries
linking shared-object openssl.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
1 warning generated.
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
make: *** [build-ext] Error 2
I'm not sure how to fix it.
While doing Bundle install for my app, I'm getting an error related to therubyracer (0.9.4).
This is the error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/kpvarma/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
creating Makefile
make
compiling rr.cpp
clang: warning: argument unused during compilation: '-rdynamic'
rr.cpp:48:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
rr.cpp:151:44: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return String::New(RSTRING_PTR(value), RSTRING_LEN(value));
^~~~~~~~~~~~~~~~~~
/Users/kpvarma/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:674:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^
/Users/kpvarma/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:670:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rr.cpp:151:44: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return String::New(RSTRING_PTR(value), RSTRING_LEN(value));
^~~~~~~~~~~~~~~~~~
/Users/kpvarma/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:675:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
^
3 warnings generated.
compiling v8.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_array.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_callbacks.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_context.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_date.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_debug.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_exception.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_exception.cpp:15:8: warning: unused function 'segfault' [-Wunused-function]
void segfault(int sig) {
^
1 warning generated.
compiling v8_external.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_external.cpp:10:9: warning: unused variable 'references' [-Wunused-variable]
VALUE references;
^
1 warning generated.
compiling v8_function.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_function.cpp:24:23: error: variable length array of non-POD element type 'Handle<v8::Value>'
Handle<Value> argv[argc];
^
v8_function.cpp:36:23: error: variable length array of non-POD element type 'Handle<v8::Value>'
Handle<Value> argv[argc];
^
2 errors generated.
make: *** [v8_function.o] Error 1
Gem files will remain installed in /Users/kpvarma/.rvm/gems/ruby-1.9.3-p194/gems/therubyracer-0.9.4 for inspection.
Results logged to /Users/kpvarma/.rvm/gems/ruby-1.9.3-p194/gems/therubyracer-0.9.4/ext/v8/gem_make.out
An error occured while installing therubyracer (0.9.4), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.9.4'` succeeds before bundling.
I amm using ruby-1.9.3-p194 on Mac.
Can anyone please help me out?
Thank you
Regards