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

is there a windows gem available for download somewhere? having a hard time getting this going #9

Open
CrocodilePundee opened this issue Apr 15, 2013 · 8 comments

Comments

@CrocodilePundee
Copy link

No description provided.

@ealdent
Copy link
Owner

ealdent commented Apr 15, 2013

Sorry, no, I never tested with windows. Basically it's just a wrapper around the C code by David Blei. You may be able to take that and do something with it.

@CrocodilePundee
Copy link
Author

thanks for the quick turnaround, but i am one step ahead a ya! i installed devkit so i could force it to compile the gem from source, but it is giving me several errors:

C:\DevKit>gem install lda-ruby --platform=ruby
Building native extensions. This could take a while...
ERROR: Error installing lda-ruby:
ERROR: Failed to build gem native extension.

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

creating Makefile

make
generating lda-i386-mingw32.def
compiling cokus.c
compiling lda-alpha.c
lda-alpha.c: In function 'quiet_opt_alpha':
lda-alpha.c:73:12: warning: variable 'f' set but not used [-Wunused-but-set-vari
able]
compiling lda-data.c
compiling lda-inference.c
In file included from c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/..
/../../../x86_64-w64-mingw32/include/windef.h:137:0,
from c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/..
/../../../x86_64-w64-mingw32/include/windows.h:59,
from c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/..
/../../../x86_64-w64-mingw32/include/winsock2.h:23,
from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:40,
from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223,
from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from lda-inference.c:35:
c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-m
ingw32/include/winnt.h:4571:9: error: expected identifier or '(' before numeric
constant
In file included from c:/Ruby193/include/ruby-1.9.1/ruby.h:32:0,
from lda-inference.c:35:
c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:109:14: error: size of array 'ruby_che
ck_sizeof_voidp' is negative
In file included from c:/Ruby193/include/ruby-1.9.1/ruby.h:32:0,
from lda-inference.c:35:
c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h: In function 'rb_class_of':
c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1333:12: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h: In function 'rb_type':
c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1349:12: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from lda-inference.c:35:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h: At top level:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:41:8: error: redefinition of 'struc
t timespec'
In file included from c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/..
/../../../x86_64-w64-mingw32/include/time.h:277:0,
from lda-inference.c:25:
c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-m
ingw32/include/sys/timeb.h:90:8: note: originally defined here
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from lda-inference.c:35:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:48:8: error: redefinition of 'struc
t timezone'
In file included from lda-inference.c:25:0:
c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-m
ingw32/include/time.h:260:8: note: originally defined here
lda-inference.c: In function 'doc_e_step':
lda-inference.c:174:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'run_em':
lda-inference.c:245:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c:252:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c:286:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c:289:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c:342:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'infer':
lda-inference.c:412:5: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'main':
lda-inference.c:439:2: warning: passing argument 1 of 'time' from incompatible p
ointer type [enabled by default]
In file included from lda-inference.c:25:0:
c:\devkit\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-m
ingw32/include/time.h:222:16: note: expected 'time_t ' but argument is of type
'long int *'
lda-inference.c: In function 'run_quiet_em':
lda-inference.c:489:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c:500:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c:546:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'wrap_ruby_corpus':
lda-inference.c:823:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'wrap_get_gamma':
lda-inference.c:861:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'wrap_get_phi':
lda-inference.c:886:5: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'wrap_get_model_beta':
lda-inference.c:923:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
lda-inference.c: In function 'wrap_get_model_settings':
lda-inference.c:946:2: warning: ISO C90 forbids mixed declarations and code [-Wd
eclaration-after-statement]
make: *
* [lda-inference.o] Error 1

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

@CrocodilePundee
Copy link
Author

ok, turns out i had the wrong version of devkit, but i fixed that and now i'm still failing:

C:\DevKit>gem install lda-ruby --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing lda-ruby:
ERROR: Failed to build gem native extension.

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

make
generating lda-i386-mingw32.def
compiling cokus.c
compiling lda-alpha.c
compiling lda-data.c
compiling lda-inference.c
In file included from c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../i
nclude/windef.h:253:0,
from c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../i
nclude/windows.h:48,
from c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../i
nclude/winsock2.h:22,
from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:40,
from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223,
from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from lda-inference.c:35:
c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/winnt.h:3095:4:
error: expected identifier or '(' before numeric constant
c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/winnt.h:3096:2:
error: expected ';' before 'DWORD'
lda-inference.c: In function 'doc_e_step':
lda-inference.c:174:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'run_em':
lda-inference.c:245:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:252:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:286:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:289:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:342:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'infer':
lda-inference.c:412:5: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'run_quiet_em':
lda-inference.c:489:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:500:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:546:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_ruby_corpus':
lda-inference.c:823:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_gamma':
lda-inference.c:861:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_phi':
lda-inference.c:886:5: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_model_beta':
lda-inference.c:923:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_model_settings':
lda-inference.c:946:2: warning: ISO C90 forbids mixed declarations and code
make: *** [lda-inference.o] Error 1

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

