Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSI: Failed to execute rake msi:build #115

Closed
kenhys opened this issue Jun 23, 2020 · 10 comments
Closed

MSI: Failed to execute rake msi:build #115

kenhys opened this issue Jun 23, 2020 · 10 comments

Comments

@kenhys
Copy link
Contributor

kenhys commented Jun 23, 2020

Problem

rake msi:build fails to build.

Expected

rake msi:build succeeds.

Actual

ref. #24 (comment)

Fetching fluent-plugin-parser-winevt_xml-0.2.2.gem
Successfully installed mini_portile2-2.4.0
ERROR:  Error installing C:/td-agent-4.0.0.rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-eventlog-0.5.4.gem:
        The last version of nokogiri (>= 1.10, < 1.12) to support your Ruby & RubyGems was 1.10.9. Try installing it with `gem install nokogiri -v 1.10.9` and then running the current command again
        nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current ruby version is 2.7.1.83.
rake aborted!
@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

This issue still remains on HEAD

1 gem installed
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td-agent-4.0.0~rc1/td-agent/downloads/plug
in_gems/26-fluent-plugin-windows-eventlog-0.5.4.gem
Fetching mini_portile2-2.4.0.gem
Fetching nokogiri-1.10.9-x64-mingw32.gem
Fetching fluent-plugin-parser-winevt_xml-0.2.2.gem
Successfully installed mini_portile2-2.4.0
ERROR:  Error installing C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-eventlog-0.5.4.ge
m:
        The last version of nokogiri (>= 1.10, < 1.12) to support your Ruby & RubyGems was 1.10.9. Try installing it wit
h `gem install nokogiri -v 1.10.9` and then running the current command again
        nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current ruby version is 2.7.1.83.
rake aborted!
Command failed with status (1): [C:/opt/td-agent/bin/gem install --no-docum...]
C:/td-agent-4.0.0~rc1/td-agent/Rakefile:634:in `gem_install'
C:/td-agent-4.0.0~rc1/td-agent/Rakefile:645:in `block in install_gems'
C:/td-agent-4.0.0~rc1/td-agent/Rakefile:644:in `each'
C:/td-agent-4.0.0~rc1/td-agent/Rakefile:644:in `install_gems'
C:/td-agent-4.0.0~rc1/td-agent/Rakefile:272:in `block (2 levels) in define'
Tasks: TOP => msi:selfbuild => build:all => build:licenses => build:gems => build:plugin_gems
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [C:/tools/ruby27/bin/ruby.exe -S rake msi:s...]
C:/td-agent-4.0.0~rc1/Rakefile:27:in `block (3 levels) in define_bulked_task'
C:/td-agent-4.0.0~rc1/Rakefile:26:in `block (2 levels) in define_bulked_task'
C:/td-agent-4.0.0~rc1/Rakefile:25:in `each'
C:/td-agent-4.0.0~rc1/Rakefile:25:in `block in define_bulked_task'
Tasks: TOP => msi:selfbuild
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [docker run --rm --tty --volume C:/work/td-...]
C:/work/td-agent-builder/td-agent/Rakefile:952:in `run_docker'
C:/work/td-agent-builder/td-agent/Rakefile:871:in `block (2 levels) in define'
C:/work/td-agent-builder/td-agent/Rakefile:861:in `block (2 levels) in define'
Tasks: TOP => msi:dockerbuild
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [C:/Ruby26-x64/bin/ruby.exe -S rake msi:bui...]
C:/work/td-agent-builder/Rakefile:27:in `block (3 levels) in define_bulked_task'
C:/work/td-agent-builder/Rakefile:26:in `block (2 levels) in define_bulked_task'
C:/work/td-agent-builder/Rakefile:25:in `each'
C:/work/td-agent-builder/Rakefile:25:in `block in define_bulked_task'
Tasks: TOP => msi:build
(See full trace by running task with --trace)

@ashie
Copy link
Member

ashie commented Jun 23, 2020

FYI: #24 (comment)

@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

I've tried sparklemotion/nokogiri#2029 (comment) workaround works as expected:

  1. fix fluent-plugin-windows-eventlog.gemspec to~> 1.11.pre.
  2. rake build to make .gem
  3. put it under td-agent/downloads
  4. use 0.7.0.gem in plugin_gem.rb
  5. rake msi:build.

It works for me.

