Giter Club home page Giter Club logo

Comments (11)

fallwith avatar fallwith commented on August 25, 2024 2

I created Bug #20495 against Ruby.

from ruby-install.

fallwith avatar fallwith commented on August 25, 2024 1

@postmodern the underlying issue has been fixed with ruby/ruby#10699. Thanks for the fix and for chiming in on the Ruby bug report, @eileencodes! So hopefully things will work fine with 3.4.0-preview2 once it is released.

from ruby-install.

postmodern avatar postmodern commented on August 25, 2024

ruby-install does not use RUBY_CONFIGURE_OPTS, that is an environment variable from ruby-build. Instead try running ruby-install ... -- --enable-yjit. Also explicitly passing --with-opt-dir has not been necessary for a while; ruby-install-0.9.3 even added support for automatically passing in --with-openssl-dir in addition to --with-opt-dir.

Did manual building succeed or fail? If manual building failed, then this is an upstream issue that should be reported to bugs.ruby-lang.org.

from ruby-install.

havenwood avatar havenwood commented on August 25, 2024

Just a side note, but YJIT will be installed with modern Rubies even without an explicit --enable-yjit flag as long as Rust is available.

from ruby-install.

fallwith avatar fallwith commented on August 25, 2024

Thanks @postmodern and @havenwood.

Manually building from source works with the commands listed above in the "Steps To Reproduce" section. The make and make install commands both succeed and leave me with a usable copy of v3.4.0-preview1:

$ ~/.rubies/ruby-3.4.0-preview1/bin/ruby -v
ruby 3.4.0preview1 (2024-05-16 master 9d69619623) +YJIT [x86_64-darwin23]

For the ruby-install approach, I tried removing all of the options entirely and still encounter the same error:

$ ruby-install 3.4.0-preview1

(additional output was here)

compiling prism/util/pm_strncasecmp.c
compiling prism/util/pm_strpbrk.c
compiling prism/prism.c
compiling prism_init.c
compiling yjit.c
building Rust YJIT (release mode)
touch yjit/target/release/libyjit.a
partial linking yjit/target/release/libyjit.a into yjit/target/release/libyjit.o
make: *** No rule to make target `coroutine/amd64/Context.S', needed by `coroutine/amd64/Context.o'.  Stop.
!!! Compiling ruby 3.4.0-preview1 failed!

from ruby-install.

postmodern avatar postmodern commented on August 25, 2024

@fallwith I'm curious what happens if you try doing make clean or deleting and re-extracting the source, then running the manual Steps To Reproduce. I suspect by manually going into the source code and running ./configure, make, make install, a second time, it's somehow creating the needed file?

from ruby-install.

fallwith avatar fallwith commented on August 25, 2024

@postmodern, it looks like you're onto something with make clean. It removes the file in question and once it's missing I can reproduce the error while manually working with the Ruby source. I discovered the following:

  • The coroutine/amd64/Context.S file exists in the ruby-3.4.0-preview1.tar.gz source file to begin with
  • make clean cannot be ran until ./configure has been ran
  • Running make clean removes the coroutine/amd64/Context.S file
  • Running ./configure again will not recreate the coroutine/amd64/Context.S file
  • Running make with the coroutine/amd64/Context.S file missing recreates the same error I'm encountering with ruby-install

Using the Ruby 3.4.0-preview1 source (without any ruby-install involvement):

$ tar xzf ruby-3.4.0-preview1.tar.gz 

$ cd ruby-3.4.0-preview1 

$ ll coroutine/amd64 
.rw-r--r--@ 2.2k 501 20 2024-05-15 21:54 Context.h
.rw-r--r--@ 1.1k 501 20 2024-05-15 21:54 Context.S

$ ./configure

$ ll coroutine/amd64 
.rw-r--r--@ 2.2k 501 20 2024-05-15 21:54 Context.h
.rw-r--r--@ 1.1k 501 20 2024-05-15 21:54 Context.S

$ make clean

$ ll coroutine/amd64
.rw-r--r--@ 2.2k 501 20 2024-05-15 21:54 Context.h

$ ./configure

$ ll coroutine/amd64
.rw-r--r--@ 2.2k 501 20 2024-05-15 21:54 Context.h

$ make

(lots of healthy output here)

compiling yjit.c
building Rust YJIT (release mode)
touch yjit/target/release/libyjit.a
partial linking yjit/target/release/libyjit.a into yjit/target/release/libyjit.o
make: *** No rule to make target `coroutine/amd64/Context.S', needed by `coroutine/amd64/Context.o'.  Stop.

from ruby-install.

postmodern avatar postmodern commented on August 25, 2024

@fallwith This sounds like a flaw in CRuby's Makefile or configure script logic. If make clean is going to remove the file, then either the Makefile should have a task to generate it, or configure should handle creating it. If there's no code which can re-generate the file, then make clean should probably not delete it.

from ruby-install.

fallwith avatar fallwith commented on August 25, 2024

@postmodern I agree completely. ruby-install's performing of make clean is revealing a flaw in Ruby v3.4.0-preview1 itself and no changes should be made in the ruby-install repo. I'll close this issue and start a new one with ruby/ruby.

from ruby-install.

fallwith avatar fallwith commented on August 25, 2024

@postmodern here is the response I received:

For now, make clean is for those who "git clone" the repository. Don't use it for tarball package.

Thoughts?

from ruby-install.

postmodern avatar postmodern commented on August 25, 2024

@postmodern here is the response I received:

For now, make clean is for those who "git clone" the repository. Don't use it for tarball package.

Thoughts?

That seems odd. make clean should always delete any built artifacts; with the caveat that make can rebuild them. They should probably add another make distclean or make gitclean task.

The reason why we added make clean before calling ./configure was to deal with re-compiling a previously installed ruby, but with different options. We also keep the source code directory in case you want to run ruby under gdb, in which case gdb will display the actual source code lines for functions.

We could add some kind of check whether bin/ruby exists and then run make clean, but that seems like we're working around an upstream flaw; and it wouldn't catch when a ruby source directory was half-compiled.

from ruby-install.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.