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

Binary version of gem for Windows with cross compilation #84

Closed
stereobooster opened this Issue Jun 26, 2012 · 24 comments

Comments

Projects
None yet
9 participants
@stereobooster
Contributor

stereobooster commented Jun 26, 2012

rake-compile supports cross compilation

@scottjg

This comment has been minimized.

Show comment
Hide comment
@scottjg

scottjg Jun 26, 2012

what's nice is that we're already cross-compiling libgit2 with linux mingw32 on travis-ci, so it's probably not a ton of dev work to get this going.

scottjg commented Jun 26, 2012

what's nice is that we're already cross-compiling libgit2 with linux mingw32 on travis-ci, so it's probably not a ton of dev work to get this going.

@zh99998

This comment has been minimized.

Show comment
Hide comment
@zh99998

zh99998 Oct 10, 2012

how to install under windows now?

zh99998 commented Oct 10, 2012

how to install under windows now?

@arthurschreiber

This comment has been minimized.

Show comment
Hide comment
@arthurschreiber

arthurschreiber Jul 26, 2013

Member

Can you check #241? I'd be very happy to get some feedback!

Member

arthurschreiber commented Jul 26, 2013

Can you check #241? I'd be very happy to get some feedback!

@matthieu-foucault

This comment has been minimized.

Show comment
Hide comment
@matthieu-foucault

matthieu-foucault Jan 26, 2015

I don't know if it is the proper way to do it, but I found out how to install rugged on windows (7 x64).

By default cmake tries to compile libgit2 to C:\Program Files (x86)\libgit2\ , which, thanks to these fine spaces in the path, does not work :)

So, to fix this, I removed CMake from my path (not sure if necessary), and added a cmake.bat file in DevKit\bin with the following content:

@C:\CMake\bin\cmake.exe -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ %*

And voilà, a good old gem install rugged, and it works like a charm :)

matthieu-foucault commented Jan 26, 2015

I don't know if it is the proper way to do it, but I found out how to install rugged on windows (7 x64).

By default cmake tries to compile libgit2 to C:\Program Files (x86)\libgit2\ , which, thanks to these fine spaces in the path, does not work :)

So, to fix this, I removed CMake from my path (not sure if necessary), and added a cmake.bat file in DevKit\bin with the following content:

@C:\CMake\bin\cmake.exe -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ %*

And voilà, a good old gem install rugged, and it works like a charm :)

@michaelchadwick

This comment has been minimized.

Show comment
Hide comment
@michaelchadwick

michaelchadwick Feb 6, 2015

@matthieu-foucault that totally worked for me. Thanks! Btw, I didn't need to remove CMake from my path.

michaelchadwick commented Feb 6, 2015

@matthieu-foucault that totally worked for me. Thanks! Btw, I didn't need to remove CMake from my path.

@arthurschreiber

This comment has been minimized.

Show comment
Hide comment
@arthurschreiber

arthurschreiber Feb 6, 2015

Member

Hey all,

I'm currently in the process of setting up Appveyor builds for rugged. That'll help us in releasing windows binaries for rugged consistently in the future. 😄

Member

arthurschreiber commented Feb 6, 2015

Hey all,

I'm currently in the process of setting up Appveyor builds for rugged. That'll help us in releasing windows binaries for rugged consistently in the future. 😄

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jun 18, 2015

in my case, (Windows 64bit, Ruby 2.1.6 32bit, ruby-devkit loaded) i had to slightly modify @matthieu-foucault's way, i'm also including more instructions in case someone else does not have a working pkg-config on their system:

These commands should yield useful output:

cmake --help
pkg-config --help

then I added the cmake.bat somewhere else (earlier) on my path, with this content:

@"C:\Program Files (x86)\CMake\bin\cmake.exe" -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ %*

you may need to change your location, but i believe Program Fils (x86) is the default.

gem install rugged now ran fine! :)

Thanks, @matthieu-foucault!

ccoenen commented Jun 18, 2015

in my case, (Windows 64bit, Ruby 2.1.6 32bit, ruby-devkit loaded) i had to slightly modify @matthieu-foucault's way, i'm also including more instructions in case someone else does not have a working pkg-config on their system:

These commands should yield useful output:

cmake --help
pkg-config --help

then I added the cmake.bat somewhere else (earlier) on my path, with this content:

@"C:\Program Files (x86)\CMake\bin\cmake.exe" -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ %*

you may need to change your location, but i believe Program Fils (x86) is the default.

gem install rugged now ran fine! :)

Thanks, @matthieu-foucault!

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jun 18, 2015

also, this error probably means that somewhere within this build process, paths are not handled cleanly. spaces should not be a problem.

ccoenen commented Jun 18, 2015

also, this error probably means that somewhere within this build process, paths are not handled cleanly. spaces should not be a problem.

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jun 20, 2015

It should also be noted that this workaround stops working on the 0.23.-beta branches. Specifically, it falls apart with commit a8a8b46. It will no longer compile with undefined reference to WinHttpWriteData@... I will take this over to libgit itself, because it seems to be an upstream problem.

update: i can compile the new referenced commit (libgit2/libgit2@b162d97) just fine, so that's not the issue. I'm not sure what to problem is, though.

ccoenen commented Jun 20, 2015

It should also be noted that this workaround stops working on the 0.23.-beta branches. Specifically, it falls apart with commit a8a8b46. It will no longer compile with undefined reference to WinHttpWriteData@... I will take this over to libgit itself, because it seems to be an upstream problem.

update: i can compile the new referenced commit (libgit2/libgit2@b162d97) just fine, so that's not the issue. I'm not sure what to problem is, though.

@arthurschreiber

This comment has been minimized.

Show comment
Hide comment
@arthurschreiber

arthurschreiber Jun 20, 2015

Member

@ccoenen I can update rugged to the latest libgit2 version, if you want.

Just a note for everyone else: Rugged works on win32 just fine. The main problems I faced when I tried to build and release official builds for windows was that I could not get the test suite to run cleanly without a major overhaul. When opening a repo, many repository files on windows get locked and can't be easily cleaned up after a test run because they will stay locked until the Ruby GC decides to clean up objects created by Rugged.

Other than that, I had everything set up for appveyor to build rugged. I'll see if I can somehow work around this issue and have official windows support, but no promises.

Member

arthurschreiber commented Jun 20, 2015

@ccoenen I can update rugged to the latest libgit2 version, if you want.

Just a note for everyone else: Rugged works on win32 just fine. The main problems I faced when I tried to build and release official builds for windows was that I could not get the test suite to run cleanly without a major overhaul. When opening a repo, many repository files on windows get locked and can't be easily cleaned up after a test run because they will stay locked until the Ruby GC decides to clean up objects created by Rugged.

Other than that, I had everything set up for appveyor to build rugged. I'll see if I can somehow work around this issue and have official windows support, but no promises.

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jun 21, 2015

@arthurschreiber i was able to build 0.22.2 just fine with the workaround described. I think it would be great if it could be built without further workarounds. The only change i made on top of the v0.22.2 branch is the two things introduced by the bat-file: makefile-type -> MSYS and INSTALL_PREFIX. I put them up on a branch, but i did not yet bother to make a switch between regular platforms and windows.

Regarding the test run: starting with Ruby 2.0 or 2.1 you get a greater degree of control over how garbage-collection works. Did you try GC.start?

ccoenen commented Jun 21, 2015

@arthurschreiber i was able to build 0.22.2 just fine with the workaround described. I think it would be great if it could be built without further workarounds. The only change i made on top of the v0.22.2 branch is the two things introduced by the bat-file: makefile-type -> MSYS and INSTALL_PREFIX. I put them up on a branch, but i did not yet bother to make a switch between regular platforms and windows.

Regarding the test run: starting with Ruby 2.0 or 2.1 you get a greater degree of control over how garbage-collection works. Did you try GC.start?

@arthurschreiber

This comment has been minimized.

Show comment
Hide comment
@arthurschreiber

arthurschreiber Jun 21, 2015

Member

@ccoenen #462 added builds on AppVeyor, and I don't remember that the makefile type needed any changes.

Running GC.start between test runs is quite a hack. But I'll see if we can use that to make the tests run successfully.

Member

arthurschreiber commented Jun 21, 2015

@ccoenen #462 added builds on AppVeyor, and I don't remember that the makefile type needed any changes.

Running GC.start between test runs is quite a hack. But I'll see if we can use that to make the tests run successfully.

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jun 21, 2015

You're right, my change is not actually needed on your AppVeyor work... I was able to use this in my Gemfile without a problem:

gem "rugged", git: "https://github.com/libgit2/rugged.git", ref: "8953482", submodules: true
# 8953482 is the last commit mentioned in issue #462.

But the following did not work without my modifications (which was why i started that experiment in the first place):

gem "rugged", git: "https://github.com/libgit2/rugged.git", tag: "v0.22.2", submodules: true

ccoenen commented Jun 21, 2015

You're right, my change is not actually needed on your AppVeyor work... I was able to use this in my Gemfile without a problem:

gem "rugged", git: "https://github.com/libgit2/rugged.git", ref: "8953482", submodules: true
# 8953482 is the last commit mentioned in issue #462.

But the following did not work without my modifications (which was why i started that experiment in the first place):

gem "rugged", git: "https://github.com/libgit2/rugged.git", tag: "v0.22.2", submodules: true
@arthurschreiber

This comment has been minimized.

Show comment
Hide comment
@arthurschreiber

arthurschreiber Jun 21, 2015

Member

@ccoenen So, I looked into making the test suite run more robustly on windows.

What I came up is to simply use a finalizer to clean up fixture data automatically once a Rugged::Repository object gets claimed by the GC. This not only makes the tests run on windows, but actually cleans up the setup and teardown code for the tests.

I'll prepare the PR, and then I'll look into getting AppVeyor builds back.

Member

arthurschreiber commented Jun 21, 2015

@ccoenen So, I looked into making the test suite run more robustly on windows.

What I came up is to simply use a finalizer to clean up fixture data automatically once a Rugged::Repository object gets claimed by the GC. This not only makes the tests run on windows, but actually cleans up the setup and teardown code for the tests.

I'll prepare the PR, and then I'll look into getting AppVeyor builds back.

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jun 21, 2015

Sounds great!

ccoenen commented Jun 21, 2015

Sounds great!

@sooraj20890

This comment has been minimized.

Show comment
Hide comment
@sooraj20890

sooraj20890 Jul 6, 2015

@ccoenen hi i have same problem today and below is error message
Using rugged 0.23.0b4 (was 0.21.0) from git://github.com/libgit2/rugged.git (at
master)

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

C:/Ruby21/bin/ruby.exe extconf.rb --use-system-libraries

checking for gmake... no
checking for make... yes
Building Rugged using system libraries.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby21/bin/ruby
--use-system-libraries
--with-git2-dir
--without-git2-dir
--with-git2-include
--without-git2-include=${git2-dir}/include
--with-git2-lib
--without-git2-lib=${git2-dir}/lib
--with-libgit2-config
--without-libgit2-config
--with-pkg-config
--without-pkg-config
C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:456:in try_do': The compiler failed to generat e an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:571:inblock in try_compile'
from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:524:in with_werror' from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:571:intry_compile'
from extconf.rb:46:in `

'

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/bundler/gems/ru
gged-e516e9c8401e for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/bundler/gems/extensions/x86-ming
w32/2.1.0/rugged-e516e9c8401e/gem_make.out
An error occurred while installing rugged (0.23.0b4), and Bundler cannot
continue.

in ur message

you said
"then I added the cmake.bat somewhere else (earlier) on my path, with this content:

@"C:\Program Files (x86)\CMake\bin\cmake.exe" -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ %*"

can u tell me how to do it i am guessing it might be a solution to my problem...thanks a lot

sooraj20890 commented Jul 6, 2015

@ccoenen hi i have same problem today and below is error message
Using rugged 0.23.0b4 (was 0.21.0) from git://github.com/libgit2/rugged.git (at
master)

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

C:/Ruby21/bin/ruby.exe extconf.rb --use-system-libraries

checking for gmake... no
checking for make... yes
Building Rugged using system libraries.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby21/bin/ruby
--use-system-libraries
--with-git2-dir
--without-git2-dir
--with-git2-include
--without-git2-include=${git2-dir}/include
--with-git2-lib
--without-git2-lib=${git2-dir}/lib
--with-libgit2-config
--without-libgit2-config
--with-pkg-config
--without-pkg-config
C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:456:in try_do': The compiler failed to generat e an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:571:inblock in try_compile'
from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:524:in with_werror' from C:/Ruby21/lib/ruby/2.1.0/mkmf.rb:571:intry_compile'
from extconf.rb:46:in `

'

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/bundler/gems/ru
gged-e516e9c8401e for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/bundler/gems/extensions/x86-ming
w32/2.1.0/rugged-e516e9c8401e/gem_make.out
An error occurred while installing rugged (0.23.0b4), and Bundler cannot
continue.

in ur message

you said
"then I added the cmake.bat somewhere else (earlier) on my path, with this content:

@"C:\Program Files (x86)\CMake\bin\cmake.exe" -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ %*"

can u tell me how to do it i am guessing it might be a solution to my problem...thanks a lot

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jul 6, 2015

i'm assuming you installed cmake and pkg-config-lite.

In a terminal, you can print out your PATH-Variable like this: echo %PATH% - this will be a long list of directories, seperated by ;. If you type a command like ruby in your terminal, your system looks in each one of them (in the order they are printed) and if it finds a ruby.exe or ruby.bat (or a few other extensions), it will run that program.

So the trick here is, to put a cmake.bat with our one-line-fix in one of the directories. You can pick any directory, i'd just go with the first one printed. This way, we're "overwriting" the actual cmake-command and pass extra options to it. It is hopefully just a temporary workaround.

ccoenen commented Jul 6, 2015

i'm assuming you installed cmake and pkg-config-lite.

In a terminal, you can print out your PATH-Variable like this: echo %PATH% - this will be a long list of directories, seperated by ;. If you type a command like ruby in your terminal, your system looks in each one of them (in the order they are printed) and if it finds a ruby.exe or ruby.bat (or a few other extensions), it will run that program.

So the trick here is, to put a cmake.bat with our one-line-fix in one of the directories. You can pick any directory, i'd just go with the first one printed. This way, we're "overwriting" the actual cmake-command and pass extra options to it. It is hopefully just a temporary workaround.

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jul 6, 2015

oh and one more thing @sooraj20890: The workaround worked for 0.22.2 - it did not work on the 0.23-beta branches, at least not for me.

ccoenen commented Jul 6, 2015

oh and one more thing @sooraj20890: The workaround worked for 0.22.2 - it did not work on the 0.23-beta branches, at least not for me.

@sooraj20890

This comment has been minimized.

Show comment
Hide comment
@sooraj20890

sooraj20890 Jul 6, 2015

@ccoenen thanks buddy i am stuck on a later step
while Installing libv8 and therubyracer gems on windows 8
i got some error which i found because i installed libv8 first and then rubyracer so what i followed stack overflow solution which is
"OS: Maverick Ruby: 2.1.1
gem uninstall libv8
gem install therubyracer -v '0.11.3'
gem install libv8 -v '3.11.8.13' -- --with-system-v8"
i assumed maverick solution would work for windows

i modified above queries as below
gem uninstall libv8
gem install therubyracer -v '0.12.1'

while executing second command below is the error log on command prompt/terminal

C:\Sooraj\Playdrone\playdrone-master>gem install therubyracer -v '0.12.1'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed libv8-3.16.14.11
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.

C:/Ruby21/bin/ruby.exe extconf.rb

checking for main() in -lpthread... no
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
generating init-i386-mingw32.def
compiling accessor.cc
g++.exe: error: unrecognized command line option '-rdynamic'
make: *** [accessor.o] Error 1

make failed, exit code 2

Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/therubyrac
er-0.12.1 for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/the
rubyracer-0.12.1/gem_make.out

i am not sure about right procude to install libv8 and rubyracer on windows 8 can you please help.
Thanks a lot for response

sooraj20890 commented Jul 6, 2015

@ccoenen thanks buddy i am stuck on a later step
while Installing libv8 and therubyracer gems on windows 8
i got some error which i found because i installed libv8 first and then rubyracer so what i followed stack overflow solution which is
"OS: Maverick Ruby: 2.1.1
gem uninstall libv8
gem install therubyracer -v '0.11.3'
gem install libv8 -v '3.11.8.13' -- --with-system-v8"
i assumed maverick solution would work for windows

i modified above queries as below
gem uninstall libv8
gem install therubyracer -v '0.12.1'

while executing second command below is the error log on command prompt/terminal

C:\Sooraj\Playdrone\playdrone-master>gem install therubyracer -v '0.12.1'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed libv8-3.16.14.11
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.

C:/Ruby21/bin/ruby.exe extconf.rb

checking for main() in -lpthread... no
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
generating init-i386-mingw32.def
compiling accessor.cc
g++.exe: error: unrecognized command line option '-rdynamic'
make: *** [accessor.o] Error 1

make failed, exit code 2

Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/therubyrac
er-0.12.1 for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/the
rubyracer-0.12.1/gem_make.out

i am not sure about right procude to install libv8 and rubyracer on windows 8 can you please help.
Thanks a lot for response

@sooraj20890

This comment has been minimized.

Show comment
Hide comment
@sooraj20890

sooraj20890 Jul 6, 2015

and @ccoenen below is code snippet from makefile of partiall installed rubyracer gem

CC = gcc
CXX = g++
LIBRUBY = lib$(RUBY_SO_NAME).dll.a
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
empty =
OUTFLAG = -o $(empty)
COUTFLAG = -o $(empty)

RUBY_EXTCONF_H =
cflags = $(optflags) $(debugflags) $(warnflags)
optflags = -O3 -fno-omit-frame-pointer -fno-fast-math
debugflags = -g
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings
CCDLFLAGS =
CFLAGS = $(CCDLFLAGS) $(cflags) $(ARCH_FLAG)
INCFLAGS = -I. -IC:/Ruby21/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/vendor/v8/include -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
DEFS = -D_FILE_OFFSET_BITS=64
CPPFLAGS = -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT $(DEFS) $(cppflags) -Wall -g -rdynamic
CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
ldflags = C:/Ruby21/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a C:/Ruby21/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_snapshot.a -L.
dldflags = -Wl,--enable-auto-image-base,--enable-auto-import $(DEFFILE)
ARCH_FLAG =
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
LDSHARED = $(CXX) -shared
LDSHAREDXX = $(CXX) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)
AR = ar
EXEEXT = .exe

RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = msvcrt-ruby210
RUBYW_INSTALL_NAME = $(RUBYW_BASE_NAME)
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby

sooraj20890 commented Jul 6, 2015

and @ccoenen below is code snippet from makefile of partiall installed rubyracer gem

CC = gcc
CXX = g++
LIBRUBY = lib$(RUBY_SO_NAME).dll.a
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
empty =
OUTFLAG = -o $(empty)
COUTFLAG = -o $(empty)

RUBY_EXTCONF_H =
cflags = $(optflags) $(debugflags) $(warnflags)
optflags = -O3 -fno-omit-frame-pointer -fno-fast-math
debugflags = -g
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings
CCDLFLAGS =
CFLAGS = $(CCDLFLAGS) $(cflags) $(ARCH_FLAG)
INCFLAGS = -I. -IC:/Ruby21/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/vendor/v8/include -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
DEFS = -D_FILE_OFFSET_BITS=64
CPPFLAGS = -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT $(DEFS) $(cppflags) -Wall -g -rdynamic
CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
ldflags = C:/Ruby21/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a C:/Ruby21/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_snapshot.a -L.
dldflags = -Wl,--enable-auto-image-base,--enable-auto-import $(DEFFILE)
ARCH_FLAG =
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
LDSHARED = $(CXX) -shared
LDSHAREDXX = $(CXX) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)
AR = ar
EXEEXT = .exe

RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = msvcrt-ruby210
RUBYW_INSTALL_NAME = $(RUBYW_BASE_NAME)
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby

@sooraj20890

This comment has been minimized.

Show comment
Hide comment
@sooraj20890

sooraj20890 Jul 6, 2015

Hi Claudius,
Can you please help based on my reply.
Thanks a lot.

Sooraj
On Jul 6, 2015 4:36 AM, "Claudius Coenen" notifications@github.com wrote:

oh and one more thing @sooraj20890 https://github.com/sooraj20890: The
workaround worked for 0.22.2 - it did not work on the 0.23-beta branches,
at least not for me.


Reply to this email directly or view it on GitHub
#84 (comment).

sooraj20890 commented Jul 6, 2015

Hi Claudius,
Can you please help based on my reply.
Thanks a lot.

Sooraj
On Jul 6, 2015 4:36 AM, "Claudius Coenen" notifications@github.com wrote:

oh and one more thing @sooraj20890 https://github.com/sooraj20890: The
workaround worked for 0.22.2 - it did not work on the 0.23-beta branches,
at least not for me.


Reply to this email directly or view it on GitHub
#84 (comment).

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Jul 6, 2015

I'd prefer to not get this issue too far off track. The v8 issue should probably be solved on one of these issue trackers: https://github.com/cowboyd/therubyracer or https://github.com/cowboyd/libv8 .

But I do not think that the maverick (OSX) solutions will work for a windows system. There will also not be a "--with-system-v8" on a windows machine. Those flags usually only apply to unix-style systems.

ccoenen commented Jul 6, 2015

I'd prefer to not get this issue too far off track. The v8 issue should probably be solved on one of these issue trackers: https://github.com/cowboyd/therubyracer or https://github.com/cowboyd/libv8 .

But I do not think that the maverick (OSX) solutions will work for a windows system. There will also not be a "--with-system-v8" on a windows machine. Those flags usually only apply to unix-style systems.

@jweather

This comment has been minimized.

Show comment
Hide comment
@jweather

jweather Aug 6, 2015

Contributor

I'm having trouble with the CMAKE_INSTALL_PREFIX containing spaces as well, but I'm not sure what the best approach is to resolving it permanently -- what is CMAKE_INSTALL_PREFIX being used for? I see it referenced in libgit2.pc.in -- I don't know if an install prefix even makes sense for gem installation. Any suggestions?

Contributor

jweather commented Aug 6, 2015

I'm having trouble with the CMAKE_INSTALL_PREFIX containing spaces as well, but I'm not sure what the best approach is to resolving it permanently -- what is CMAKE_INSTALL_PREFIX being used for? I see it referenced in libgit2.pc.in -- I don't know if an install prefix even makes sense for gem installation. Any suggestions?

@arthurschreiber

This comment has been minimized.

Show comment
Hide comment
@arthurschreiber

arthurschreiber Dec 28, 2015

Member

Closing this. Rugged can be compiled on windows from source, if you have the Ruby DevKit installed and CMake is on your PATH.

Member

arthurschreiber commented Dec 28, 2015

Closing this. Rugged can be compiled on windows from source, if you have the Ruby DevKit installed and CMake is on your PATH.

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