�[?25h�[?25l"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e��[?25h�[?25l
ventlog-0.7.0.gem"�[62X�[62C�[25;19H�[?25h�[?25l�[HC�[25;19H�[?25h�[?25l
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e��[?25h�[?25l
ventlog-0.7.0.gem"�[62X�[62C�[25;19H�[?25h�[?25l
"--prerelease"�[66X�[66C�[25;15H�[?25h�[?25l
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td��[?25h�[?25l
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-eventlo��[?25h�[?25l
g-0.7.0.gem�[69X�[69C�[25;12H�[?25h�[?25l
�[H"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/24-win32-eventlog-0.6.7.ge
m"�[78X�[78C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/24-win32-eventlog-0.6.7.ge
m"�[78X�[78C
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/24-win32-eventlog-0.6.7.gem     
Successfully installed win32-eventlog-0.6.7�[37X�[37C
1 gem installed�[65X�[65C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem"    
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem"    
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem�[11X�[11C
Temporarily enhancing PATH for MSYS/MINGW...�[36X�[36C
Building native extensions. This could take a while...�[26X�[26C
Successfully installed winevt_c-0.7.4�[43X�[43C
1 gem installed�[65X�[65C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e
ventlog-0.7.0.gem"�[62X�[62C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e
ventlog-0.7.0.gem"�[62X�[62C
"--prerelease"�[66X�[66C
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-eventlo
g-0.7.0.gem�[69X�[69C
�[80X�[80C
�[?25h�[?25lFetching winevt_c-0.8.1.gem ��[?25h�[?25l�[H"�[25;28H�[?25h�[?25l
�[80X�[80C
�[?25h�[?25l�[Hm"�[78X�[78C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/24-win32-eventlog-0.6.7.ge
m"�[78X�[78C
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/24-win32-eventlog-0.6.7.gem     
Successfully installed win32-eventlog-0.6.7�[37X�[37C
1 gem installed�[65X�[65C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem"    
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem"    
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem�[11X�[11C
Temporarily enhancing PATH for MSYS/MINGW...�[36X�[36C
Building native extensions. This could take a while...�[26X�[26C
Successfully installed winevt_c-0.7.4�[43X�[43C
1 gem installed�[65X�[65C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e
ventlog-0.7.0.gem"�[62X�[62C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e
ventlog-0.7.0.gem"�[62X�[62C
"--prerelease"�[66X�[66C
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-eventlo
g-0.7.0.gem�[69X�[69C
Fetching winevt_c-0.8.1.gem�[53X�[53C
�[80X�[80C
�[?25h�[?25lTemporarily enhancing PATH for MSYS/MINGW... ��[?25h�[?25l
�[80X�[80C
�[?25h�[?25lBuilding native extensions. This could take a while... ��[?25h�[H"�[25;55H�[?25l
�[80X�[80C
�[?25h�[?25lSuccessfully installed winevt_c-0.8.1 ��[?25h�[Hm�[25;38H�[?25l
�[80X�[80C
�[?25h�[?25lSuccessfully installed fluent-plugin-windows-eventlog-0.7.0 ��[?25h�[HC�[25;60H�[?25l
2 gems installed�[64X�[64C�[25;17H�[?25h�[?25l
�[80X�[80C
�[?25h�[?25l�[HSuccessfully installed win32-eventlog-0.6.7�[37X�[37C
1 gem installed�[65X�[65C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem"    
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem"    
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/25-winevt_c-0.7.4.gem�[11X�[11C
Temporarily enhancing PATH for MSYS/MINGW...�[36X�[36C
Building native extensions. This could take a while...�[26X�[26C
Successfully installed winevt_c-0.7.4�[43X�[43C
1 gem installed�[65X�[65C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e
ventlog-0.7.0.gem"�[62X�[62C
"C:/td-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-e
ventlog-0.7.0.gem"�[62X�[62C
"--prerelease"�[66X�[66C
C:/opt/td-agent/bin/gem install --no-document --bindir C:/opt/td-agent/bin C:/td
-agent-4.0.0~rc1/td-agent/downloads/plugin_gems/26-fluent-plugin-windows-eventlo
g-0.7.0.gem�[69X�[69C
Fetching winevt_c-0.8.1.gem�[53X�[53C
Temporarily enhancing PATH for MSYS/MINGW...�[36X�[36C
Building native extensions. This could take a while...�[26X�[26C
Successfully installed winevt_c-0.8.1�[43X�[43C
Successfully installed fluent-plugin-windows-eventlog-0.7.0�[21X�[21C
2 gems installed�[64X�[64C
�[80X�[80C
�[?25h�[?25lmkdir -p C:/opt/td-agent/LICENSES ��[?25h�[?25l
cd C:/opt/td-agent/LICENSES�[53X�[53C�[25;28H�[?25h�[?25l
mv C:/opt/td-agent/LICENSE.txt LICENSE-RubyInstaller.txt�[24X�[24C�[25;57H�[?25h�[?25l
tar xf C:/td-agent-4.0.0~rc1/td-agent/downloads/ruby-2.7.1.tar.gz ruby-2.7.1/COP��[?25h�[?25l

@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

here is the build log.
wip.use0.7.0.take2.utf8.log

@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

TODO: ask when nokogiri 1.11 gem will be released

@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

I've asked sparklemotion/nokogiri#2029 (comment).

@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

After #116 was merged, the next issue is rc version handling in wix.

C:\Program Files (x86)\WiX Toolset v3.11\bin\candle -nologo -dProjectSourceDir=
:/opt/td-agent -arch x64 project-files.wxs source.wxsc

project-files.wxs 


csource.wxs 


cC:\td-agent-4.0.0~rc1\td-agent\msi\source.wxs(11) : error CNDL0108 : The Produc
/@Version attribute's value, '4.0.0~rc1', is not a valid version.  Legal versio
 values should look like 'x.x.x.x' where x is an integer from 0 to 65534.       


C:\td-agent-4.0.0~rc1\td-agent\msi\source.wxs(11) : error CNDL0010 : The Produc
/@Version attribute was not found; it is required.


rake aborted!

@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

@kenhys
Copy link
Contributor Author

kenhys commented Jun 23, 2020

Idea:

  1. regards 4.0.0~rc1 as 400 (Integer)
  2. then apply 400.pred => 399.
  3. append 3.9.9.YYMMDD (for example, 2020/06/23 -> 3.9.9.200623)

@flavorjones
Copy link

Nokogiri v1.10.10 has been released with precompiled support for Ruby 2.7 on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants