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

gcc versions - trouble ahead, trouble behind #281

Closed
ccoupe opened this issue Oct 17, 2016 · 14 comments
Closed

gcc versions - trouble ahead, trouble behind #281

ccoupe opened this issue Oct 17, 2016 · 14 comments
Milestone

Comments

@ccoupe
Copy link

ccoupe commented Oct 17, 2016

I updated my Ubuntu 15.10 VM to 16.10. - Shoes still works (it was just simple testing). But the gcc version is 6.2.0 and the mingw cross compile is also 6.2.0. My system 14.04 and gcc 4.8.4 and it's slight older in the chroots that build the Shoes installers images. RubyInstaller (Windows) uses gcc 4.8.x and they don't seem to be inclined to update that anytime soon. @backorder found a gem he wanted that could be used to replace the ftsearch code (which is fragile or even brittle) but it required gcc 4.9 (c++ thing). My OSX install is also a release old, but it not's that troublesome using old API - just painful.

The problem is RubyInstaller - Shoes has tried to maintain compatibly in gcc versions so that people could download the Shoes source and compile it with RubyInstaller's gcc. A noble goal. Only @backorder and I have has admitted to doing. It's almost as easy to install a Linux VM and cross compile Ruby and it dependencies. Time to ditch RubyInstaller compatibility?

@ccoupe ccoupe added this to the 3.3.3 milestone Oct 17, 2016
@ccoupe ccoupe changed the title gcc versions - troubles ahead, troubles behind gcc versions - trouble ahead, trouble behind Oct 17, 2016
@ccoupe
Copy link
Author

ccoupe commented Nov 21, 2016

Just glancing at https://github.com/oneclick/rubyinstaller/wiki/Development-Kit I can see one circular build problem - you need a RubyInstaller ruby to build a new devkit to install a new Ruby. No big deal if your doing every thing on Windows. They also have pull requests stacked up and the maintainer has acknowledged the need for a newer gcc - 10 months ago. which would fix the concerns of the picky maintainer about supporting Windows

@IanTrudel
Copy link
Collaborator

There is no other way to get Ruby Devkit as far as I know. Also, Windows command line is particularly limited but mingw comes with bash. It is currently relatively easy to set up RubyInstaller and its Devkit to build Shoes.

The alternative solution must be equally easy to set up in order to allow newcomers to contributes, if such thing continue to happen. Do you remember some kind of script written to download, patch and compile Shoes? We may be able to do exactly what you want if we switch to a solution like that.

The title of this issue is rather vague. Hence, my confusion in the other issue while talking about filing a new issue in regard to RubyInstaller.

@ccoupe
Copy link
Author

ccoupe commented Nov 22, 2016

I added a new virtual machine to test what is thee practical impact of building some libraries/gems with different versions of the mingw cross compiler 4.7 vs >5.0 . I choose to load it with Linux Mint 18.0 for an OS. While attempting to build Shoes natively I learned that there is an libgif and it's incompatible image.c as currently written. There are hints we can #ifdef it to be both back and forward compatible.

@IanTrudel
Copy link
Collaborator

We had troubles with libgif on Windows before, isn't it?

@ccoupe
Copy link
Author

ccoupe commented Nov 22, 2016

libgif/libungif has always been a problem everywhere for everyone.

Devkit is convenient. It's non-trivial to fork it and support that as part of the Shoes development ecosystem.

@IanTrudel
Copy link
Collaborator

Devkit is convenient. It's non-trivial to fork it and support that as part of the Shoes development ecosystem.

It seems that the objective and obstacles are unclear to me.

We want to build Ruby with a newer version of GCC?

the maintainer has acknowledged the need for a newer gcc - 10 months ago

Would you be so kind to share a link to this?

@ccoupe
Copy link
Author

ccoupe commented Nov 22, 2016

Would you be so kind to share a link to this?

oneclick/rubyinstaller#232
https://github.com/oneclick/rubyinstaller/pulls - read the last pull request on the screen with all the comments.

@ccoupe
Copy link
Author

ccoupe commented Nov 22, 2016

We want to build Ruby with a newer version of GCC?

Yes and our reason is to build the the picky gem which has a dependent lib that was written in C++ and took advantage of some g++ 4.9 initialization options. If I remember it was google_hash or something like that. I did contact the developer, and know he looked into it and he even ask on the RubyInstaller mail list when the would support a new gcc.

It's a very deep hole.

@IanTrudel
Copy link
Collaborator

The links you provided are very helpful. It is also linked to RubyInstaller issue tracker, which will give them a hint that more people need it than they may think.

I am confused about Picky. Picky was used in #213 without any problem. Can't we just inject in Shoes the binary gem? Some gems on the gem repository are available precompiled.

ccoupe pushed a commit that referenced this issue Nov 22, 2016
* this commit works for current Shoes dependcies and libgif-5.4.1
  but not some others
* affects (barely) #281 and #270
@ccoupe
Copy link
Author

ccoupe commented Nov 22, 2016

I am confused about Picky. Picky was used in #213 without any problem

There was a problem and it was gcc version based problem . That's what I want to explore with the Mint VM. Can I cross compile picky? will it work with older dll's from the devkit and current Shoes. If it can and does, then we we add the binary gem to Shoes.

@ccoupe
Copy link
Author

ccoupe commented Nov 22, 2016

From my notes:

2015-05-12 more work on CopyGem.rb
      Test whether picky in ~/.shoes/.gems works - create a tar in CopyGem.rb
      /untar and copy in Cobbler? or just a script (windows compat)
        installgems.rb hardcoded copy.
done: Do I need to copy the extensions/ in whole for the gem
      in CopyGems.rb
      google_hash installs on windows ruby but picky doesn't like it.
done: Filed issue https://github.com/rdp/google_hash/issues/37

done: Installed Ruby 2.1.6, gem update on win7
done Work around - uninstall picky 4.27.1 and use 4.26.1
      only uses 9 gems (4.27.1 uses 11 gems - google_hash is one of the 2)

@ccoupe
Copy link
Author

ccoupe commented Mar 4, 2017

I did some debugging on why shoes fails to run at all with ruby 2..3 It dies very early in the init process - world.c, ruby_embed() and eventually gets my old nemisis - enable_load_relative. The ruby isn't built that way (I triied and failed) or 2.3.3 has a bug.

You know you're in deep when google offers an old blog of mine in the first page.

@ccoupe
Copy link
Author

ccoupe commented Mar 4, 2017

Definitively, a change in Ruby 2.3.3 source and from Shoes perspective, it's a Ruby bug. No known workaround yet.

@ccoupe ccoupe modified the milestones: 3.3.4, 3.3.3 May 14, 2017
@ccoupe
Copy link
Author

ccoupe commented Jul 17, 2017

This is fixed on branch rb23 for linux (three of them) and win7. Should work on osx and xwin7 so I'm going to close the issue and open a new one.

@ccoupe ccoupe closed this as completed Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants