-
Notifications
You must be signed in to change notification settings - Fork 114
Error installing on windows 10 with ruby installer #146
Comments
any information on how to fix this? Thanks |
Any fix for this or suggestions? Thanks |
I'm sorry I don't know much about building on Windows. I notice that your log shows Ruby26-x64 and Ruby27-x64. That's surprising to me. I'd expect the files to be linked by the same toolchain that compiled them. |
gem_make.out https://gist.github.com/dsisnero/26943d1b5ad0dbd489128b09b2a39e0c Ok- this is from C:\Users\Dominic E Sisneros>gem environment
|
Still have an error on 10/07/2020 gem_make.out https://gist.github.com/dsisnero/04b8421fd3056163a9d8e3730c0c6628 |
It looks like it's failing to create the shared object (dll on Windows) because it can't find symbols from Nokogiri. I'm not sure why that would be the case. |
I don't know. Here's the latest test 11/30/2020 |
This is a little odd. The CI build does not find the
so presumably, it's using the slow path where building the tree goes through Ruby. In your log, it is finding
In both cases, the libxml2 headers are found. What happens if you try @flavorjones Any idea why |
Hmm. I wonder if Windows can even work the same way macOS and Linux do here without exporting the Nokogiri and libxml2 symbols by adding If it turns out this is the issue, I can change |
Sorry, I don't know enough to help. Here's what I found
https://www.transmissionzero.co.uk/computing/building-dlls-with-mingw/ and
https://www.transmissionzero.co.uk/computing/advanced-mingw-dll-topics/
…On Mon, Nov 30, 2020 at 9:57 AM Stephen Checkoway ***@***.***> wrote:
Hmm. I wonder if Windows can even work the same way macOS and Linux do
here without exporting the Nokogiri and libxml2 symbols
<https://docs.microsoft.com/en-us/cpp/build/exporting-from-a-dll?view=msvc-160>
by adding __declspec(dllexport) to them or making a .def file (which
extconf.rb does to export the initialization function).
If it turns out this is the issue, I can change extconf.rb to not try to
link against nokogiri.so on Windows which should solve this problem (but
leave Windows with the slow path).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABQRJBYFVTOVNCNNCHOWTSSPFGVANCNFSM4NGHF3TA>
.
|
Sorry, I was hoping to find time over the weekend to look at this, and I fell woefully short of that expectation. I can't think of any good reasons why we shouldn't be able to make this work on Windows, I just need to understand what's going on. I may be able to spend time on it later this week. |
I've got a Windows dev environment up and running now, will take a look tonight. |
So #163 should resolve this issue; but it has its own issues (see the conversation there and at sparklemotion/nokogiri#2167). Still working on it. |
This should be fixed in v2.0.5 which just shipped. Closing, but please feel free to comment if you're still seeing this issue with the latest version. |
thank you!
…On Fri, Mar 19, 2021 at 6:06 AM Mike Dalessio ***@***.***> wrote:
Closed #146 <#146>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#146 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABQRJN54GYUMJPJV3M3KLTEM44HANCNFSM4NGHF3TA>
.
|
C:\Users\Dominic E Sisneros\source\repos\git\dsisnero\numo-narray>gem install nokogumbo --platform=ruby
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing nokogumbo:
ERROR: Failed to build gem native extension.
c:/Ruby27-x64/bin/ruby.exe -I c:/Ruby27-x64/lib/ruby/2.7.0 -r ./siteconf20200520-17996-2d18h9.rb extconf.rb
checking for xmlNewDoc() in -lxml2... yes
checking for nokogiri.h in c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nokogiri-1.10.9/ext/nokogiri... yes
creating Makefile
current directory: c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nokogumbo-2.0.2/ext/nokogumbo
make "DESTDIR=" clean
current directory: c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nokogumbo-2.0.2/ext/nokogumbo
make "DESTDIR="
generating nokogumbo-x64-mingw32.def
compiling nokogumbo.c
In file included from nokogumbo.c:53:
c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri.h:13: warning: "_GNU_SOURCE" redefined
13 | #define _GNU_SOURCE
|
In file included from C:/Ruby27-x64/include/ruby-2.7.0/ruby/ruby.h:24,
from C:/Ruby27-x64/include/ruby-2.7.0/ruby.h:33,
from nokogumbo.c:22:
c:/Ruby27-x64/include/ruby-2.7.0/x64-mingw32/ruby/config.h:17: note: this is the location of the previous definition
17 | #define _GNU_SOURCE 1
|
nokogumbo.c: In function 'parse':
nokogumbo.c:505:20: warning: passing argument 1 of 'rb_ensure' from incompatible pointer type [-Wincompatible-pointer-types]
505 | return rb_ensure(parse_continue, (VALUE)&args, parse_cleanup, (VALUE)&args);
| ^~~~~~~~~~~~~~
| |
| VALUE ()(ParseArgs ) {aka long long unsigned int ()(ParseArgs )}
In file included from C:/Ruby27-x64/include/ruby-2.7.0/ruby.h:33,
from nokogumbo.c:22:
C:/Ruby27-x64/include/ruby-2.7.0/ruby/ruby.h:1990:17: note: expected 'VALUE ()(VALUE)' {aka 'long long unsigned int ()(long long unsigned int)'} but argument is of type 'VALUE ()(ParseArgs )' {aka 'long long unsigned int ()(ParseArgs )'}
1990 | VALUE rb_ensure(VALUE()(VALUE),VALUE,VALUE()(VALUE),VALUE);
| ^~~~~~~~~~~~~~~
nokogumbo.c:505:50: warning: passing argument 3 of 'rb_ensure' from incompatible pointer type [-Wincompatible-pointer-types]
505 | return rb_ensure(parse_continue, (VALUE)&args, parse_cleanup, (VALUE)&args);
| ^~~~~~~~~~~~~
| |
| VALUE ()(ParseArgs ) {aka long long unsigned int ()(ParseArgs )}
In file included from C:/Ruby27-x64/include/ruby-2.7.0/ruby.h:33,
from nokogumbo.c:22:
C:/Ruby27-x64/include/ruby-2.7.0/ruby/ruby.h:1990:39: note: expected 'VALUE ()(VALUE)' {aka 'long long unsigned int ()(long long unsigned int)'} but argument is of type 'VALUE ()(ParseArgs )' {aka 'long long unsigned int ()(ParseArgs )'}
1990 | VALUE rb_ensure(VALUE()(VALUE),VALUE,VALUE()(VALUE),VALUE);
| ^~~~~~~~~~~~~~~
nokogumbo.c: In function 'fragment':
nokogumbo.c:695:13: warning: passing argument 1 of 'rb_ensure' from incompatible pointer type [-Wincompatible-pointer-types]
695 | rb_ensure(fragment_continue, (VALUE)&args, parse_cleanup, (VALUE)&args);
| ^~~~~~~~~~~~~~~~~
| |
| VALUE ()(ParseArgs ) {aka long long unsigned int ()(ParseArgs )}
In file included from C:/Ruby27-x64/include/ruby-2.7.0/ruby.h:33,
from nokogumbo.c:22:
C:/Ruby27-x64/include/ruby-2.7.0/ruby/ruby.h:1990:17: note: expected 'VALUE ()(VALUE)' {aka 'long long unsigned int ()(long long unsigned int)'} but argument is of type 'VALUE ()(ParseArgs )' {aka 'long long unsigned int ()(ParseArgs )'}
1990 | VALUE rb_ensure(VALUE()(VALUE),VALUE,VALUE()(VALUE),VALUE);
| ^~~~~~~~~~~~~~~
nokogumbo.c:695:46: warning: passing argument 3 of 'rb_ensure' from incompatible pointer type [-Wincompatible-pointer-types]
695 | rb_ensure(fragment_continue, (VALUE)&args, parse_cleanup, (VALUE)&args);
| ^~~~~~~~~~~~~
| |
| VALUE ()(ParseArgs ) {aka long long unsigned int ()(ParseArgs )}
In file included from C:/Ruby27-x64/include/ruby-2.7.0/ruby.h:33,
from nokogumbo.c:22:
C:/Ruby27-x64/include/ruby-2.7.0/ruby/ruby.h:1990:39: note: expected 'VALUE ()(VALUE)' {aka 'long long unsigned int ()(long long unsigned int)'} but argument is of type 'VALUE ()(ParseArgs )' {aka 'long long unsigned int ()(ParseArgs )'}
1990 | VALUE rb_ensure(VALUE()(VALUE),VALUE,VALUE()(VALUE),VALUE);
| ^~~~~~~~~~~~~~~
compiling ./../../gumbo-parser/src/ascii.c
compiling ./../../gumbo-parser/src/attribute.c
compiling ./../../gumbo-parser/src/char_ref.c
compiling ./../../gumbo-parser/src/error.c
compiling ./../../gumbo-parser/src/foreign_attrs.c
compiling ./../../gumbo-parser/src/parser.c
compiling ./../../gumbo-parser/src/string_buffer.c
compiling ./../../gumbo-parser/src/string_piece.c
compiling ./../../gumbo-parser/src/svg_attrs.c
compiling ./../../gumbo-parser/src/svg_tags.c
compiling ./../../gumbo-parser/src/tag.c
compiling ./../../gumbo-parser/src/tag_lookup.c
compiling ./../../gumbo-parser/src/tokenizer.c
compiling ./../../gumbo-parser/src/token_buffer.c
compiling ./../../gumbo-parser/src/utf8.c
compiling ./../../gumbo-parser/src/util.c
compiling ./../../gumbo-parser/src/vector.c
linking shared-object nokogumbo/nokogumbo.so
C:/Ruby26-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: nokogumbo.o:nokogumbo.c:(.text+0x1366): undefined reference to
Nokogiri_wrap_xml_document' C:/Ruby26-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: nokogumbo.o:nokogumbo.c:(.rdata$.refptr.mNokogiri[.refptr.mNokogiri]+0x0): undefined reference to
mNokogiri'C:/Ruby26-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: nokogumbo.o:nokogumbo.c:(.rdata$.refptr.cNokogiriXmlSyntaxError[.refptr.cNokogiriXmlSyntaxError]+0x0): undefined reference to `cNokogiriXmlSyntaxError'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:261: nokogumbo.so] Error 1
make failed, exit code 2
Gem files will remain installed in c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nokogumbo-2.0.2 for inspection.
Results logged to c:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/nokogumbo-2.0.2/gem_make.out
The text was updated successfully, but these errors were encountered: