website icon indicating copy to clipboard operation
website copied to clipboard

Can't run `make up` on AArch64

Open johnpryan opened this issue 2 years ago • 1 comments

Describe the problem

I had to run extra commands in my Docker container to get the site running on an Apple M1 Pro processor:

$ docker compose run site bash
$  gem install nokogiri --platform=ruby
$ bundle config set force_ruby_platform true
$ make setup
$ make serve

These commands were recommended the first time I ran make up, see the logs below for details.

Expected fix

Add instructions for Apple Silicon and/or update Dockerfile

Additional context

Logs
docker compose run site bash
root@713f358589fc:/app# make serve
bundle exec jekyll serve \
	--host 0.0.0.0 \
	--port 4002 \
	--config _config.yml,_config_dev.yml \
	--livereload \
	--incremental \
	--trace

ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system with glibc < 2.17:

  /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so

  If that's the case, then please install Nokogiri via the `ruby` platform gem:
      gem install nokogiri --platform=ruby
  or:
      bundle config set force_ruby_platform true

  Please visit https://nokogiri.org/tutorials/installing_nokogiri.html for more help.

bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
/usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:7:in `require_relative': /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so (LoadError)
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:7:in `<top (required)>'
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in `require_relative'
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in `<top (required)>'
	from /usr/local/bundle/gems/jekyll-toc-0.17.1/lib/jekyll-toc.rb:3:in `require'
	from /usr/local/bundle/gems/jekyll-toc-0.17.1/lib/jekyll-toc.rb:3:in `<top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/runtime.rb:60:in `require'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/runtime.rb:55:in `each'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/runtime.rb:55:in `block in require'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/runtime.rb:44:in `each'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/runtime.rb:44:in `require'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler.rb:176:in `require'
	from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-4.2.0/exe/jekyll:11:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:25:in `load'
	from /usr/local/bundle/bin/jekyll:25:in `<top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/cli/exec.rb:58:in `load'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/cli/exec.rb:23:in `run'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/cli.rb:483:in `exec'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/cli.rb:31:in `dispatch'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/cli.rb:25:in `start'
	from /usr/local/bundle/gems/bundler-2.3.9/exe/bundle:48:in `block in <top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /usr/local/bundle/gems/bundler-2.3.9/exe/bundle:36:in `<top (required)>'
	from /usr/local/bundle/bin/bundle:23:in `load'
	from /usr/local/bundle/bin/bundle:23:in `<main>'
make: *** [Makefile:63: serve] Error 1
root@713f358589fc:/app# bundle config set force_ruby_platform true
root@713f358589fc:/app# make serve
bundle exec jekyll serve \
	--host 0.0.0.0 \
	--port 4002 \
	--config _config.yml,_config_dev.yml \
	--livereload \
	--incremental \
	--trace
Configuration file: /app/_config.yml
Configuration file: /app/_config_dev.yml
            Source: /app/src
       Destination: /app/_site
 Incremental build: enabled
      Generating... 
YAML Exception reading /app/src/release/breaking-changes/notifications.md: (<unknown>): could not find expected ':' while scanning a simple key at line 4 column 1 

johnpryan avatar Mar 30 '22 19:03 johnpryan

Brian should have fixed this in #7055. Does it work for you normally now, @johnpryan?

khanhnwin avatar May 03 '22 17:05 khanhnwin

make up is now working for me on an apple silicon device, even without Rosetta installed. Closing this as fixed.

parlough avatar Nov 21 '22 21:11 parlough