asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
49 stars 44 forks source link

Fail instalation on Windows #29

Closed lit-uriy closed 6 years ago

lit-uriy commented 7 years ago

gem install asciidoctor-mathematical generates a huge number of errors, for some reason dependencies are not installed automatically. Did anybody install this on Windows

tstumm commented 7 years ago

Please post your log.

lit-uriy commented 7 years ago
current directory: c:/Programs/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mathematical-1.6.9/ext/mathematical
c:/Programs/Ruby200-x64/bin/ruby.exe -r ./siteconf20170519-6012-nc2zz.rb extconf.rb
checking for cmake... yes
checking for main() in -lxml2... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=c:/Programs/Ruby200-x64/bin/ruby
    --with-xml2lib
    --without-xml2lib
c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:534:in `try_link'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:714:in `try_func'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:944:in `block in have_library'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:889:in `block in checking_for'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:310:in `open'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:310:in `open'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:888:in `checking_for'
    from c:/Programs/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:939:in `have_library'
    from extconf.rb:45:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  c:/Programs/Ruby200-x64/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/mathematical-1.6.9/mkmf.log

extconf failed, exit code 1

mkmf.log:

find_executable: checking for cmake... -------------------- yes

--------------------

"x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/Programs/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -Ic:/Programs/Ruby200-x64/include/ruby-2.0.0/ruby/backward -Ic:/Programs/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c  -L. -Lc:/Programs/Ruby200-x64/lib -L.      -lx64-msvcrt-ruby200  -lshell32 -lws2_32 -limagehlp -lshlwapi  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */
tstumm commented 7 years ago

Please try to install the Ruby DevKit.

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

lit-uriy commented 7 years ago

Ruby DevKit installed, and i run devkitvars.bat, to update PATH variable. I am instal mathematical gem manual, libxml-dev too. When I explicitly the manual installation of gems, no error occurs. There are a large number of gems that need to install, I can't do it all by hand.

crra commented 6 years ago

@lit-uriy: check if you have installed: mingw-w64-x86_64-gcc via pacman -S mingw-w64-x86_64-gcc if your are using http://www.msys2.org/

ProgramFan commented 6 years ago

Duplicated as #36