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

Bugfix ticket #411 (compilation with ruby 2 on windows) #450

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
9 participants
@ccoenen
Contributor

ccoenen commented Jul 15, 2013

Discussion, see #411. This patch is good on my system. (Windows 7 64bit, Ruby 2.0.0 p247 64, DevKit)

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jul 15, 2013

Contributor

(i rebased the patch on top of 1.0.3, just to make sure it's originating from a stable version)

Contributor

ccoenen commented Jul 15, 2013

(i rebased the patch on top of 1.0.3, just to make sure it's originating from a stable version)

@funk78

This comment has been minimized.

Show comment
Hide comment
@funk78

funk78 Jul 22, 2013

Hi ccoenen, to me the types.h file in the sys directory of mingw64 looks different than the one you refer to:

#ifndef _PID_T_
#define _PID_T_
#ifndef _WIN64
typedef int _pid_t;
#else
__MINGW_EXTENSION
typedef __int64 _pid_t;
#endif

Since you are referring to a win64 system, i am wondering why your types.h does not mention the int64

funk78 commented Jul 22, 2013

Hi ccoenen, to me the types.h file in the sys directory of mingw64 looks different than the one you refer to:

#ifndef _PID_T_
#define _PID_T_
#ifndef _WIN64
typedef int _pid_t;
#else
__MINGW_EXTENSION
typedef __int64 _pid_t;
#endif

Since you are referring to a win64 system, i am wondering why your types.h does not mention the int64

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jul 25, 2013

Contributor

Yes, in my case (refering to the file on my disk in <somewhere>\RubyDevKit-4.7.2-64\mingw\x86_64-w64-mingw32\include\sys\types.h) I have the very same code you quoted above.

In the other ticket i was just quoting the file from mingw master on GitHub so i could link to something. Apparently it's not identical.

The point is: This patch should compile on your machine without error. Right now, pid_t will always be defined in eventmachine, which breaks with RubyDevKit 4.7.2. So i'm putting an extra check in there to not _re_define it. Usually, 64bit / Ruby 2 / DevKit 4.7.2. should just skip this. Older versions will define the type as they did before.

Contributor

ccoenen commented Jul 25, 2013

Yes, in my case (refering to the file on my disk in <somewhere>\RubyDevKit-4.7.2-64\mingw\x86_64-w64-mingw32\include\sys\types.h) I have the very same code you quoted above.

In the other ticket i was just quoting the file from mingw master on GitHub so i could link to something. Apparently it's not identical.

The point is: This patch should compile on your machine without error. Right now, pid_t will always be defined in eventmachine, which breaks with RubyDevKit 4.7.2. So i'm putting an extra check in there to not _re_define it. Usually, 64bit / Ruby 2 / DevKit 4.7.2. should just skip this. Older versions will define the type as they did before.

@schneider-th

This comment has been minimized.

Show comment
Hide comment
@schneider-th

schneider-th Aug 27, 2013

I tried the bugfix from @ccoenen branch and it worked for me. The bundle was successful. But when I try to start Thin it says, that eventmachine was not found in the Gemfile. So, it seems to fix the discusses problem, but it may lead to another. But maybe it's just because it's from his branch and not from the original branch...

schneider-th commented Aug 27, 2013

I tried the bugfix from @ccoenen branch and it worked for me. The bundle was successful. But when I try to start Thin it says, that eventmachine was not found in the Gemfile. So, it seems to fix the discusses problem, but it may lead to another. But maybe it's just because it's from his branch and not from the original branch...

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Oct 11, 2013

Contributor

I don't mean to be rude, but this problem and fix have been around for a while. Is there any possibility to get this merged? If there's open questions or subsequent problems, please let me know.

Contributor

ccoenen commented Oct 11, 2013

I don't mean to be rude, but this problem and fix have been around for a while. Is there any possibility to get this merged? If there's open questions or subsequent problems, please let me know.

@funk78

This comment has been minimized.

Show comment
Hide comment
@funk78

funk78 Oct 11, 2013

to me your fix worked aswell and i finally got ruby working on windows, it would be very nice if it would be merged so that windows users are not discriminated for beeing windows users ;) i even tried to install different linux distributions to get this running, as it sucked so much, but getting linux to run sucks even more, i tried it about 10 times in my whole life and it always failed because of driver issues... and mac is the same proprietary shit as windows :D, so please give windows users a chance to use ruby aswell

funk78 commented Oct 11, 2013

to me your fix worked aswell and i finally got ruby working on windows, it would be very nice if it would be merged so that windows users are not discriminated for beeing windows users ;) i even tried to install different linux distributions to get this running, as it sucked so much, but getting linux to run sucks even more, i tried it about 10 times in my whole life and it always failed because of driver issues... and mac is the same proprietary shit as windows :D, so please give windows users a chance to use ruby aswell

@ThomasHoadley

This comment has been minimized.

Show comment
Hide comment
@ThomasHoadley

ThomasHoadley Feb 5, 2014

Hi there, so I have downloaded the branch with with bugfix, but I don't know how to implement it... could you please explain?

ThomasHoadley commented Feb 5, 2014

Hi there, so I have downloaded the branch with with bugfix, but I don't know how to implement it... could you please explain?

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen
Contributor

ccoenen commented Feb 7, 2014

@ThomasHoadley

This comment has been minimized.

Show comment
Hide comment
@ThomasHoadley

ThomasHoadley Feb 7, 2014

Thanks for your help :)

ThomasHoadley commented Feb 7, 2014

Thanks for your help :)

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Feb 7, 2014

Contributor

I wonder how i could persuade @tmm1 to merge this in.

Contributor

ccoenen commented Feb 7, 2014

I wonder how i could persuade @tmm1 to merge this in.

@Signus

This comment has been minimized.

Show comment
Hide comment
@Signus

Signus Feb 14, 2014

Confirmed solution for Ruby 2.0.0 p353 with eventmachine-1.0.3.

Signus commented Feb 14, 2014

Confirmed solution for Ruby 2.0.0 p353 with eventmachine-1.0.3.

@steelywing

This comment has been minimized.

Show comment
Hide comment
@steelywing

steelywing commented Mar 11, 2014

👍

@sodabrew

This comment has been minimized.

Show comment
Hide comment
@sodabrew

sodabrew May 1, 2014

Contributor

Ping for this to merge. I'm trying to test the mysql2 gem on Windows with Ruby 2.0. Merging this would be great so that we can run out-of-the-box on Windows.

Contributor

sodabrew commented May 1, 2014

Ping for this to merge. I'm trying to test the mysql2 gem on Windows with Ruby 2.0. Merging this would be great so that we can run out-of-the-box on Windows.

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen May 11, 2014

Contributor

I'll close this pull-request in favor of #497 - which includes the patch anyway. PLEASE, could someone merge that one in?

Contributor

ccoenen commented May 11, 2014

I'll close this pull-request in favor of #497 - which includes the patch anyway. PLEASE, could someone merge that one in?

@sodabrew

This comment has been minimized.

Show comment
Hide comment
@sodabrew

sodabrew Sep 24, 2014

Contributor

Ping for the next release please?

Contributor

sodabrew commented Sep 24, 2014

Ping for the next release please?

@rmouser

This comment has been minimized.

Show comment
Hide comment
@rmouser

rmouser Oct 7, 2014

Ditto on next release

rmouser commented Oct 7, 2014

Ditto on next release

@ryanwmarsh

This comment has been minimized.

Show comment
Hide comment
@ryanwmarsh

ryanwmarsh Oct 7, 2014

+1 next release

ryanwmarsh commented Oct 7, 2014

+1 next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment