fastlane-community / fastlane-plugin-appicon

Generate required icon sizes and iconset from a master application icon.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install fails

RWOverdijk opened this issue · comments

Running the command from the readme results in the following output:

[09:01:48]: Make sure to commit your Gemfile, Gemfile.lock and Pluginfile to version control
Installing plugin dependencies...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/unf_ext-0.0.7.3/ext/unf_ext
/Users/rwoverdijk/.fastlane/bin/bundle/bin/ruby -r ./siteconf20170413-68829-6l16co.rb extconf.rb
checking for main() in -lstdc++... *** 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/rwoverdijk/.fastlane/bin/bundle/bin/$(RUBY_BASE_NAME)
	--with-static-libstdc++
	--without-static-libstdc++
	--with-stdc++lib
	--without-stdc++lib
/Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:556:in `try_link'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:735:in `try_func'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:966:in `block in have_library'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:321:in `open'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:321:in `open'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
	from /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:961:in `have_library'
	from extconf.rb:6:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/unf_ext-0.0.7.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/unf_ext-0.0.7.3 for inspection.
Results logged to /Users/rwoverdijk/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/unf_ext-0.0.7.3/gem_make.out

Installing unf_ext manually works:

$ sudo gem install unf_ext -v '0.0.7.3'
Building native extensions.  This could take a while...
Successfully installed unf_ext-0.0.7.3
Parsing documentation for unf_ext-0.0.7.3
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/unf_ext.bundle, skipping
1 gem installed

It's failing for me as well.

Installing plugin dependencies...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/stephanepping/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
/Users/stephanepping/.fastlane/bin/bundle/bin/ruby -r ./siteconf20170626-25816-1p6ai92.rb extconf.rb
creating Makefile

current directory: /Users/stephanepping/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /Users/stephanepping/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
clang: warning: no such sysroot directory: '/Applications/Xcode-7.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk' [-Wmissing-sysroot]
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /Users/stephanepping/.fastlane/bin/bundle/include/ruby-2.2.0/ruby.h:33:
In file included from /Users/stephanepping/.fastlane/bin/bundle/include/ruby-2.2.0/ruby/ruby.h:29:
/Users/stephanepping/.fastlane/bin/bundle/include/ruby-2.2.0/ruby/defines.h:26:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/stephanepping/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/json-2.1.0 for inspection.
Results logged to /Users/stephanepping/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/json-2.1.0/gem_make.out

An error occurred while installing json (2.1.0), and Bundler cannot continue.
Make sure that `gem install json -v '2.1.0'` succeeds before bundling.

@RWOverdijk @kaelumania can you please share your mkmf.log file content so we can inspect further?

@felipeplets I am having the same problem.

Error message:

[13:54:55]: Make sure to commit your Gemfile, Gemfile.lock and Pluginfile to version control
Installing plugin dependencies...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/unf_ext-0.0.7.4/ext/unf_ext
/Users/alysonzepeda/.fastlane/bin/bundle/bin/ruby -r ./siteconf20170723-87936-qkm1ru.rb extconf.rb 
checking for main() in -lstdc++... *** 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/alysonzepeda/.fastlane/bin/bundle/bin/$(RUBY_BASE_NAME)
	--with-static-libstdc++
	--without-static-libstdc++
	--with-stdc++lib
	--without-stdc++lib
/Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed
to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:556:in `try_link'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:735:in `try_func'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:966:in `block in have_library'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'
from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in
postpone'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:321:in `open'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:321:in `open'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
	from /Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:961:in `have_library'
	from extconf.rb:6:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/unf_ext-0.0.7.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/unf_ext-0.0.7.4 for inspection.
Results logged to
/Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/unf_ext-0.0.7.4/gem_make.out

An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4'` succeeds before bundling.

I installed unf_ext but it doesn't resolve the issue.

$ gem install unf_ext -v '0.0.7.4'
Fetching: unf_ext-0.0.7.4.gem (100%)
Building native extensions.  This could take a while...
Successfully installed unf_ext-0.0.7.4
Parsing documentation for unf_ext-0.0.7.4
Installing ri documentation for unf_ext-0.0.7.4
Done installing documentation for unf_ext after 1 seconds
1 gem installed

mkmf.log

"/usr/bin/clang -o conftest -I/Users/alysonzepeda/.fastlane/bin/bundle/include/ruby-2.2.0/x86_64-darwin15 -I/Users/alysonzepeda/.fastlane/bin/bundle/include/ruby-2.2.0/ruby/backward -I/Users/alysonzepeda/.fastlane/bin/bundle/include/ruby-2.2.0 -I. -I/Users/crashlytics/buildAgent/work/2484be8b71880c21/bundle-2.13.0/fastlane_lib/dependencies/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -mmacosx-version-min=10.10 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -pipe conftest.c  -L. -L/Users/alysonzepeda/.fastlane/bin/bundle/lib -L. -L/Users/crashlytics/buildAgent/work/2484be8b71880c21/bundle-2.13.0/fastlane_lib/dependencies/lib -fstack-protector     -lruby-static -framework CoreFoundation  -lpthread -ldl -lobjc "
ld: warning: directory not found for option '-L/Users/crashlytics/buildAgent/work/2484be8b71880c21/bundle-2.13.0/fastlane_lib/dependencies/lib'
ld: library not found for -lruby-static
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

In a desperate attempt to get more information based one this line in the mkmf.log clang: error: linker command failed with exit code 1 (use -v to see invocation) , I added -v
It worked. I can only guess that the command required any kind of config option at all, even if it was invalid.
¯_(ツ)_/¯

$ sudo fastlane add_plugin appicon -v
Password:
fastlane update available
Please run `brew update && brew cask reinstall fastlane`
fastlane installation at path:
/Users/alysonzepeda/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.47.0/bin/fastlane
-----------------------------
fastlane 2.47.0

i had installed fastlane using brew cask install fastlane and i was getting the same error message as @kaelumania.
i did the following:
sudo rm -rf ~/.fastlane
sudo gem install fastlane
sudo fastlane add_plugin appicon
and it worked

Managed to get it working using:

bundle exec fastlane add_plugin appicon

As stated here: joshrlesch/fastlane-plugin-instrumented_tests#7 (comment)

Hello :)

I've used rbenv to manage Ruby version, (v2.1.4)
And then used bundle exec fastlane add_plugin appicon to fix