[ https://issues.apache.org/jira/browse/FLINK-27554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17536970#comment-17536970 ]
Xintong Song edited comment on FLINK-27554 at 5/14/22 5:42 AM: --------------------------------------------------------------- I've made a little progress on this. I ran into the same error with the `docker-build.sh`. Inspired by this [comment|https://github.com/rubyjs/libv8/issues/315#issuecomment-846475866], I tried with the `amd64` image, and it worked! The full command is: {code:java} docker run --rm --volume="$PWD:/srv/flink-web" --expose=4000 -p 4000:4000 -it --platform linux/amd64 ruby:2.6.0 bash -c "cd /srv/flink-web && gem install bundler && ./build.sh $@"{code} Unfortunately, while this works for `./docker-build.sh` (the generated HTML files look good), I ran into another error with `./docker-build.sh -p`. {code:java} Configuration file: /srv/flink-web/_config.yml Source: /srv/flink-web Destination: /srv/flink-web/content Incremental build: disabled. Enable with --incremental Generating... done in 85.06 seconds. bundler: failed to load command: jekyll (/srv/flink-web/.rubydeps/ruby/2.6.0/bin/jekyll) Traceback (most recent call last): 40: from /usr/local/bundle/bin/bundle:23:in `<main>' 39: from /usr/local/bundle/bin/bundle:23:in `load' 38: from /usr/local/bundle/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>' 37: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors' 36: from /usr/local/bundle/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>' 35: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start' 34: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' 33: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch' 32: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' 31: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 30: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 29: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec' 28: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run' 27: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load' 26: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load' 25: from /srv/flink-web/.rubydeps/ruby/2.6.0/bin/jekyll:23:in `<top (required)>' 24: from /srv/flink-web/.rubydeps/ruby/2.6.0/bin/jekyll:23:in `load' 23: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/bin/jekyll:17:in `<top (required)>' 22: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 21: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 20: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 19: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 18: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 17: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program' 16: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/lib/jekyll/commands/build.rb:39:in `process' 15: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/lib/jekyll/commands/build.rb:72:in `watch' 14: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-watch-1.5.1/lib/jekyll/watcher.rb:26:in `watch' 13: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/listener.rb:92:in `start' 12: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:72:in `transition' 11: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:105:in `transition_with_callbacks!' 10: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:124:in `call' 9: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:124:in `instance_eval' 8: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/listener.rb:71:in `block in <class:Listener>' 7: from /usr/local/lib/ruby/2.6.0/forwardable.rb:230:in `start' 6: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:66:in `start' 5: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:42:in `configure' 4: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:42:in `each' 3: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:47:in `block in configure' 2: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/linux.rb:29:in `_configure' 1: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/linux.rb:29:in `new' /srv/flink-web/.rubydeps/ruby/2.6.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize': Function not implemented - Failed to initialize inotify (Errno::ENOSYS) {code} I did a little search. It seems `inotify` is something used for watching file changes, which is not available on M1, and `jekyll` tries to load it even in the non-incremental mode. I don't find a good solution to this. So in conclusion, *I'm able to build the website locally, but not able to preview it.* I guess that's not really helpful. was (Author: xintongsong): I've made a little progress on this. I ran into the same error with the `docker-build.sh`. Inspired by this [comment|https://github.com/rubyjs/libv8/issues/315#issuecomment-846475866], I tried with the `amd64` image, and it worked! The full command is: {code:java} docker run --rm --volume="$PWD:/srv/flink-web" --expose=4000 -p 4000:4000 -it --platform linux/amd64 ruby:2.6.0 bash -c "cd /srv/flink-web && gem install bundler && ./build.sh $@"{code} Unfortunately, while this works for `./docker-build.sh` (the generated HTML files look good), I ran into another error with `./docker-build.sh -p`. {code:java} Configuration file: /srv/flink-web/_config.yml Source: /srv/flink-web Destination: /srv/flink-web/content Incremental build: disabled. Enable with --incremental Generating... done in 85.06 seconds. bundler: failed to load command: jekyll (/srv/flink-web/.rubydeps/ruby/2.6.0/bin/jekyll) Traceback (most recent call last): 40: from /usr/local/bundle/bin/bundle:23:in `<main>' 39: from /usr/local/bundle/bin/bundle:23:in `load' 38: from /usr/local/bundle/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>' 37: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors' 36: from /usr/local/bundle/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>' 35: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start' 34: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' 33: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch' 32: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' 31: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 30: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 29: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec' 28: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run' 27: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load' 26: from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load' 25: from /srv/flink-web/.rubydeps/ruby/2.6.0/bin/jekyll:23:in `<top (required)>' 24: from /srv/flink-web/.rubydeps/ruby/2.6.0/bin/jekyll:23:in `load' 23: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/bin/jekyll:17:in `<top (required)>' 22: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 21: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 20: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 19: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 18: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 17: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program' 16: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/lib/jekyll/commands/build.rb:39:in `process' 15: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-3.0.5/lib/jekyll/commands/build.rb:72:in `watch' 14: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/jekyll-watch-1.5.1/lib/jekyll/watcher.rb:26:in `watch' 13: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/listener.rb:92:in `start' 12: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:72:in `transition' 11: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:105:in `transition_with_callbacks!' 10: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:124:in `call' 9: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/fsm.rb:124:in `instance_eval' 8: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/listener.rb:71:in `block in <class:Listener>' 7: from /usr/local/lib/ruby/2.6.0/forwardable.rb:230:in `start' 6: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:66:in `start' 5: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:42:in `configure' 4: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:42:in `each' 3: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:47:in `block in configure' 2: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/linux.rb:29:in `_configure' 1: from /srv/flink-web/.rubydeps/ruby/2.6.0/gems/listen-3.7.1/lib/listen/adapter/linux.rb:29:in `new' /srv/flink-web/.rubydeps/ruby/2.6.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize': Function not implemented - Failed to initialize inotify (Errno::ENOSYS) {code} I did a little search. It seems `inotify` is something used for watching file changes, which is not available on M1, and `jekyll` tries to load it even in the non-incremental mode. I don't find a good solution to this. So in conclusion, *I'm able to build the website locally, but not able to preview it.* I guess that's not really helpful. > The asf-site does not build on Apple Silicon > -------------------------------------------- > > Key: FLINK-27554 > URL: https://issues.apache.org/jira/browse/FLINK-27554 > Project: Flink > Issue Type: Sub-task > Components: Project Website > Affects Versions: 1.15.0 > Reporter: Jiangjie Qin > Priority: Major > > It looks that the ASF website does not build on my laptop with Apple silicon. > It errors out when installing libv8 via the following command: > {noformat} > gem install libv8 -v '3.16.14.19' --source 'https://rubygems.org/' > {noformat} > The error logs are following: > {noformat} > current directory: /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/ext/libv8 > /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I > /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r > ./siteconf20220509-16154-19vsxkp.rb extconf.rb > creating Makefile > Applying > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/patches/disable-building-tests.patch > Applying > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/patches/disable-werror-on-osx.patch > Applying > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/patches/disable-xcode-debugging.patch > Applying > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/patches/do-not-imply-vfp3-and-armv7.patch > Applying > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/patches/do-not-use-MAP_NORESERVE-on-freebsd.patch > Applying > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/patches/do-not-use-vfp2.patch > Applying > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/patches/fPIC-for-static.patch > Compiling v8 for x64 > Using python 2.7.18 > Using compiler: c++ (clang version 13.1.6) > Unable to find a compiler officially supported by v8. > It is recommended to use GCC v4.4 or higher > Beginning compilation. This will take some time. > Building v8 with env CXX=c++ LINK=c++ /usr/bin/make x64.release vfp2=off > vfp3=on hardfp=on ARFLAGS.target=crs werror=no > GYP_GENERATORS=make \ > build/gyp/gyp --generator-output="out" build/all.gyp \ > -Ibuild/standalone.gypi --depth=. \ > -Dv8_target_arch=x64 \ > -S.x64 -Dv8_enable_backtrace=1 > -Dv8_can_use_vfp2_instructions=false -Dv8_can_use_vfp3_instructions=true > -Darm_fpu=vfpv3 -Dwerror='' -Dv8_use_arm_eabi_hardfloat=true > CXX(target) > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o > clang: warning: include path for libstdc++ headers not found; pass > '-stdlib=libc++' on the command line to use the libc++ standard library > instead [-Wstdlibcxx-not-found] > In file included from ../src/allocation.cc:33: > ../src/utils.h:33:10: fatal error: 'climits' file not found > #include <climits> > ^~~~~~~~~ > 1 error generated. > make[1]: *** > [/Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o] > Error 1 > make: *** [x64.release] Error 2 > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:36:in > `block in verify_installation!': libv8 did not install properly, expected > binary v8 archive > '/Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to > exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound) > from > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:35:in > `each' > from > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:35:in > `verify_installation!' > from > /Library/Ruby/Gems/2.6.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:26:in > `install!' > from extconf.rb:7:in `<main>' > > extconf failed, exit code 1 > {noformat} -- This message was sent by Atlassian Jira (v8.20.7#820007)