Open IanTrudel opened 7 years ago
It would be possible to download and install MSYS2 from Cobbler. I wrote a JavaScript script for unattended installation. Cobbler would only need to tell the script an installation path. Then Cobbler would download Ruby source code tarball, copy it to the installation path home directory, send command to bash to extract and compile Ruby. A good preamble for Shoes DevKit in any case.
I'm not sure why rubyinline is needed to install msys2?
Why not install msys2, pacman -S wget, download msys-deps-mingw and msys2-ruby-2.2.7 and expand them in the user location. Also need to download msys2-gems. Then generate the msys2-custom-yaml. that points to all of the above locations.
It's the other way around! RubyInline allows C optimization through inline instead of writing a C extension but it still needs dev tools such as gcc. Just thought I would share.
It would be possible to download and install MSYS2 from Cobbler. I wrote a JavaScript script for ...
Was that comment meant for a different issue? Ruby-inline is interesting (and old). It is missing floats/double where speed really matters
No, it is meant for this issue. The idea is either to write a wiki article or manual entry (advanced) how to setup everything to use RubyInline or to have cobbler do it.
Not sure it worths the troubles to have cobbler do it for now but it doesn't hurt to talk about it and get your feedback.
RubyInline supports floats and double. Simply needs conversions such as NUM2DBL
when Ruby sends to C and return DBL2NUM
for Ruby to understand.
Your browser must be showing different content for #346 comments than my browser. Comment #2 is
It would be possible to download and install MSYS2 from Cobbler. I wrote a JavaScript script for unattended installation. Cobbler would only need to tell the script an installation path. Then Cobbler would download Ruby source code tarball, copy it to the installation path home directory, send command to bash to extract and compile Ruby. A good preamble for Shoes DevKit in any case.
My concern is how do we get someone who knows C and Ruby to use RubyInline on Windows?
This is where Cobbler came into the conversation. I'm thinking a simple way to make this work for other Shoes users.
But you are confused... maybe it means this is not a good way.
Shoes once deployed is changing RbConfig in such way that results into RubyInline not working, even on my own build and started in MSYS2 bash. It cannot find Ruby headers. So I changed the values related to those headers for the Ruby I built on MSYS2 for Shoes and it worked!
The point here is to find a way to make it easy to use RubyInline. Maybe allow setting the path in Cobbler? Like VLC does...
If you change rbconfig, make sure you can build native gems.
If you change rbconfig, make sure you can build native gems.
This is a good idea. Do you have a suggestion of a small native gem that I could do tests with?
Last I looked, serialport didn't have a prebuilt component. It might be in your Shoes already, if so leave it out of your custom.yaml and rebuild Shoes.
The problem is twofold to build native gems on Windows:
DESTDIR
environment variable. Let's say Shoes is on C drive, you would do export DESTDIR=/c/
before running Shoes from MSYS2.make DESTDIR=
is always empty in Shoes. There may be other ways but patching Shoes' Ruby lib\ruby\site_ruby\2.2.0\rubygems\ext
by removing ENV["DESTDIR"] = nil
on line 62 does work.It does work when Shoes is ran from MSYS2. Running directly from Windows doesn't work because Shoes doesn't know anything about MSYS2 on its own. RubyInstaller would work... so there must be some way to do it.
It does work when Shoes is ran from MSYS2. Running directly from Windows doesn't work.
FWIW. It's exactly opposite for command line args. $ cshoes.exe -g list -l works on dos terminal and fails on msys2 bash. Did that gdb fix work for you?
FWIW. It's exactly opposite for command line args. $ cshoes.exe -g list -l works on dos terminal and fails on msys2 bash.
MSYS2 seems to swallow everything. I used to output debug info on console using puts
when using cshoes.exe
but ain't working anymore. Also, did you notice the output of building Shoes is slightly out of order?
Did that gdb fix work for you?
Yes, downgrading is the way to go. Setting breakpoints is not working so well though because gdb cannot find the source files for some obscure reason. Manually setting source files won't help either. It seems more a MSYS2 problem than gdb...
We might want to look at how lib/shoes/cache.rb sets the rbconfig to the includes + tasks.rb pre_build(). One of slowdowns to compiling, btw.
Out of order
wildcard '*' order is undefined on file systems.
From msys2 bash
Cecil@bronco7 MINGW32 /e/shoes3
$ msys2/cshoes.exe --ruby -e "puts RUBY_VERSION"
2.2.7
Aha - it's not swallowing args, it's not printing some things. OSX like. Perhaps the link flags to cshoes need changing for msys2
The output is out of order, not file related. For example, generating types/types.h
proceed with rm
the file before building Shoes but the actual puts
in the Rakefile is printed after building Shoes and before stripping files. They should in fact be together (before building).
Yes, rakefile output is odd (true for other platforms but not as noticable). $stderr.puts is the easy way to instruments rake files in msys2. The old Shoes 3.0 had some sort of hook or monkey patch to Rake for output that I deleted long ago.
Is MSYS2 target really a good move? We continuously hit roadblocks. The advantages versus challenges are growing thin.
Is MSYS2 target really a good move? We continuously hit roadblocks. The advantages versus challenges are growing thin.
We agree on that. I hate to give up a couple after man months of effort between us but being stubborn or idealist is usually the wrong path forward. Don't let perfection replace good enough. as a goal. Lot's of open source projects seem to seek perfection and they give up when it doesn't happen.
Indeed. There are several tasks with higher priority that would use our tiny team.
No need to waste MSYS2 efforts, let's just postpone it for some time.
RubyInstaller DevKit will not install on Shoes. The problem is that Ruby's directory structure has been altered for Shoes and thus DevKit cannot find and patch RubyGems. Take note that cshoes --ruby dk.rb init
may or may not work — if it doesn't, manually edit DevKit's config.yml
and add - driveletter:/path/to/shoes/ruby/whatever
. Then proceed with DevKit install.
How did you launch the Shoes install? It should not care if devkit or msys2 is installed. It's it own creature.
no need to waste MSYS2 efforts, let's just postpone it for some time.
This issue is not completed yet but postponed. Removed 3.3.4 tag for good measure.
RUBY_PREFIX_PATH
below for your MSYS2/Ruby (compiled from instructions in Msys2 and Shoes for Windows).ruby-inline/ruby-2.0.0/*.c
) resulting in a stripped.so
file.