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

Can not install under windows #19

Closed
andreas-it-dev opened this issue Jun 6, 2022 · 5 comments
Closed

Can not install under windows #19

andreas-it-dev opened this issue Jun 6, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@andreas-it-dev
Copy link

Hi,

unfortunately i have to develop under windows and this gem is pulled as a dependency of the eth gem. however, installation fails with the following error:

gcc: error: unrecognized command-line option '-std\=c11'; did you mean '-std=c11'?
gcc: error: unrecognized command-line option '-fvisibility\=hidden'; did you mean '-fvisibility=hidden'?
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return !!argv[argc];
8: }
/* end */

any hint is highly appreciated. just for completeness sake, the extconf.rb looks fine and does not have the backslashes in the compiler options.

thanks a lot!

@andreas-it-dev
Copy link
Author

hi @q9f , thanks for coming back to me.

my bundle env looks like this:

Environment

Bundler       2.3.7
  Platforms   ruby, x64-mingw-ucrt
Ruby          3.1.1p18 (2022-02-18 revision 53f5fc4236a754ddf94b20dbb70ab63bd5109b18) [x64-mingw-ucrt]
  Full Path   C:/Ruby31-x64/bin/ruby.exe
  Config Dir  C:/ProgramData
RubyGems      3.3.7
  Gem Home    C:/Ruby31-x64/lib/ruby/gems/3.1.0
  Gem Path    C:/Users/Andreas/.local/share/gem/ruby/3.1.0;C:/Ruby31-x64/lib/ruby/gems/3.1.0
  User Home   C:/Users/Andreas
  User Path   C:/Users/Andreas/.local/share/gem/ruby/3.1.0
  Bin Dir     C:/Ruby31-x64/bin
Tools
  Git         2.33.0.windows.2
  RVM         not installed
  rbenv       not installed
  chruby      not installed

Bundler Build Metadata

Built At          2022-06-07
Git SHA           unknown
Released Version  false

Gemfile

Gemfile

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.1.1'

gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
gem 'pg', '~> 1.1'
gem 'puma', '~> 5.0'
gem 'bootsnap', '>= 1.4.4', require: false
gem 'rack-cors'
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
gem 'net-smtp', require: false
gem 'net-pop', require: false
gem 'net-imap', require: false
gem 'tzinfo-data'
gem 'http'
gem 'activerecord-import'
gem 'redis'
gem 'redis-namespace'
gem 'redis-rails'
gem 'sidekiq' # https://github.com/mperham/sidekiq
gem 'sidekiq-rate-limiter' # https://github.com/enova/sidekiq-rate-limiter
gem 'sidekiq-failures' # https://github.com/mhfs/sidekiq-failures
gem 'sidekiq-cron' # https://github.com/ondrejbartas/sidekiq-cron
gem 'foreman'
gem 'openssl'
gem 'groupdate'
gem 'calculate-all', git: 'https://github.com/ankane/calculate-all'
gem 'solana_rpc_ruby' # https://github.com/Block-Logic/solana-rpc-ruby
gem 'coingecko_ruby' # https://github.com/julianfssen/coingecko_ruby
gem 'pry'
gem 'pry-theme'
gem 'awesome_print'
gem 'coderay'
gem 'pry-rails'
gem 'keccak', '~> 1.3'
gem 'eth'

Gemfile.lock

