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

Add msys2 as dependency to avoid ridk call #16

Merged
merged 1 commit into from Feb 15, 2019

Conversation

Projects
None yet
2 participants
@CAMOBAP795
Copy link
Collaborator

CAMOBAP795 commented Feb 6, 2019

@CAMOBAP795 CAMOBAP795 requested a review from ronaldtse Feb 6, 2019

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 6, 2019

@ronaldtse looks like appveyor comes with msys2 out of box this is why this doesn't reproduced on it.

I also have it on my machine preinstalled, I will remove it and test without it tomorrow morning

@CAMOBAP795 CAMOBAP795 self-assigned this Feb 6, 2019

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 7, 2019

Thanks, it seems like we need to make sure the AppVeyor build passes first?

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 7, 2019

Error:

Successfully installed bundler-2.0.1
23172Parsing documentation for bundler-2.0.1
23173Installing ri documentation for bundler-2.0.1
23174Done installing documentation for bundler after 7 seconds
231751 gem installed
23176ERROR:  Error installing metanorma-cli:
23177	ERROR: Failed to build gem native extension.
23178
23179    current directory: C:/Tools/ruby25/lib/ruby/gems/2.5.0/gems/ruby-xslt-0.9.10/ext/xslt_lib
23180C:/Tools/ruby25/bin/ruby.exe -r ./siteconf20190206-1880-1qsmu56.rb extconf.rb --with-xml2-include=C:\ProgramData\chocolatey\lib\xsltproc\dist\include\libxml2 --with-xslt-include=C:\ProgramData\chocolatey\lib\xsltproc\dist\include --with-xml2-lib=C:\ProgramData\chocolatey\lib\xsltproc\dist\lib --with-xslt-lib=C:\ProgramData\chocolatey\lib\xsltproc\dist\lib
23181checking for xmlParseDoc() in -lxml2... *** extconf.rb failed ***
23182Could not create Makefile due to some reason, probably lack of necessary
23183libraries and/or headers.  Check the mkmf.log file for more details.  You may
23184need configuration options.
23185
23186Provided configuration options:
23187	--with-opt-dir
23188	--without-opt-dir
23189	--with-opt-include
23190	--without-opt-include=${opt-dir}/include
23191	--with-opt-lib
23192	--without-opt-lib=${opt-dir}/lib
23193	--with-make-prog
23194	--without-make-prog
23195	--srcdir=.
23196	--curdir
23197	--ruby=C:/Tools/ruby25/bin/$(RUBY_BASE_NAME)
23198	--enable-error-handler
23199	--disable-error-handler
23200	--with-xml2-dir
23201	--without-xml2-dir
23202	--with-xml2-include=${xml2-dir}/include
23203	--with-xml2-lib=${xml2-dir}/lib
23204	--with-xslt-dir
23205	--without-xslt-dir
23206	--with-xslt-include=${xslt-dir}/include
23207	--with-xslt-lib=${xslt-dir}/lib
23208	--with-xml2lib
23209	--without-xml2lib
23210C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
23211You have to install development tools first.
23212	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:541:in `try_link0'
23213	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:559:in `try_link'
23214	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:771:in `try_func'
23215	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:1005:in `block in have_library'
23216	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:948:in `block in checking_for'
23217	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:350:in `block (2 levels) in postpone'
23218	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:320:in `open'
23219	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:350:in `block in postpone'
23220	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:320:in `open'
23221	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:346:in `postpone'
23222	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:947:in `checking_for'
23223	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:1000:in `have_library'
23224	from extconf.rb:45:in `<main>'
23225
23226To see why this extension failed to compile, please check the mkmf.log which can be found here:
23227
23228  C:/Tools/ruby25/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/ruby-xslt-0.9.10/mkmf.log
23229
23230extconf failed, exit code 1
23231
23232Gem files will remain installed in C:/Tools/ruby25/lib/ruby/gems/2.5.0/gems/ruby-xslt-0.9.10 for inspection.
23233Results logged to C:/Tools/ruby25/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/ruby-xslt-0.9.10/gem_make.out
23234
23235Successfully installed asciidoctor-1.5.8
23236
@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 7, 2019

Second error:

Successfully installed bundler-2.0.1
23143Parsing documentation for bundler-2.0.1
23144Installing ri documentation for bundler-2.0.1
23145Done installing documentation for bundler after 5 seconds
231461 gem installed
23147ERROR:  Error installing metanorma-cli:
23148	ERROR: Failed to build gem native extension.
23149
23150    current directory: C:/Tools/ruby25/lib/ruby/gems/2.5.0/gems/ruby-xslt-0.9.10/ext/xslt_lib
23151C:/Tools/ruby25/bin/ruby.exe -r ./siteconf20190206-264-afigpz.rb extconf.rb --with-xml2-include=C:\ProgramData\chocolatey\lib\xsltproc\dist\include\libxml2 --with-xslt-include=C:\ProgramData\chocolatey\lib\xsltproc\dist\include --with-xml2-lib=C:\ProgramData\chocolatey\lib\xsltproc\dist\lib --with-xslt-lib=C:\ProgramData\chocolatey\lib\xsltproc\dist\lib
23152checking for xmlParseDoc() in -lxml2... *** extconf.rb failed ***
23153Could not create Makefile due to some reason, probably lack of necessary
23154libraries and/or headers.  Check the mkmf.log file for more details.  You may
23155need configuration options.
23156
23157Provided configuration options:
23158	--with-opt-dir
23159	--without-opt-dir
23160	--with-opt-include
23161	--without-opt-include=${opt-dir}/include
23162	--with-opt-lib
23163	--without-opt-lib=${opt-dir}/lib
23164	--with-make-prog
23165	--without-make-prog
23166	--srcdir=.
23167	--curdir
23168	--ruby=C:/Tools/ruby25/bin/$(RUBY_BASE_NAME)
23169	--enable-error-handler
23170	--disable-error-handler
23171	--with-xml2-dir
23172	--without-xml2-dir
23173	--with-xml2-include=${xml2-dir}/include
23174	--with-xml2-lib=${xml2-dir}/lib
23175	--with-xslt-dir
23176	--without-xslt-dir
23177	--with-xslt-include=${xslt-dir}/include
23178	--with-xslt-lib=${xslt-dir}/lib
23179	--with-xml2lib
23180	--without-xml2lib
23181C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
23182You have to install development tools first.
23183	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:541:in `try_link0'
23184	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:559:in `try_link'
23185	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:771:in `try_func'
23186	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:1005:in `block in have_library'
23187	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:948:in `block in checking_for'
23188	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:350:in `block (2 levels) in postpone'
23189	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:320:in `open'
23190	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:350:in `block in postpone'
23191	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:320:in `open'
23192	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:346:in `postpone'
23193	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:947:in `checking_for'
23194	from C:/Tools/ruby25/lib/ruby/2.5.0/mkmf.rb:1000:in `have_library'
23195	from extconf.rb:45:in `<main>'
23196
23197To see why this extension failed to compile, please check the mkmf.log which can be found here:
23198
23199  C:/Tools/ruby25/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/ruby-xslt-0.9.10/mkmf.log
23200
23201extconf failed, exit code 1
23202
23203Gem files will remain installed in C:/Tools/ruby25/lib/ruby/gems/2.5.0/gems/ruby-xslt-0.9.10 for inspection.
23204Results logged to C:/Tools/ruby25/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/ruby-xslt-0.9.10/gem_make.out
23205

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch from e3b99b3 to f06dca3 Feb 7, 2019

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 7, 2019

The following set of commands worked for me (when run from scratch Windows):

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
cinst ruby --version 2.5.3.101 -y # install ruby
cinst msys2 --params "/NoUpdate" -y # install msys2 without system update
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).path)\..\.." # reload chocolatey env
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" # reload chocolatey env
refreshenv
ridk install 2 3                  # use ruby's ridk to update the system and install development toolchain
cinst metanorma -y
refreshenv

Then the metanorma command works.

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 7, 2019

@ronaldtse 100% agree about your last comment, this exactly what I did in this PR, but for some reason appveyor after install wait 1h and don't proceed with another commands after choco install metanorma -dv -s "'.;https://chocolatey.org/api/v2/'"

I still investigating why this happens

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 7, 2019

@ronaldtse just checked it works on my VM, may I ask you to test it on your machine

  1. Please uninstall metanorma & msys2 before test
  2. git clone https://github.com/riboseinc/chocolatey-metanorma
  3. git checkout add-msys2-dependency
  4. cd chocolatey-metanorma
  5. choco install metanorma -dv -s "'.;https://chocolatey.org/api/v2/'"

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch from f06dca3 to c84795b Feb 7, 2019

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 8, 2019

Looks like issue with ridk install 2 3 it lead to hung on appveyor, looking for solution

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 11, 2019

