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

Install problem #125

Closed
mosabua opened this issue Nov 11, 2020 · 6 comments
Closed

Install problem #125

mosabua opened this issue Nov 11, 2020 · 6 comments

Comments

@mosabua
Copy link

mosabua commented Nov 11, 2020

I am using liquid-c in my jekyll based site and cant seem to get it to install on one workstation.

Ruby is installed with brew and the usual configurations are in place. I reinstalled Ruby and did a bunch of other trials, but always end up with this problem. The same site and setup works on other machines and on this machine with using jekyll-docker.

Any tip on what to look at?


Here is the error message I am getting:

Using liquid-c 4.0.0 from https://github.com/Shopify/liquid-c.git (at v4.0.0@8196106)
/usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/ext/builder.rb:167: warning: conflicting chdir during another chdir block
/usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/ext/builder.rb:175: warning: conflicting chdir during another chdir block
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/manfred/dev/github/org/site/vendor/bundle/ruby/2.7.0/bundler/gems/liquid-c-81961067cdaa/ext/liquid_c
/usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0 -r
./siteconf20201110-2586-1tp1kmp.rb extconf.rb
creating Makefile

current directory:
/Users/manfred/dev/github/org/site/vendor/bundle/ruby/2.7.0/bundler/gems/liquid-c-81961067cdaa/ext/liquid_c
make "DESTDIR=" clean

current directory:
/Users/manfred/dev/github/org/site/vendor/bundle/ruby/2.7.0/bundler/gems/liquid-c-81961067cdaa/ext/liquid_c
make "DESTDIR="
compiling block.c
error: unknown warning option '-Wmisleading-indentation'; did you mean
'-Wbinding-in-condition'? [-Werror,-Wunknown-warning-option]
make: *** [block.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/Users/manfred/dev/github/org/site/vendor/bundle/ruby/2.7.0/bundler/gems/liquid-c-81961067cdaa
for inspection.
Results logged to
/Users/manfred/dev/github/org/site/vendor/bundle/ruby/2.7.0/bundler/gems/extensions/x86_64-darwin-19/2.7.0/liquid-c-81961067cdaa/gem_make.out

An error occurred while installing liquid-c (4.0.0), and Bundler cannot
continue.

In Gemfile:
  liquid-c
@mosabua
Copy link
Author

mosabua commented Nov 11, 2020

And btw on the same machine I can build liquid-c ..

@dylanahsmith
Copy link
Contributor

Looks like other gems get that warning and it is just that liquid-c is being compiled with -Werror which turns warnings into errors. Seems like we need to backport #124 to workaround this problem. Although, it also seems like homebrew should be able to install ruby in a way that doesn't cause this warning, since this doesn't seem to be a problem with ruby on CI or the one I installed locally using ruby-install

And btw on the same machine I can build liquid-c ..

Do you mean using liquid-c master?

@dylanahsmith
Copy link
Contributor

It seems like this option it is complaining about is coming from https://github.com/ruby/ruby/blob/v2_7_2/configure.ac#L513 where it seems like the option is being added to CFLAGS by ruby's configure script if it is supported. Those same CFLAGS then get used to compile extensions. Homebrew uses pre-compiled binaries, so I think the compiler used to build the pre-compiled binary supports this flag, but the local compiler doesn't.

So you may want to try running MacOS software updates to see if this fixes the issue, since it may be that you are using an older version of Xcode compared to the one to build pre-compiled binaries for homebrew.

@mosabua
Copy link
Author

mosabua commented Nov 16, 2020

A couple of things:

  • Thanks so much for the fast reply .. super awesome
  • yes.. I can build liquid-c master as described in the readme
  • I don't even have xcode or so installed and my macos is up to date now, problem persists, should I install xcode?

@mosabua
Copy link
Author

mosabua commented Jan 18, 2022

I gave up on liquid-c ..

@mosabua mosabua closed this as completed Jan 18, 2022
@zuriknet
Copy link

Run

bundle config set --local path 'vendor/bundle'
bundle install

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

3 participants