progit / progit2

Pro Git 2nd Edition
Other
5.69k stars 1.88k forks source link

Cannot build book on Windows #1845

Closed danieleteti closed 1 year ago

danieleteti commented 1 year ago

There's no existing/similar bug report.

This report is about a single actionable bug.

This report is about the ProGit book, version 2, English language.

Bug covers book website/pdf

Problem is present in the Pro Git book on the website?

Which version of the book is affected?

Tooling

Describe the bug:

I'd like to generate the book manually but I got an error installing the required tools.

Thanks for this great project

Steps to reproduce:

C:\> git clone https://github.com/progit/progit2.git
C:\> cd progit2
C:\progit2> bundle install
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 13.0.6
Using racc 1.6.2
Using Ascii85 1.1.0
Using public_suffix 5.0.1
Using afm 0.2.2
Using asciidoctor 2.0.18
Using bundler 2.4.6
Using mini_portile2 2.8.1
Using rubyzip 2.3.2
Using mime-types-data 3.2023.0218.1
Using concurrent-ruby 1.2.2
Using matrix 0.4.2
Using pdf-core 0.9.0
Using json 2.6.3
Using ttfunk 1.7.0
Using rexml 3.2.5
Using hashery 2.1.2
Using ruby-rc4 0.1.5
Using polyglot 0.3.5
Using fiber-local 1.0.0
Using timers 4.3.5
Using awesome_print 1.9.2
Using coderay 1.1.3
Using epubcheck-ruby 5.0.0.0
Using rainbow 3.1.1
Using yell 2.2.2
Using zeitwerk 2.6.7
Using pygments.rb 2.3.1
Using thread_safe 0.3.6
Using addressable 2.8.1
Using mime-types 3.4.1
Using prawn 2.4.0
Using pdf-reader 2.11.0
Using treetop 1.6.12
Using console 1.16.2
Using kindlegen 3.1.1
Using prawn-icon 3.0.0
Using css_parser 1.14.0
Using prawn-table 0.2.2
Using prawn-templates 0.1.2
Using prawn-svg 0.32.0
Using asciidoctor-pdf 2.3.4
Installing io-event 1.1.7 with native extensions
Installing ffi 1.15.5 with native extensions
Installing nokogiri 1.13.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/gems/nokogiri-1.13.10/ext/nokogiri
C:/Ruby32-x64/bin/ruby.exe -I C:/Ruby32-x64/lib/ruby/3.2.0 extconf.rb
checking for whether -std=c99 is accepted as CFLAGS... *** 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:/Ruby32-x64/bin/$(RUBY_BASE_NAME)
        --help
        --clean
        --prevent-strip
C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:490:in `try_do': The compiler failed to
generate an executable file. (RuntimeError)
You have to install development tools first.

        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:616:in `block in try_compile'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:563:in `with_werror'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:616:in `try_compile'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:680:in `try_cflags'
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1025:in `block (2 levels) in
append_cflags'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:989:in `block in checking_for'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:354:in `block (2 levels) in postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:324:in `open'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:354:in `block in postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:324:in `open'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:350:in `postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:988:in `checking_for'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1024:in `block in append_cflags'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1023:in `each'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1023:in `append_cflags'
        from extconf.rb:617:in `<main>'

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

C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/nokogiri-1.13.10/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/gems/nokogiri-1.13.10 for inspection.
Results logged to C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/nokogiri-1.13.10/gem_make.out

  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:102:in `run'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:170:in `build_extension'
C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:204:in `block in
build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `each'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:28:in `install'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/source/rubygems.rb:200:in `install'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:54:in
`install'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:155:in
`do_install'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:146:in
`block in worker_pool'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:62:in `apply_func'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:57:in `block in process_queue'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:54:in `loop'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:54:in `process_queue'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:90:in `block (2 levels) in
create_threads'

An error occurred while installing nokogiri (1.13.10), and Bundler cannot
continue.

In Gemfile:
  asciidoctor-epub3 was resolved to 1.5.1, which depends on
    gepub was resolved to 1.0.15, which depends on
      nokogiri

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/gems/io-event-1.1.7/ext
C:/Ruby32-x64/bin/ruby.exe -I C:/Ruby32-x64/lib/ruby/3.2.0 extconf.rb
checking for rb_ext_ractor_safe()... *** 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:/Ruby32-x64/bin/$(RUBY_BASE_NAME)
C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:490:in `try_do': The compiler failed to
generate an executable file. (RuntimeError)
You have to install development tools first.

        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:583:in `try_link0'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:601:in `try_link'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:812:in `try_func'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1116:in `block in have_func'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:989:in `block in checking_for'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:354:in `block (2 levels) in postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:324:in `open'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:354:in `block in postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:324:in `open'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:350:in `postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:988:in `checking_for'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1115:in `have_func'
        from extconf.rb:42:in `<main>'

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

C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/io-event-1.1.7/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/gems/io-event-1.1.7 for inspection.
Results logged to C:/Users/Daniele
Teti/.local/share/gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/io-event-1.1.7/gem_make.out

  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:102:in `run'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:170:in `build_extension'
C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:204:in `block in
build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `each'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:28:in `install'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/source/rubygems.rb:200:in `install'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:54:in
`install'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:155:in
`do_install'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:146:in
`block in worker_pool'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:62:in `apply_func'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:57:in `block in process_queue'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:54:in `loop'
  C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:54:in `process_queue'
C:/Ruby32-x64/lib/ruby/3.2.0/bundler/worker.rb:90:in `block (2 levels) in
create_threads'

An error occurred while installing io-event (1.1.7), and Bundler cannot
continue.

In Gemfile:
  html-proofer was resolved to 5.0.6, which depends on
    async was resolved to 2.4.2, which depends on
      io-event

Expected behavior:

build install completed successfully

Screenshots:

No response

Additional context:

No response

Device

laptop

Operating system

Windows 10 Pro

Browser/application + version

No response

danieleteti commented 1 year ago

I've installed MSYS2 but nothing changed

karistom commented 1 year ago

Installation https://jekyllrb.com/docs/installation/ according to the OS in your local, resolved the issue in my case.

ben commented 1 year ago

@danieleteti did @karistom's tip help you? I'm going to close this for now, but feel free to reopen if you think there's more to do here.