Giter Club home page Giter Club logo

Comments (6)

jchatel avatar jchatel commented on July 23, 2024 4

How about putting it in the readme then?

from stackprof.

tmm1 avatar tmm1 commented on July 23, 2024

What is the compilation error?

I don't have any experience with win32, but I imagine setitimer() is not implemented. There might be an alternative we can use.. I would refer to the gperftools implementation to see how they implement support for windows.

from stackprof.

jchatel avatar jchatel commented on July 23, 2024

On Windows 7 64bits with Ruby 2.2.3:

Installing stackprof 0.2.8 with native extensions

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

C:/Ruby/2.2.3/bin/ruby.exe extconf.rb

checking for rb_postponed_job_register_one()... yes
checking for rb_profile_frames()... yes
checking for rb_tracepoint_new()... yes
checking for RUBY_INTERNAL_EVENT_NEWOBJ... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
generating stackprof-i386-mingw32.def
compiling stackprof.c
In file included from stackprof.c:15:0:
c:\ruby\devkit2.0-32bits\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/sys/time.h:42:13: error: conflicting types for 'gettimeofday'
In file included from c:/Ruby/2.2.3/include/ruby-2.2.0/ruby/defines.h:163:0,
from c:/Ruby/2.2.3/include/ruby-2.2.0/ruby/ruby.h:29,
from stackprof.c:9:
c:/Ruby/2.2.3/include/ruby-2.2.0/ruby/win32.h:318:12: note: previous declaration of 'gettimeofday' was here
stackprof.c:58:47: error: unknown type name 'siginfo_t'
stackprof.c: In function 'stackprof_start':
stackprof.c:63:22: error: storage size of 'sa' isn't known
stackprof.c:64:22: error: storage size of 'timer' isn't known
stackprof.c:100:20: error: 'stackprof_signal_handler' undeclared (first use in this function)
stackprof.c:100:20: note: each undeclared identifier is reported only once for each function it appears in
stackprof.c:101:16: error: 'SA_RESTART' undeclared (first use in this function)
stackprof.c:101:29: error: 'SA_SIGINFO' undeclared (first use in this function)
stackprof.c:102:2: warning: implicit declaration of function 'sigemptyset' [-Wimplicit-function-declaration]
stackprof.c:103:2: warning: implicit declaration of function 'sigaction' [-Wimplicit-function-declaration]
stackprof.c:103:31: error: 'SIGALRM' undeclared (first use in this function)
stackprof.c:103:41: error: 'SIGPROF' undeclared (first use in this function)
stackprof.c:108:2: warning: implicit declaration of function 'setitimer' [-Wimplicit-function-declaration]
stackprof.c:108:31: error: 'ITIMER_REAL' undeclared (first use in this function)
stackprof.c:108:45: error: 'ITIMER_PROF' undeclared (first use in this function)
stackprof.c:64:22: warning: unused variable 'timer' [-Wunused-variable]
stackprof.c:63:22: warning: unused variable 'sa' [-Wunused-variable]
stackprof.c: In function 'stackprof_stop':
stackprof.c:129:22: error: storage size of 'sa' isn't known
stackprof.c:130:22: error: storage size of 'timer' isn't known
stackprof.c:140:42: error: 'ITIMER_REAL' undeclared (first use in this function)
stackprof.c:140:56: error: 'ITIMER_PROF' undeclared (first use in this function)
stackprof.c:143:16: error: 'SA_RESTART' undeclared (first use in this function)
stackprof.c:145:42: error: 'SIGALRM' undeclared (first use in this function)
stackprof.c:145:52: error: 'SIGPROF' undeclared (first use in this function)
stackprof.c:130:22: warning: unused variable 'timer' [-Wunused-variable]
stackprof.c:129:22: warning: unused variable 'sa' [-Wunused-variable]
stackprof.c: In function 'stackprof_record_sample':
stackprof.c:405:6: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
stackprof.c: At top level:
stackprof.c:427:35: error: unknown type name 'siginfo_t'
stackprof.c: In function 'stackprof_atfork_prepare':
stackprof.c:477:22: error: storage size of 'timer' isn't known
stackprof.c:481:46: error: 'ITIMER_REAL' undeclared (first use in this function)
stackprof.c:481:60: error: 'ITIMER_PROF' undeclared (first use in this function)
stackprof.c:477:22: warning: unused variable 'timer' [-Wunused-variable]
stackprof.c: In function 'stackprof_atfork_parent':
stackprof.c:489:22: error: storage size of 'timer' isn't known
stackprof.c:495:46: error: 'ITIMER_REAL' undeclared (first use in this function)
stackprof.c:495:60: error: 'ITIMER_PROF' undeclared (first use in this function)
stackprof.c:489:22: warning: unused variable 'timer' [-Wunused-variable]
stackprof.c: In function 'Init_stackprof':
stackprof.c:546:5: warning: statement with no effect [-Wunused-value]
stackprof.c: At top level:
stackprof.c:475:1: warning: 'stackprof_atfork_prepare' defined but not used [-Wunused-function]
stackprof.c:487:1: warning: 'stackprof_atfork_parent' defined but not used [-Wunused-function]
stackprof.c:501:1: warning: 'stackprof_atfork_child' defined but not used [-Wunused-function]
make: *** [stackprof.o] Error 1

make failed, exit code 2

Gem files will remain installed in C:/Ruby/2.2.3/lib/ruby/gems/2.2.0/gems/stackprof-0.2.8 for inspection.
Results logged to C:/Ruby/2.2.3/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/stackprof-0.2.8/gem_make.out

from stackprof.

dimanyc avatar dimanyc commented on July 23, 2024

any updates on this?

from stackprof.

tmm1 avatar tmm1 commented on July 23, 2024

Sorry, there are no plans to add win32 support at this time.

from stackprof.

itsderek23 avatar itsderek23 commented on July 23, 2024

The README now clarifies OS support: https://github.com/tmm1/stackprof#requirements

from stackprof.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.