GIT
  remote: https://github.com/ankane/calculate-all
  revision: fa10c04bf0a2ca611d4d1cb31d88f594612b9111
  specs:
    calculate-all (0.2.1)
      activerecord

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (6.1.6)
      actionpack (= 6.1.6)
      activesupport (= 6.1.6)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (6.1.6)
      actionpack (= 6.1.6)
      activejob (= 6.1.6)
      activerecord (= 6.1.6)
      activestorage (= 6.1.6)
      activesupport (= 6.1.6)
      mail (>= 2.7.1)
    actionmailer (6.1.6)
      actionpack (= 6.1.6)
      actionview (= 6.1.6)
      activejob (= 6.1.6)
      activesupport (= 6.1.6)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (6.1.6)
      actionview (= 6.1.6)
      activesupport (= 6.1.6)
      rack (~> 2.0, >= 2.0.9)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actiontext (6.1.6)
      actionpack (= 6.1.6)
      activerecord (= 6.1.6)
      activestorage (= 6.1.6)
      activesupport (= 6.1.6)
      nokogiri (>= 1.8.5)
    actionview (6.1.6)
      activesupport (= 6.1.6)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.1, >= 1.2.0)
    activejob (6.1.6)
      activesupport (= 6.1.6)
      globalid (>= 0.3.6)
    activemodel (6.1.6)
      activesupport (= 6.1.6)
    activerecord (6.1.6)
      activemodel (= 6.1.6)
      activesupport (= 6.1.6)
    activerecord-import (1.4.0)
      activerecord (>= 4.2)
    activestorage (6.1.6)
      actionpack (= 6.1.6)
      activejob (= 6.1.6)
      activerecord (= 6.1.6)
      activesupport (= 6.1.6)
      marcel (~> 1.0)
      mini_mime (>= 1.1.0)
    activesupport (6.1.6)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
      zeitwerk (~> 2.3)
    addressable (2.8.0)
      public_suffix (>= 2.0.2, < 5.0)
    awesome_print (1.9.2)
    bootsnap (1.12.0)
      msgpack (~> 1.2)
    builder (3.2.4)
    coderay (1.1.3)
    coingecko_ruby (0.4.2)
    concurrent-ruby (1.1.10)
    connection_pool (2.2.5)
    crass (1.0.6)
    digest (3.1.0)
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    erubi (1.10.0)
    et-orbi (1.2.7)
      tzinfo
    eth (0.5.5)
      keccak (~> 1.3)
      konstructor (~> 1.0)
      openssl (>= 2.2, < 4.0)
      rbsecp256k1 (~> 5.1)
      scrypt (~> 3.0)
    eventmachine (1.2.7)
    faye-websocket (0.11.1)
      eventmachine (>= 0.12.0)
      websocket-driver (>= 0.5.1)
    ffi (1.15.5)
    ffi (1.15.5-x64-mingw-ucrt)
    ffi-compiler (1.0.1)
      ffi (>= 1.0.0)
      rake
    foreman (0.87.2)
    fugit (1.5.3)
      et-orbi (~> 1, >= 1.2.7)
      raabro (~> 1.4)
    globalid (1.0.0)
      activesupport (>= 5.0)
    groupdate (6.1.0)
      activesupport (>= 5.2)
    http (5.0.4)
      addressable (~> 2.8)
      http-cookie (~> 1.0)
      http-form_data (~> 2.2)
      llhttp-ffi (~> 0.4.0)
    http-cookie (1.0.5)
      domain_name (~> 0.5)
    http-form_data (2.3.0)
    i18n (1.10.0)
      concurrent-ruby (~> 1.0)
    keccak (1.3.0)
    konstructor (1.0.2)
    llhttp-ffi (0.4.0)
      ffi-compiler (~> 1.0)
      rake (~> 13.0)
    loofah (2.18.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (1.0.2)
    method_source (1.0.0)
    mini_mime (1.1.2)
    mini_portile2 (2.8.0)
    minitest (5.15.0)
    msgpack (1.5.2)
    net-imap (0.2.3)
      digest
      net-protocol
      strscan
    net-pop (0.1.1)
      digest
      net-protocol
      timeout
    net-protocol (0.1.3)
      timeout
    net-smtp (0.3.1)
      digest
      net-protocol
      timeout
    nio4r (2.5.8)
    nokogiri (1.13.6-x64-mingw-ucrt)
      racc (~> 1.4)
    nokogiri (1.13.6-x86_64-linux)
      racc (~> 1.4)
    openssl (3.0.0)
    pg (1.3.5)
    pg (1.3.5-x64-mingw-ucrt)
    pkg-config (1.4.7)
    pry (0.14.1)
      coderay (~> 1.1)
      method_source (~> 1.0)
    pry-rails (0.3.9)
      pry (>= 0.10.4)
    pry-theme (1.3.1)
      coderay (~> 1.1)
    public_suffix (4.0.7)
    puma (5.6.4)
      nio4r (~> 2.0)
    raabro (1.4.0)
    racc (1.6.0)
    rack (2.2.3.1)
    rack-cors (1.1.1)
      rack (>= 2.0.0)
    rack-protection (2.2.0)
      rack
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (6.1.6)
      actioncable (= 6.1.6)
      actionmailbox (= 6.1.6)
      actionmailer (= 6.1.6)
      actionpack (= 6.1.6)
      actiontext (= 6.1.6)
      actionview (= 6.1.6)
      activejob (= 6.1.6)
      activemodel (= 6.1.6)
      activerecord (= 6.1.6)
      activestorage (= 6.1.6)
      activesupport (= 6.1.6)
      bundler (>= 1.15.0)
      railties (= 6.1.6)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.4.2)
      loofah (~> 2.3)
    railties (6.1.6)
      actionpack (= 6.1.6)
      activesupport (= 6.1.6)
      method_source
      rake (>= 12.2)
      thor (~> 1.0)
    rake (13.0.6)
    rbsecp256k1 (5.1.0)
      mini_portile2 (~> 2.7)
      pkg-config (~> 1.4)
      rubyzip (~> 2.3)
    redis (4.5.1)
    redis-actionpack (5.3.0)
      actionpack (>= 5, < 8)
      redis-rack (>= 2.1.0, < 3)
      redis-store (>= 1.1.0, < 2)
    redis-activesupport (5.3.0)
      activesupport (>= 3, < 8)
      redis-store (>= 1.3, < 2)
    redis-namespace (1.8.2)
      redis (>= 3.0.4)
    redis-rack (2.1.4)
      rack (>= 2.0.8, < 3)
      redis-store (>= 1.2, < 2)
    redis-rails (5.0.2)
      redis-actionpack (>= 5.0, < 6)
      redis-activesupport (>= 5.0, < 6)
      redis-store (>= 1.2, < 2)
    redis-store (1.9.1)
      redis (>= 4, < 5)
    redis_rate_limiter (0.1.0)
      redis
    rubyzip (2.3.2)
    scrypt (3.0.7)
      ffi-compiler (>= 1.0, < 2.0)
    sidekiq (5.2.10)
      connection_pool (~> 2.2, >= 2.2.2)
      rack (~> 2.0)
      rack-protection (>= 1.5.0)
      redis (~> 4.5, < 4.6.0)
    sidekiq-cron (1.4.0)
      fugit (~> 1)
      sidekiq (>= 4.2.1)
    sidekiq-failures (1.0.1)
      sidekiq (>= 4.0.0)
    sidekiq-rate-limiter (0.1.3)
      redis_rate_limiter
      sidekiq (>= 4.0, < 6.0)
    solana_rpc_ruby (1.2.0)
      faye-websocket (~> 0.11)
    sprockets (4.0.3)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.4.2)
      actionpack (>= 5.2)
      activesupport (>= 5.2)
      sprockets (>= 3.0.0)
    strscan (3.0.3)
    thor (1.2.1)
    timeout (0.3.0)
    tzinfo (2.0.4)
      concurrent-ruby (~> 1.0)
    tzinfo-data (1.2022.1)
      tzinfo (>= 1.0.0)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.8.2)
    websocket-driver (0.7.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    zeitwerk (2.5.4)

PLATFORMS
  x64-mingw-ucrt
  x86_64-linux

DEPENDENCIES
  activerecord-import
  awesome_print
  bootsnap (>= 1.4.4)
  calculate-all!
  coderay
  coingecko_ruby
  eth
  foreman
  groupdate
  http
  keccak (~> 1.3)
  net-imap
  net-pop
  net-smtp
  openssl
  pg (~> 1.1)
  pry
  pry-rails
  pry-theme
  puma (~> 5.0)
  rack-cors
  rails (~> 6.1.4, >= 6.1.4.1)
  redis
  redis-namespace
  redis-rails
  sidekiq
  sidekiq-cron
  sidekiq-failures
  sidekiq-rate-limiter
  solana_rpc_ruby
  tzinfo-data

RUBY VERSION
   ruby 3.1.1p18

BUNDLED WITH
   2.3.7

i try to install the eth gem via Gemfile and bundle. which pulls this gem here as a pre-req

@andreas-it-dev
Copy link
Author

also tried to install it on his own (without the eth gem, but that didnt fly either

@andreas-it-dev
Copy link
Author

ah, and firing up WFL and running a bundle install in there works just fine.. though it still should do the trick under windows, i want to keep using my IDE for managing rails commands (server, console, etc..) and stuff

@q9f
Copy link
Owner

q9f commented Jun 7, 2022

Thank you for the additional details!

I won't be able to debug and fix this as I only have access to Apple/macOS and GNU/Linux machines.

If you find the cause and manage to fix this, I'd be happy to accept a PR. 🙏🏼

@q9f q9f added the help wanted Extra attention is needed label Jun 7, 2022
httpsx added a commit to httpsx/keccak.rb that referenced this issue Aug 22, 2022
q9f added a commit that referenced this issue Aug 23, 2022
* Fix install on Windows

#19

* Fix install on Windows

* Fix install on Windows

Co-authored-by: Afri³ <58883403+q9f@users.noreply.github.com>

Co-authored-by: Afri³ <58883403+q9f@users.noreply.github.com>
@q9f q9f closed this as completed Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants