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

Compile error installing 1.3.0 #12

Closed
scarver2 opened this issue Jul 1, 2015 · 12 comments
Closed

Compile error installing 1.3.0 #12

scarver2 opened this issue Jul 1, 2015 · 12 comments

Comments

@scarver2
Copy link

scarver2 commented Jul 1, 2015

Version 1.2.0 installed fine with Homebrew's libsass keg. However, version 1.3 is throwing an error.

Here is the log output from gem_make.out after gem install sassc:

/Users/me/.rvm/rubies/ruby-2.2.2/bin/ruby -rubygems /Users/me/.rvm/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake RUBYARCHDIR=/Users/me/.rvm/gems/ruby-2.2.2/extensions/x86_64-darwin-14/2.2.0/sassc-1.3.0 RUBYLIBDIR=/Users/me/.rvm/gems/ruby-2.2.2/extensions/x86_64-darwin-14/2.2.0/sassc-1.3.0
git submodule update --init
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
Command failed with status (128): [git submodule update --init...]
/Users/me/.rvm/gems/ruby-2.2.2/gems/sassc-1.3.0/lib/tasks/libsass.rb:6:in `block (2 levels) in <top (required)>'
Tasks: TOP => default => libsass:compile => ext/libsass/lib/libsass.so => ext/libsass/.git
(See full trace by running task with --trace)

rake failed, exit code 1

Output from brew info libsass

libsass: stable 3.2.5 (bottled), HEAD
C implementation of a Sass compiler
https://github.com/sass/libsass
/usr/local/Cellar/libsass/3.2.4 (13 files, 4.6M)
  Poured from bottle
/usr/local/Cellar/libsass/3.2.5 (13 files, 4.6M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/libsass.rb
==> Dependencies
Build: autoconf ✔, automake ✔, libtool ✔
@bolandrm
Copy link
Member

bolandrm commented Jul 1, 2015

i think with the rake task set up the way it is, you need to be in the sassc-1.3.0 gem directory when you call rake, in order to init the submodule.

at the moment, libsass which is installed elsewhere on your machine will be ignored- the gem will always download the git repo and use that libsass version.

@scarver2
Copy link
Author

scarver2 commented Jul 4, 2015

I cleared out my gem repo inside of RVM.

git clone git@github.com:bolandrm/sassc-ruby.git
cd sassc-ruby
be rake libsass:compile
gem build sassc.gemspec
gem install ./sassc-1.3.0.gem

Still getting an installation error.

Building native extensions.  This could take a while...
ERROR:  Error installing ./sassc-1.3.0.gem:
    ERROR: Failed to build gem native extension.

    /Users/scarver2/.rvm/rubies/ruby-2.2.2/bin/ruby -rubygems /Users/scarver2/.rvm/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake RUBYARCHDIR=/Users/scarver2/.rvm/gems/ruby-2.2.2/extensions/x86_64-darwin-14/2.2.0/sassc-1.3.0 RUBYLIBDIR=/Users/scarver2/.rvm/gems/ruby-2.2.2/extensions/x86_64-darwin-14/2.2.0/sassc-1.3.0
git submodule update --init
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
Command failed with status (128): [git submodule update --init...]
/Users/scarver2/.rvm/gems/ruby-2.2.2/gems/sassc-1.3.0/lib/tasks/libsass.rb:6:in `block (2 levels) in <top (required)>'
Tasks: TOP => default => libsass:compile => ext/libsass/lib/libsass.so => ext/libsass/.git
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /Users/scarver2/.rvm/gems/ruby-2.2.2/gems/sassc-1.3.0 for inspection.
Results logged to /Users/scarver2/.rvm/gems/ruby-2.2.2/extensions/x86_64-darwin-14/2.2.0/sassc-1.3.0/gem_make.out

@bolandrm
Copy link
Member

I'm having difficulty tracking this issue down. It's likely due to 1f4c9b9. @edward any thoughts?

Prior to that commit, i'm actually not sure how the submodule was being initialized ...

@bolandrm
Copy link
Member

Ah, perhaps we don't even need that submodule initialization in the Rakefile, because the files are being included in the gemspec?

@bolandrm
Copy link
Member

