This works on x86 mac but fails an M1 mac.
$ brew install pkg-config libgd
$ gem install local-fastimage_resize
I suspect it might be something with libgd packaging on M1. But could be something else as well.
I don't have an M1 mac so I can't debug it. I was hoping that somebody with M1 and necessary knowledge can help with this?
Some log Follows. (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 */
--------------------
Asked by akostadinov
(111 rep)
Dec 20, 2022, 12:30 AM
Last activity: Jan 10, 2023, 10:52 AM
Last activity: Jan 10, 2023, 10:52 AM