Esto funciona en mac x86 pero falla en un mac M1.
$ brew install pkg-config libgd
$ gem install local-fastimage_resize
Sospecho que puede ser algo con el empaquetado libgd en M1. Pero podría ser otra cosa también.
No tengo un mac M1 así que no puedo depurarlo. Tenía la esperanza de que alguien con M1 y el conocimiento necesario puede ayudar con esto?
Algún tronco sigue. (gem_make.out)
current directory: /Users/user/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/local-fastimage_resize-3.4.0/ext/fastimage_native_resize
/Users/user/.asdf/installs/ruby/2.6.8/bin/ruby -I /Users/user/.asdf/installs/ruby/2.6.8/lib/ruby/2.6.0 -r ./siteconf20220923-95236-1gspepr.rb extconf.rb --with-gdlib\=/opt/homebrew/Cellar/gd/2.3.3_3
checking for -l/opt/homebrew/Cellar/gd/2.3.3_3... no
missing libgd
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/user/.asdf/installs/ruby/2.6.8/bin/$(RUBY_BASE_NAME)
--with-gdlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/user/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/extensions/arm64-darwin-21/2.6.0/local-fastimage_resize-3.4.0/mkmf.log
extconf failed, exit code 1
(mkmf.log)
have_library: checking for -l/opt/homebrew/Cellar/gd/2.3.3_3... -------------------- no
"clang -o conftest -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/arm64-darwin21 -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/ruby/backward -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0 -I. -I/Users/user/.asdf/installs/ruby/2.6.8/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib -fstack-protector-strong -lruby.2.6 "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"clang -o conftest -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/arm64-darwin21 -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/ruby/backward -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0 -I. -I/Users/user/.asdf/installs/ruby/2.6.8/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib -fstack-protector-strong -lruby.2.6 -l/opt/homebrew/Cellar/gd/2.3.3_3 "
ld: library not found for -l/opt/homebrew/Cellar/gd/2.3.3_3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return 0;
13: }
14:
15: int t(void) { ; return 0; }
/* end */
--------------------