From: mail@... Date: 2021-02-24T18:37:18+00:00 Subject: [ruby-core:102595] [Ruby master Bug#17486] Build fails on darwin due to libtool being removed Issue #17486 has been updated by charlesbjohnson (Charles Johnson). charlesbjohnson (Charles Johnson) wrote in #note-8: > nobu (Nobuyoshi Nakada) wrote in #note-7: > > Could you show mkmf.log file for a failed extension? > > Here's what I have for `ext/bigdecimal/mkmf.log`: https://gist.github.com/charlesbjohnson/1b280cd5fe041824de68dd04bc6fafe1 Good news is that I was able to build 3.0.0. The culprit appeared to be that I'm using the GNU `coreutils` and related packages (ie. `gmake` instead of `make`) installed from Homebrew instead of the usual binaries that come included with macOS. When I unlinked them and used the macOS binaries I was able to build without issue. For what it's worth, though, I've never ran into this issue with previous Ruby releases. ---------------------------------------- Bug #17486: Build fails on darwin due to libtool being removed https://bugs.ruby-lang.org/issues/17486#change-90580 * Author: dark.panda (J Smith) * Status: Feedback * Priority: Normal * ruby -v: ruby 3.0.0p0 (2020-12-25 revision ccb58c9f76) [x86_64-darwin18] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- The following commit is causing builds in master and for the recently released Ruby 3.0.0 to fail on darwin. This was tested on macOS Mojave using the most recent XCode and Mojave patches. The error reported is as follows: ``` compiling bigdecimal.c In file included from bigdecimal.c:13: ./bigdecimal.h:122:1: error: redefinition of 'rb_array_const_ptr' rb_array_const_ptr(VALUE a) ^ ../.././include/ruby/internal/core/rarray.h:184:1: note: previous definition is here rb_array_const_ptr(VALUE a) ^ In file included from bigdecimal.c:13: ./bigdecimal.h:139:1: error: static declaration of 'rb_sym2str' follows non-static declaration rb_sym2str(VALUE sym) ^ ../.././include/ruby/internal/symbol.h:63:7: note: previous declaration is here VALUE rb_sym2str(VALUE); ^ bigdecimal.c:109:1: error: static declaration of 'rb_rational_num' follows non-static declaration rb_rational_num(VALUE rat) ^ ../.././include/ruby/internal/intern/rational.h:39:7: note: previous declaration is here VALUE rb_rational_num(VALUE rat); ^ bigdecimal.c:121:1: error: static declaration of 'rb_rational_den' follows non-static declaration rb_rational_den(VALUE rat) ^ ../.././include/ruby/internal/intern/rational.h:40:7: note: previous declaration is here VALUE rb_rational_den(VALUE rat); ^ bigdecimal.c:133:1: error: static declaration of 'rb_complex_real' follows non-static declaration rb_complex_real(VALUE cmp) ^ ../.././include/ruby/internal/intern/complex.h:38:7: note: previous declaration is here VALUE rb_complex_real(VALUE z); ^ bigdecimal.c:145:1: error: static declaration of 'rb_complex_imag' follows non-static declaration rb_complex_imag(VALUE cmp) ^ ../.././include/ruby/internal/intern/complex.h:39:7: note: previous declaration is here VALUE rb_complex_imag(VALUE z); ^ 6 errors generated. make[2]: *** [bigdecimal.o] Error 1 make[1]: *** [ext/bigdecimal/all] Error 2 make: *** [build-ext] Error 2 ``` Reverting the following commit allows the build to run successfully: https://github.com/ruby/ruby/commit/ed01cc8fdc845b1db258eb3e35b3ba834463672e After reverting this commit on either master or the v3_0_0 tag, I was able to successfully build again. -- https://bugs.ruby-lang.org/ Unsubscribe: