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

Refactor cross rubies (Act 2) #1072

Merged
merged 13 commits into from
Apr 3, 2014
Merged

Refactor cross rubies (Act 2) #1072

merged 13 commits into from
Apr 3, 2014

Conversation

knu
Copy link
Member

@knu knu commented Apr 3, 2014

[This is a redone version of #1071 which was accidentally closed by mistake.]

This fixes the following problems with the current cross-build scripts, Rakefile and build_all.

  • Invocations of rake-compiler cross-ruby will fail due to version mismatch
  • Ruby 1.9.3 cannot be cross-built with make -j2, which is the default MAKE command of rake-compiler-dev-box.
  • Duplicates and hardcoded ruby versions and arch/platform names should really be reduced.
  • Maintaining the list of cross-rubies should be made easier.
  • Properly escape strings using Regexp.quote and Array#shelljoin.

With this PR merged, ./build_all should pass without a problem on a rake-compiler-dev-box environment except one problem which should be addressed in flavorjones/mini_portile#30.

This branch is (re)based on #1062.

/cc @larskanis, @flavorjones

larskanis and others added 13 commits March 5, 2014 17:36
IN_LIBXML is not necessary when configured with --enable-static, at least for libxml-2.8.

Hardcoded libraries to link to are obsolete since knu switched to xml2-config.
Remove cross ruby version checks, since they are obsoleted with the
verify_dll method.

Add verify_dll to the standard rake-compiler 'cross native gem' tasks,
so that it's more compatible with the package_win32_fat_binary command of
the rake-compiler-dev-box.

Suggest using the rake-compiler-dev-box if no cross rubies are installed,
because this is probably the most easiest way to build a proper cross
compilation environment.
- CrossRuby#tool returns the name of a binutils command.
- RUBY_CC_VERSION is built from .cross_ruby.
- Properly escape strings using Regexp.quote and String#shelljoin.
@knu knu mentioned this pull request Apr 3, 2014
@knu
Copy link
Member Author

knu commented Apr 3, 2014

I confirmed that build_all succeeded without a problem and put the built gems on my personal and experimental gem source site, https://gems.idaemons.org/.

@flavorjones
Copy link
Member

These changes look sensible to me. Ship it!

@knu
Copy link
Member Author

knu commented Apr 3, 2014

Thanks, I'm merging this.

knu added a commit that referenced this pull request Apr 3, 2014
@knu knu merged commit d49c301 into sparklemotion:master Apr 3, 2014
@jvshahid
Copy link
Member

jvshahid commented Apr 3, 2014

@knu are we dropping support for mswin32 ? All versions in the .cross_rubies file are mingw32, I don't see mswin32-60 in there anymore.

@larskanis
Copy link
Member

@jvshahid Yes, support for mswin32-60 is removed. It was the platform of the old One Click Installer with Ruby versions up to 1.8.6, compiled with MSVC++ V6.0. Cross built versions of x86-mingw32 and mswin32-60 always differed only by the gemspec.

Here is what Luis Lavena as the maintainer of RubyInstaller think about it: tjschuck/rake-compiler-dev-box@ebec11e25

@luislavena
Copy link
Member

@jvshahid @larskanis is correct, I believe is time to drop the backward compatible x86-mswin32-60 gem.

If you had a built of Ruby with newer Visual Studio, it will be something greater than -60, like -100 or similar.

Compatibility with MSVCRT other than 6.0 (msvcrt.dll) will be almost impossible on cross-compilation (unless msvcr90 or similar linking libraries are used).

@flavorjones
Copy link
Member

@luislavena @knu -- got it! Makes sense. It was only put in there originally at @luislavena's request, anyway. :-P

@luislavena
Copy link
Member

@flavorjones I know 😁, good thing we can change stuff over time 😉

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

Successfully merging this pull request may close these issues.

5 participants