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

Cannot be installed in Windows... #1

Closed
ramsees opened this issue Aug 18, 2012 · 1 comment
Closed

Cannot be installed in Windows... #1

ramsees opened this issue Aug 18, 2012 · 1 comment
Assignees

Comments

@ramsees
Copy link

ramsees commented Aug 18, 2012

This is a very valuable gem, but I cannot install it on windows, I get this message:

D:\tmp\ruby\demo_namespaces>gem install stack_tracy
Fetching: rich_support-0.1.2.gem (100%)
Fetching: launchy-2.1.0.gem (100%)
Fetching: stack_tracy-0.1.2.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing stack_tracy:
ERROR: Failed to build gem native extension.

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

creating Makefile

make
generating stack_tracy-i386-mingw32.def
compiling stack_tracy.c
In file included from stack_tracy.h:7:0,
from stack_tracy.c:1:
c:\ruby193\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/sys/time.h:26:8: error: redefinition of 'struct timezone'
c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:212:8: note: originally defined here
c:\ruby193\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/sys/time.h:39:29: error: conflicting types for 'gettimeofday'
c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:283:12: note: previous declaration of 'gettimeofday' was here
stack_tracy.c: In function 'stack_tracy_start':
stack_tracy.c:147:5: warning: ISO C90 forbids mixed declarations and code
stack_tracy.c:162:5: warning: ISO C90 forbids mixed declarations and code
make: *** [stack_tracy.o] Error 1

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/stack_tracy-0.1.2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/stack_tracy-0.1.2/ext/stack_tracy/gem_make.out

It maybe that the problem is devkit, if that is the case let me know to file a big report in the devkit forums.

Thank you.

@archan937
Copy link
Owner

Hi Ramsees,

First of all, I'm glad that you're seeing the value of StackTracy. I really appreciate it.
As for your problem, I have just released StackTracy v0.1.3 in which the problem is fixed.
I have installed and ran it successfully on Windows using Ruby 1.9.3 and DevKit 4.5.2 myself.

Removing #include <sys/time.h> in stack_tracy.h did the trick! :P

The release CHANGELOG:

  • Being able to compile StackTracy native extension on Windows (thanks ramsees for issuing)
  • Tackled C compile warnings
  • Not using Launchy for opening the generated HTML page when running on Windows

Please add issues when you are encountering other problems.

Greets,
Paul.

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

No branches or pull requests

2 participants