@CAMOBAP795 will this issue be fixed soon? I think ridk install 2 3 should only be called when it wasn't already installed. This command may have opened a UI window causing the process to hang.

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 11, 2019

@ronaldtse Till yet I didn't found any way to check if RDK is installed already ridk install 2 3 if we simply install msys2 it doesn't work, I didn't spent much time on this task, but to be honest I kind of stucked

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch from c84795b to f4f3085 Feb 11, 2019

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 11, 2019

This link : https://chocolatey.org/packages/msys2 describes :

Ruby integration
This package can be used with ruby package to provide native building environment for gems.

The ruby installer comes with ridk function which offers interactive GUI installation wizard of msys2 and hence can't be used unattended (ridk install 1).
Its system update is the same as initialization done with this package (ridk install 2).
Ruby installer offers unattended setup of MSYS2 and MINGW development toolchain (ridk install 3).
You can also just install the msys2 package without system update and use ridk afterwards:

cinst ruby                        # install ruby
cinst msys2 --params "/NoUpdate"  # install msys2 without system update
Update-SessionEnvironment         # refresh environment vars
ridk install 2 3                  # use ruby's ridk to update the system and install development toolchain

Are you saying that the last step causes AppVeyor to hang?

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 11, 2019

@ronaldtse yes, because when I remove it, hang is gone

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch from f4f3085 to 6289aa0 Feb 11, 2019

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 11, 2019

@CAMOBAP795 I think we should add MSYS2 as a dependency instead of manually calling cinst? Or, potentially, we can split the package into two -- metanorma-dependencies and then metanorma. In between, the user can run ridk install 2 3 manually?

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch from 6289aa0 to f7ec7ca Feb 11, 2019

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 11, 2019

@ronaldtse one of possible ways, but actually we don't need split we can just point them to https://chocolatey.org/packages/msys2#Ruby%20integration as pre-requisites for our package

BTW let me try one more idea to check

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch 9 times, most recently from f6a8171 to cbb95a8 Feb 11, 2019

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch from 8ab118b to 3d05685 Feb 13, 2019

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 13, 2019

@CAMOBAP795 I am currently using the Microsoft provided VM, can you use the VM to test it out?

https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 13, 2019

BTW, "https://chocolatey.org/packages/ruby2.devkit" is an old and deprecated package.

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 13, 2019

@ronaldtse thanks for link, I will check

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch 5 times, most recently from 118ae5e to 635e30a Feb 13, 2019

@CAMOBAP795 CAMOBAP795 force-pushed the add-msys2-dependency branch from 635e30a to 6c7c64b Feb 14, 2019

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 14, 2019

@CAMOBAP795 it passed!

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 14, 2019

@ronaldtse I think I have found workaround, may I ask you to tell which VM from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ you have used?

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 14, 2019

@CAMOBAP795 I'm using "MSEdge on Win 10"

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 14, 2019

@ronaldtse let me double check on this exact VM

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 14, 2019

BTW @ronaldtse do we have chance/possibility to use custom image for appveyor? It will cost something but will increase stability of our package

How do you think?

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 14, 2019

@CAMOBAP795 I'd prefer to keep it simple because of management issues... are we ready to merge this?

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 14, 2019

@ronaldtse I kindly ask you to let me test on "MSEdge on Win 10" first

I think we will be ready to merge tomorrow

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 14, 2019

Thanks!

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 15, 2019

@CAMOBAP795 are we ready to merge?

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 15, 2019

@ronaldtse yes, just finished test on "MSEdge on Win 10" VM

Let me know if we should release it

@CAMOBAP795 CAMOBAP795 merged commit 686f7ca into master Feb 15, 2019

2 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@ronaldtse ronaldtse deleted the add-msys2-dependency branch Feb 15, 2019

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 15, 2019

@CAMOBAP795 thanks! Now we need a new Chocolatey package, right? And we need to update the instructions on Metanorma.com?

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 15, 2019

@ronaldtse installation steps/instructions are the same, we just had issue with appveyor which fixed right now

And to do chocolatey release I just need create tag

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 15, 2019

Thanks!

@CAMOBAP795

This comment has been minimized.

Copy link
Collaborator Author

CAMOBAP795 commented Feb 15, 2019

@ronaldtse so just to make it clear we are ready for release right?

@ronaldtse

This comment has been minimized.

Copy link
Contributor

ronaldtse commented Feb 15, 2019

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.