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

specifying Ruby configure options #1

Open
otariidae opened this issue May 19, 2024 · 1 comment
Open

specifying Ruby configure options #1

otariidae opened this issue May 19, 2024 · 1 comment

Comments

@otariidae
Copy link

Thank you for the great talk at RubyKaigi 2024. Inspired by it, I tried Kompo but faced a problem.

Kompo fails with the following error message while executing build ruby target version.

(*snip*)
ld: library 'ssl' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [exe/ruby] Error 1
make[1]: *** [ruby] Error 2
make: *** [build-ext] Error 2
/Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/lib/kompo.rb:292:in `system': Command failed with exit 2: make (RuntimeError)
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/lib/kompo.rb:292:in `exec_command'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/lib/kompo.rb:147:in `block in clone_ruby_src'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/lib/kompo.rb:132:in `chdir'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/lib/kompo.rb:132:in `clone_ruby_src'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/exe/kompo:9:in `block in <top (required)>'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/lib/kompo.rb:123:in `block in cd_work_dir'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/3.3.0/tmpdir.rb:99:in `mktmpdir'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/lib/kompo.rb:118:in `cd_work_dir'
	from /Users/otariidae/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kompo-0.2.0/exe/kompo:8:in `<top (required)>'
	from /Users/otariidae/.rbenv/versions/3.3.0/bin/kompo:25:in `load'
	from /Users/otariidae/.rbenv/versions/3.3.0/bin/kompo:25:in `<main>'
  • OS: macOS 14.5
  • Kompo: 0.2.0
  • Ruby: 3.3.0 via rbenv
  • OpenSSL 3.3.0 installed via Homebrew

I tried to build Ruby from source with the same configure options as Kompo and it failed with the same message.

./configure --prefix=$PWD/../install --disable-install-doc --disable-install-rdoc --disable-install-capi --with-static-linked-ext --with-ruby-pc=ruby.pc --with-ext=bigdecimal,cgi/escape,continuation,coverage,date,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,erb/escape,etc,fcntl,fiddle,io/console,io/nonblock,io/wait,json,json/generator,json/parser,monitor,nkf,objspace,openssl,pathname,psych,pty,rbconfig/sizeof,ripper,rubyvm,socket,stringio,strscan,syslog,zlib
make install
# ^ the same options as kompo and it fails

Next I tried to do that with some additional options and it finished without errors.

./configure --prefix=$PWD/../install --disable-install-doc --disable-install-rdoc --disable-install-capi --with-static-linked-ext --with-ruby-pc=ruby.pc --with-ext=bigdecimal,cgi/escape,continuation,coverage,date,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,erb/escape,etc,fcntl,fiddle,io/console,io/nonblock,io/wait,json,json/generator,json/parser,monitor,nkf,objspace,openssl,pathname,psych,pty,rbconfig/sizeof,ripper,rubyvm,socket,stringio,strscan,syslog,zlib --with-openssl-dir=$(brew --prefix openssl) --enable-shared
make install
# ^ add --with-openssl-dir and --enable-shared and it doesn't fail

So I guess I need to customize configure options to get Kompo to work on my computer, but Kompo doesn't seems to support that currently.
Or is there any other way to solve my problem?

@ahogappa0613
Copy link
Owner

Thank you for the great talk at RubyKaigi 2024.

Thank you for listening!

For this problem, it would be better to accept arguments like ruby-build or replace the process with ruby-build

Either way, it won't work as it is now. Thanks for the report!

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

2 participants