@scarver2 after the build fails, are you able to go into /Users/scarver2/.rvm/gems/ruby-2.2.2/gems/sassc-1.3.0 and check what is in there? i.e. is the full libsass library in there?

@bolandrm
Copy link
Member

@scarver2 I believe I've fixed this. Please try out version 1.5.0 and let me know if you have any further problems.

@phillmv
Copy link

phillmv commented Jul 12, 2015

Hey!

I saw your post on reddit for sassc-rails and immediately got excited. Except, I'm also seeing this compilation error.

$ gem install sassc -v '1.5.0'
Building native extensions.  This could take a while...
ERROR:  Error installing sassc:
    ERROR: Failed to build gem native extension.

    /Users/phillmv/.rubies/ruby-2.2.0/bin/ruby -rubygems /Users/phillmv/.rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake RUBYARCHDIR=/Users/phillmv/.gem/ruby/2.2.0/extensions/x86_64-darwin-13/2.2.0-static/sassc-1.5.0 RUBYLIBDIR=/Users/phillmv/.gem/ruby/2.2.0/extensions/x86_64-darwin-13/2.2.0-static/sassc-1.5.0
git submodule update --init
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
Command failed with status (128): [git submodule update --init...]
/Users/phillmv/.gem/ruby/2.2.0/gems/sassc-1.5.0/lib/tasks/libsass.rb:6:in `block (2 levels) in <top (required)>'
Tasks: TOP => default => libsass:compile => ext/libsass/lib/libsass.so => ext/libsass/Makefile
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /Users/phillmv/.gem/ruby/2.2.0/gems/sassc-1.5.0 for inspection.
Results logged to /Users/phillmv/.gem/ruby/2.2.0/extensions/x86_64-darwin-13/2.2.0-static/sassc-1.5.0/gem_make.out

fyi,

$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]

@phillmv
Copy link

phillmv commented Jul 12, 2015

Also worth noting that in ~/.gem/ruby/2.2.0/gems/sassc-1.5.0/ext/libsass, I do seem to have the full libsass repo checked out.

@bolandrm bolandrm reopened this Jul 12, 2015
@bolandrm
Copy link
Member

@phillmv Thanks for the report! I've released 1.5.1, can you please try installing that?

reproduced failed installation of 1.5.0:

🚀  sassc (master) →  gem install sassc -v '1.5.0'
Building native extensions.  This could take a while...
ERROR:  Error installing sassc:
    ERROR: Failed to build gem native extension.

    /Users/bolandrm/.rbenv/versions/2.1.4/bin/ruby -rubygems /Users/bolandrm/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/rake-10.1.0/bin/rake RUBYARCHDIR=/Users/bolandrm/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/sassc-1.5.0 RUBYLIBDIR=/Users/bolandrm/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/sassc-1.5.0
git submodule update --init
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
Command failed with status (128): [git submodule update --init...]

Tasks: TOP => default => libsass:compile => ext/libsass/lib/libsass.so => ext/libsass/Makefile
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /Users/bolandrm/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/sassc-1.5.0 for inspection.
Results logged to /Users/bolandrm/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/sassc-1.5.0/gem_make.out

Successful installation of 1.5.1

sassc (master) →  gem install sassc -v '1.5.1'
Fetching: sassc-1.5.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed sassc-1.5.1
1 gem installed

@phillmv
Copy link

phillmv commented Jul 12, 2015

$ gem install sassc -v '1.5.1'
Fetching: sassc-1.5.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed sassc-1.5.1
1 gem installed

Yay! Thanks @bolandrm :D. I look forward to trying this out in sassc-rails!

@scarver2
Copy link
Author

Success! 1.5.1 installs and compiles without issue.

@edward
Copy link
Member

edward commented Jul 13, 2015

I'm having difficulty tracking this issue down. It's likely due to 1f4c9b9. @edward any thoughts?
Prior to that commit, i'm actually not sure how the submodule was being initialized ...

Ah, perhaps we don't even need that submodule initialization in the Rakefile, because the files are being included in the gemspec?

I remember spending a while trying to understand what Rubygems/the gemspec was doing. I believe you’re correct here.

michael-gillett pushed a commit to michael-gillett/sassc-ruby that referenced this issue Apr 25, 2019
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