[ 
https://issues.apache.org/jira/browse/ARROW-9694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17175867#comment-17175867
 ] 

Kouhei Sutou commented on ARROW-9694:
-------------------------------------

{noformat}
> sh: gsl-config: No such file or directory
{noformat}

This is the gsl gem install error not the red-arrow-gsl gem install error.

You need to install "mingw-w64-x86_64-gsl" package before you install the gsl 
gem:

{noformat}
ridk exec pacman --sync --noconfirm mingw-w64-x86_64-gsl
{noformat}

It can be automated by adding {{msys2_mingw_dependencies}} metadata to the gsl 
gem's metadata:

{noformat}
diff --git a/gsl.gemspec b/gsl.gemspec
index c49e08e..3317a63 100644
--- a/gsl.gemspec
+++ b/gsl.gemspec
@@ -33,4 +33,6 @@ Gem::Specification.new do |s|
   s.add_development_dependency 'rake', '>= 0'
   s.add_development_dependency 'test-unit', '>= 0'
   s.add_development_dependency 'bundler', '~> 1.11'
+
+  s.metadata["msys2_mingw_dependencies"] = "gsl"
 end
{noformat}

See also: 
https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#-msys2-library-dependency

Could you send the above patch to https://github.com/SciRuby/rb-gsl ?

> [Ruby] can't install red-arrow-gsl
> ----------------------------------
>
>                 Key: ARROW-9694
>                 URL: https://issues.apache.org/jira/browse/ARROW-9694
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Ruby
>    Affects Versions: 1.0.0
>         Environment: windows, msys2, 
>            Reporter: Dominic Sisneros
>            Priority: Major
>         Attachments: gem_make.out
>
>
> {noformat}
> f:\programming\source\repos\ruby\try_arrow>gem install red-arrow-gsl
> Temporarily enhancing PATH for MSYS/MINGW...
> Building native extensions. This could take a while...
> ERROR:  Error installing red-arrow-gsl:
>         ERROR: Failed to build gem native extension.
>     current directory: 
> F:/windows/scoop/persist/ruby/gems/gems/gsl-2.1.0.3/ext/gsl_native
> F:/windows/scoop/apps/ruby/2.7.1-1/bin/ruby.exe -I 
> F:/windows/scoop/apps/ruby/2.7.1-1/lib/ruby/site_ruby/2.7.0 -r 
> ./siteconf20200811-28480-149f31i.rb extconf.rb
> sh: gsl-config: No such file or directory
> *** ERROR: missing required library to compile this module: undefined method 
> `chomp' for nil:NilClass
> *** 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=F:/windows/scoop/apps/ruby/2.7.1-1/bin/$(RUBY_BASE_NAME)
>         --with-gsl-version
> extconf failed, exit code 1
> Gem files will remain installed in 
> F:/windows/scoop/persist/ruby/gems/gems/gsl-2.1.0.3 for inspection.
> Results logged to 
> F:/windows/scoop/persist/ruby/gems/extensions/x64-mingw32/2.7.0/gsl-2.1.0.3/gem_make.out
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to