Open avvari-da opened 1 year ago
docker-compose fails at the bundle install step. Please help or direct me to the relevant repo. Thanks!
docker-compose
bundle install
63.33 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 63.33 63.33 current directory: /usr/local/bundle/gems/ruby-debug-ide-0.7.3/ext 63.33 /usr/local/bin/ruby mkrf_conf.rb 63.33 Installing base gem 63.33 Building native extensions. This could take a while... 63.33 Building native extensions. This could take a while... 63.33 ERROR: Failed to build gem native extension. 63.33 63.33 current directory: /usr/local/bundle/gems/debase-0.2.5.beta2/ext 63.33 /usr/local/bin/ruby extconf.rb 63.33 checking for vm_core.h... no 63.33 checking for vm_core.h... no 63.33 ************************************************************************** 63.33 No source for ruby-3.2.2-p53 (revision e51014f9c05aa65cbf203442d37fef7c12390015) 63.33 provided with 63.33 debase-ruby_core_source gem. Falling back to ruby-3.2.0-p0. 63.33 ************************************************************************** 63.33 checking for vm_core.h... yes 63.33 checking for iseq.h... no 63.33 checking for iseq.h... yes 63.33 checking for version.h... yes 63.33 creating Makefile 63.33 63.33 current directory: /usr/local/bundle/gems/debase-0.2.5.beta2/ext 63.33 make DESTDIR\= sitearchdir\=./.gem.20230905-549-yym79b 63.33 sitelibdir\=./.gem.20230905-549-yym79b clean 63.33 63.33 current directory: /usr/local/bundle/gems/debase-0.2.5.beta2/ext 63.33 make DESTDIR\= sitearchdir\=./.gem.20230905-549-yym79b 63.33 sitelibdir\=./.gem.20230905-549-yym79b 63.33 compiling breakpoint.c 63.33 breakpoint.c: In function ‘breakpoint_init_variables’: 63.33 breakpoint.c:297:1: warning: old-style function definition 63.33 [-Wold-style-definition] 63.33 297 | breakpoint_init_variables() 63.33 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 63.33 At top level: 63.33 cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been 63.33 intended to silence earlier diagnostics 63.33 cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have 63.33 been intended to silence earlier diagnostics 63.33 cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may 63.33 have been intended to silence earlier diagnostics 63.33 compiling context.c 63.33 context.c: In function ‘context_init_variables’: 63.33 context.c:366:1: warning: old-style function definition [-Wold-style-definition] 63.33 366 | context_init_variables() 63.33 | ^~~~~~~~~~~~~~~~~~~~~~ 63.33 At top level: 63.33 cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been 63.33 intended to silence earlier diagnostics 63.33 cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have 63.33 been intended to silence earlier diagnostics 63.33 cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may 63.33 have been intended to silence earlier diagnostics 63.33 compiling debase_internals.c 63.33 debase_internals.c: In function ‘print_debug’: 63.33 debase_internals.c:36:3: warning: function ‘print_debug’ might be a candidate 63.33 for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 63.33 36 | vfprintf(stderr, message, ap); 63.33 | ^~~~~~~~ 63.33 debase_internals.c: In function ‘try_disable_trace_points’: 63.33 debase_internals.c:105:1: warning: old-style function definition 63.33 [-Wold-style-definition] 63.33 105 | try_disable_trace_points() 63.33 | ^~~~~~~~~~~~~~~~~~~~~~~~ 63.33 debase_internals.c: In function ‘enable_trace_points’: 63.33 debase_internals.c:128:1: warning: old-style function definition 63.33 [-Wold-style-definition] 63.33 128 | enable_trace_points() 63.33 | ^~~~~~~~~~~~~~~~~~~ 63.33 debase_internals.c: In function ‘count_stack_size’: 63.33 debase_internals.c:316:5: warning: old-style function definition 63.33 [-Wold-style-definition] 63.33 316 | int count_stack_size() { 63.33 | ^~~~~~~~~~~~~~~~ 63.33 debase_internals.c:319:37: warning: initialization discards ‘const’ qualifier 63.33 from pointer target type [-Wdiscarded-qualifiers] 63.33 319 | rb_control_frame_t *start_cfp = 63.33 RUBY_VM_END_CONTROL_FRAME(TH_INFO(thread)); 63.33 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 63.33 debase_internals.c: In function ‘Debase_init_variables’: 63.33 debase_internals.c:728:1: warning: old-style function definition 63.33 [-Wold-style-definition] 63.33 728 | Debase_init_variables() 63.33 | ^~~~~~~~~~~~~~~~~~~~~ 63.33 debase_internals.c: In function ‘Init_debase_internals’: 63.33 debase_internals.c:753:1: warning: old-style function definition 63.33 [-Wold-style-definition] 63.33 753 | Init_debase_internals() 63.33 | ^~~~~~~~~~~~~~~~~~~~~ 63.33 In file included from /usr/local/include/ruby-3.2.0/ruby/ruby.h:27, 63.33 from /usr/local/include/ruby-3.2.0/ruby.h:38, 63.33 from ./debase_internals.h:4, 63.33 from debase_internals.c:1: 63.33 /usr/local/include/ruby-3.2.0/ruby/internal/anyargs.h:338:142: warning: passing 63.33 argument 3 of ‘rb_define_module_function_01’ from incompatible pointer type 63.33 [-Wincompatible-pointer-types] 63.33 338 | #define rb_define_module_function(mod, mid, func, arity) 63.33 RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), 63.33 (func), (arity)) 63.33 | 63.33 ^~~~~~ 63.33 | 63.33 | 63.33 | 63.33 void (*)(VALUE, VALUE) {aka void (*)(long unsigned int, long unsigned int)} 63.33 debase_internals.c:770:3: note: in expansion of macro 63.33 ‘rb_define_module_function’ 63.33 770 | rb_define_module_function(mDebase, "set_trace_flag_to_iseq", 63.33 Debase_set_trace_flag_to_iseq, 1); 63.33 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 63.33 /usr/local/include/ruby-3.2.0/ruby/internal/anyargs.h:274:21: note: expected 63.33 ‘VALUE (*)(VALUE, VALUE)’ {aka ‘long unsigned int (*)(long unsigned int, long 63.33 unsigned int)’} but argument is of type ‘void (*)(VALUE, VALUE)’ {aka ‘void 63.33 (*)(long unsigned int, long unsigned int)’} 63.33 274 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *) 63.33 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 63.33 /usr/local/include/ruby-3.2.0/ruby/internal/anyargs.h:256:41: note: in 63.33 definition of macro ‘RBIMPL_ANYARGS_DECL’ 63.33 256 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, 63.33 VALUE(*)(VALUE, VALUE), int); \ 63.33 | ^~~ 63.33 /usr/local/include/ruby-3.2.0/ruby/internal/anyargs.h:338:142: warning: passing 63.33 argument 3 of ‘rb_define_module_function_01’ from incompatible pointer type 63.33 [-Wincompatible-pointer-types] 63.33 338 | #define rb_define_module_function(mod, mid, func, arity) 63.33 RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), 63.33 (func), (arity)) 63.33 | 63.33 ^~~~~~ 63.33 | 63.33 | 63.33 | 63.33 void (*)(VALUE, VALUE) {aka void (*)(long unsigned int, long unsigned int)} 63.33 debase_internals.c:773:3: note: in expansion of macro 63.33 ‘rb_define_module_function’ 63.33 773 | rb_define_module_function(mDebase, "unset_iseq_flags", 63.33 Debase_unset_trace_flags, 1); 63.33 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 63.33 /usr/local/include/ruby-3.2.0/ruby/internal/anyargs.h:274:21: note: expected 63.33 ‘VALUE (*)(VALUE, VALUE)’ {aka ‘long unsigned int (*)(long unsigned int, long 63.33 unsigned int)’} but argument is of type ‘void (*)(VALUE, VALUE)’ {aka ‘void 63.33 (*)(long unsigned int, long unsigned int)’} 63.33 274 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *) 63.33 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 63.33 /usr/local/include/ruby-3.2.0/ruby/internal/anyargs.h:256:41: note: in 63.33 definition of macro ‘RBIMPL_ANYARGS_DECL’ 63.33 256 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, 63.33 VALUE(*)(VALUE, VALUE), int); \ 63.33 | ^~~ 63.33 At top level: 63.33 cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been 63.33 intended to silence earlier diagnostics 63.33 cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have 63.33 been intended to silence earlier diagnostics 63.33 cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may 63.33 have been intended to silence earlier diagnostics 63.33 Assembler messages: 63.33 Fatal error: can't create debase_internals.o: No such file or directory 63.33 make: *** [Makefile:248: debase_internals.o] Error 1 63.33 63.33 make failed, exit code 2 63.33 63.33 Gem files will remain installed in /usr/local/bundle/gems/debase-0.2.5.beta2 for 63.33 inspection. 63.33 Results logged to 63.33 /usr/local/bundle/extensions/aarch64-linux/3.2.0/debase-0.2.5.beta2/gem_make.out 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:119:in `run' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:51:in `block in make' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:43:in `each' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:43:in `make' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:41:in `build' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:187:in `build_extension' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:221:in `block in 63.33 build_extensions' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `each' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `build_extensions' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/installer.rb:326:in `install' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/resolver/specification.rb:104:in `install' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:279:in `block in 63.33 install_into' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:271:in `each' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:271:in `install_into' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:147:in `install' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/dependency_installer.rb:252:in `install' 63.33 mkrf_conf.rb:31:in `rescue in <main>' 63.33 mkrf_conf.rb:24:in `<main>' 63.33 63.33 rake failed, exit code 1 63.33 63.33 Gem files will remain installed in /usr/local/bundle/gems/ruby-debug-ide-0.7.3 63.33 for inspection. 63.33 Results logged to 63.33 /usr/local/bundle/extensions/aarch64-linux/3.2.0/ruby-debug-ide-0.7.3/gem_make.out 63.33 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:119:in `run' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/rake_builder.rb:11:in `build' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:187:in `build_extension' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:221:in `block in 63.33 build_extensions' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `each' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `build_extensions' 63.33 /usr/local/lib/ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/rubygems_gem_installer.rb:72:in 63.33 `build_extensions' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/rubygems_gem_installer.rb:28:in 63.33 `install' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/source/rubygems.rb:202:in 63.33 `install' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/installer/gem_installer.rb:54:in 63.33 `install' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/installer/gem_installer.rb:16:in 63.33 `install_from_spec' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/installer/parallel_installer.rb:156:in 63.33 `do_install' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/installer/parallel_installer.rb:147:in 63.33 `block in worker_pool' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/worker.rb:62:in `apply_func' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/worker.rb:57:in `block in 63.33 process_queue' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/worker.rb:54:in `loop' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/worker.rb:54:in 63.33 `process_queue' 63.33 /usr/local/bundle/gems/bundler-2.4.19/lib/bundler/worker.rb:90:in `block (2 63.33 levels) in create_threads' 63.33 63.33 An error occurred while installing ruby-debug-ide (0.7.3), and Bundler cannot 63.33 continue. 63.33 63.33 In Gemfile: 63.33 ruby-debug-ide ------ failed to solve: process "/bin/sh -c bundle install --retry 3 --jobs 4" did not complete successfully: exit code: 5
Ruby: 3.2.2 Rails: 7.0.7.2 Bundler: 2.4.19 Docker: 24.0.5 MacOS: Sonoma v14.0 (Apple M1 Pro)
``` # Base image FROM ruby:3.2.2 # Installation of dependencies RUN apt-get update && \ apt-get install -y build-essential netcat-traditional gnupg default-mysql-client vim libjemalloc2 # Setup environment variables that will be available to the instance ENV LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2 ENV APP_HOME /var/www/app ENV RAILS_LOG_TO_STDOUT true # Create directories for our application RUN mkdir -p $APP_HOME RUN mkdir -p /tmp/sockets RUN mkdir -p /tmp/pids RUN mkdir -p /tmp/log RUN mkdir -p -m 0700 ~/.ssh # touch necessary files RUN touch /tmp/pids/puma.pid RUN touch /tmp/pids/puma.state RUN touch /tmp/log/puma.stderr.log RUN touch /tmp/log/puma.stdout.log RUN touch /tmp/sockets/puma.sock RUN chmod a+rw /tmp/sockets/puma.sock # Set working directory WORKDIR $APP_HOME # Copy over our application code # Add our Gemfile # and install gems COPY Gemfile $APP_HOME/ COPY Gemfile.lock $APP_HOME/ RUN gem install bundler RUN bundle install --retry 3 --jobs 4 RUN gem cleanup rake ARG GITHUB_SHA ENV GIT_SHA "$GITHUB_SHA" COPY . $APP_HOME # Disable warning # RUN bundle exec skylight disable_dev_warning EXPOSE 3000 ENTRYPOINT ["sh", "./config/docker/entrypoint.sh"] ```
Hello @avvari-da, I have the same issue. Do you have found any way to work with ?
I have the same issue. system: Mac M3, Sonoma 14.5 Ruby: 3.2.3 Bundler: 2.5.15
Anyone has a solution?
docker-compose
fails at thebundle install
step. Please help or direct me to the relevant repo. Thanks!Error:
Version Info:
Ruby: 3.2.2 Rails: 7.0.7.2 Bundler: 2.4.19 Docker: 24.0.5 MacOS: Sonoma v14.0 (Apple M1 Pro)
Dockerfile
``` # Base image FROM ruby:3.2.2 # Installation of dependencies RUN apt-get update && \ apt-get install -y build-essential netcat-traditional gnupg default-mysql-client vim libjemalloc2 # Setup environment variables that will be available to the instance ENV LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2 ENV APP_HOME /var/www/app ENV RAILS_LOG_TO_STDOUT true # Create directories for our application RUN mkdir -p $APP_HOME RUN mkdir -p /tmp/sockets RUN mkdir -p /tmp/pids RUN mkdir -p /tmp/log RUN mkdir -p -m 0700 ~/.ssh # touch necessary files RUN touch /tmp/pids/puma.pid RUN touch /tmp/pids/puma.state RUN touch /tmp/log/puma.stderr.log RUN touch /tmp/log/puma.stdout.log RUN touch /tmp/sockets/puma.sock RUN chmod a+rw /tmp/sockets/puma.sock # Set working directory WORKDIR $APP_HOME # Copy over our application code # Add our Gemfile # and install gems COPY Gemfile $APP_HOME/ COPY Gemfile.lock $APP_HOME/ RUN gem install bundler RUN bundle install --retry 3 --jobs 4 RUN gem cleanup rake ARG GITHUB_SHA ENV GIT_SHA "$GITHUB_SHA" COPY . $APP_HOME # Disable warning # RUN bundle exec skylight disable_dev_warning EXPOSE 3000 ENTRYPOINT ["sh", "./config/docker/entrypoint.sh"] ```