C:\DevKit>

@ksaveras
Copy link

c:\Ruby193>bin\gem install lda-ruby
Fetching: shoulda-context-1.1.1.gem (100%)
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.7.3.gem (100%)
Fetching: activesupport-3.2.13.gem (100%)
Fetching: shoulda-matchers-2.1.0.gem (100%)
Fetching: shoulda-3.5.0.gem (100%)
Fetching: lda-ruby-0.3.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing lda-ruby:
ERROR: Failed to build gem native extension.

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

creating Makefile

make
generating lda-i386-mingw32.def
compiling cokus.c
compiling lda-alpha.c
compiling lda-data.c
compiling lda-inference.c
In file included from c:\rubydevkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/windef.h:253:0,
from c:\rubydevkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/windows.h:48,
from c:\rubydevkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/winsock2.h:22,
from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:40,
from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223,
from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from lda-inference.c:35:
c:\rubydevkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/winnt.h:3095:4: error: expected identifier or '(' before numeric consta
nt
c:\rubydevkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/winnt.h:3096:2: error: expected ';' before 'DWORD'
lda-inference.c: In function 'doc_e_step':
lda-inference.c:174:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'run_em':
lda-inference.c:245:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:252:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:286:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:289:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:342:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'infer':
lda-inference.c:412:5: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'run_quiet_em':
lda-inference.c:489:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:500:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c:546:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_ruby_corpus':
lda-inference.c:823:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_gamma':
lda-inference.c:861:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_phi':
lda-inference.c:886:5: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_model_beta':
lda-inference.c:923:2: warning: ISO C90 forbids mixed declarations and code
lda-inference.c: In function 'wrap_get_model_settings':
lda-inference.c:946:2: warning: ISO C90 forbids mixed declarations and code
make: *** [lda-inference.o] Error 1

Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/lda-ruby-0.3.8 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/lda-ruby-0.3.8/ext/lda-ruby/gem_make.out

c:\Ruby193>bin\gem environment
RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.24
  • RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [i386-mingw32]
  • INSTALLATION DIRECTORY: c:/Ruby193/lib/ruby/gems/1.9.1
  • RUBY EXECUTABLE: c:/Ruby193/bin/ruby.exe
  • EXECUTABLE DIRECTORY: c:/Ruby193/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mingw32
  • GEM PATHS:
    • c:/Ruby193/lib/ruby/gems/1.9.1
    • c:/Users/Myuser/.gem/ruby/1.9.1
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

@CrocodilePundee
Copy link
Author

looks like yours craps out in the same place as mine. could it really just be that GCC responds to the same source differently on pc vs mac?

@CrocodilePundee
Copy link
Author

C:\Ruby193>bin\gem environment
RubyGems Environment:

  • RUBYGEMS VERSION: 2.0.3
  • RUBY VERSION: 1.9.3 (2012-11-10 patchlevel 327) [i386-mingw32]
  • INSTALLATION DIRECTORY: C:/Ruby193/lib/ruby/gems/1.9.1
  • RUBY EXECUTABLE: C:/Ruby193/bin/ruby.exe
  • EXECUTABLE DIRECTORY: C:/Ruby193/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mingw32
  • GEM PATHS:
    • C:/Ruby193/lib/ruby/gems/1.9.1
    • C:/Users/DukeOfOil/.gem/ruby/1.9.1
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
    • :benchmark => false
    • :sources => ["http://rubygems.org/"]
  • REMOTE SOURCES:

C:\Ruby193>

@TechRsch
Copy link

TechRsch commented Sep 6, 2013

I am struggling with exactly the same compile problem except I use BitNami Rubystack with Ruby 1.9.3p448. Did you ever find a fix? It would surely help.

@CrocodilePundee
Copy link
Author

never got any more info. if i knew more about compiling c i would poke
around the code. maybe some day in the far away future.

Thanks,

John Moore
Minds Dozer Media
(646) 373-6937
(Min) dsD-ozer
http://www.mindsdozer.com

On Fri, Sep 6, 2013 at 5:26 PM, TechRsch notifications@github.com wrote:

I am struggling with exactly the same compile problem except I use BitNami
Rubystack with Ruby 1.9.3p448. Did you ever find a fix? It would surely
help.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-23973352
.

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

4 participants