ERROR to install zendesk_apps_tools
I have tried to install zendesk_apps_tools on my MacOS ( Version 10.15.7 ) on my bash terminal installed
Ruby version 2.7.2
GEM 3.1.4
Brew 2.5.4
Everything has been set up correctly and I tied to follow the instructions which mentioned on this link https://develop.zendesk.com/hc/en-us/articles/360001075048#topic_wxt_wqm_1l
But I am getting the error while I am installing the tools and need help to fix this issue.
->gem install zendesk_apps_tools
Building native extensions. This could take a while...
ERROR: Error installing zendesk_apps_tools:
ERROR: Failed to build gem native extension.
current directory: /Users/ali.jamali/.rvm/gems/ruby-2.7.2/gems/thin-1.7.2/ext/thin_parser
/Users/ali.jamali/.rvm/rubies/ruby-2.7.2/bin/ruby -I /Users/ali.jamali/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0 -r ./siteconf20201008-3733-7ocnn8.rb extconf.rb
checking for main() in -lc... yes
creating Makefile
current directory: /Users/ali.jamali/.rvm/gems/ruby-2.7.2/gems/thin-1.7.2/ext/thin_parser
make "DESTDIR=" clean
current directory: /Users/ali.jamali/.rvm/gems/ruby-2.7.2/gems/thin-1.7.2/ext/thin_parser
make "DESTDIR="
compiling parser.c
parser.c:31:18: warning: unused variable 'http_parser_en_main' [-Wunused-const-variable]
static const int http_parser_en_main = 1;
^
1 warning generated.
compiling thin.c
thin.c:242:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(hp);
^
thin.c:242:3: note: did you mean 'http_parser_init'?
./parser.h:41:5: note: 'http_parser_init' declared here
int http_parser_init(http_parser *parser);
^
thin.c:260:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(http);
^
thin.c:277:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(http);
^
thin.c:294:3: error: implicit declaration of function 'thin_http_parser_finish' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_finish(http);
^
thin.c:294:3: note: did you mean 'Thin_HttpParser_finish'?
thin.c:290:7: note: 'Thin_HttpParser_finish' declared here
VALUE Thin_HttpParser_finish(VALUE self)
^
thin.c:296:10: error: implicit declaration of function 'thin_http_parser_is_finished' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
^
thin.c:334:5: error: implicit declaration of function 'thin_http_parser_execute' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_execute(http, dptr, dlen, from);
^
thin.c:334:5: note: did you mean 'Thin_HttpParser_execute'?
thin.c:317:7: note: 'Thin_HttpParser_execute' declared here
VALUE Thin_HttpParser_execute(VALUE self, VALUE req_hash, VALUE data, VALUE start)
^
thin.c:338:8: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if(thin_http_parser_has_error(http)) {
^
thin.c:338:8: note: did you mean 'http_parser_has_error'?
./parser.h:44:5: note: 'http_parser_has_error' declared here
int http_parser_has_error(http_parser *parser);
^
thin.c:359:10: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_has_error(http) ? Qtrue : Qfalse;
^
thin.c:374:10: error: implicit declaration of function 'thin_http_parser_is_finished' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
^
9 errors generated.
make: *** [thin.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/ali.jamali/.rvm/gems/ruby-2.7.2/gems/thin-1.7.2 for inspection.
Results logged to /Users/ali.jamali/.rvm/gems/ruby-2.7.2/extensions/x86_64-darwin-19/2.7.0/thin-1.7.2/gem_make.out
-
Hi AJ 7885. I ran into a similar issue and was able to resolve using:
gem install thin -- --with-cflags="-Wno-error=implicit-function-declaration"
If you get any permissions issue, then use:
sudo gem install thin -- --with-cflags="-Wno-error=implicit-function-declaration"
I'm guessing it may have to do with a newer version of XCode elevating certain compile-time issues to error level.
Side note: there's a beta version of a newer command line tool (zcli) that removes Ruby and Ruby Gems from the picture (zat) as it's written in Node.js. It will be more cross-platform friendly (especially for Windows users). It's still in beta, for a release sometime next year. If you want to check it out, see: https://developer.zendesk.com/apps/docs/developer-guide/zcli
PS — I got the compile-time workaround above on StackOverflow.
-
Hello Bryan,
Thank you for your help, unfortunately it still not working.
Do you think i need a downgrade for Xcode from Version 12.0 (12A7209) ?
Im using gem 3.1.4
Thank you for your help
-
Are you getting the exact same errors when running this?
sudo gem install thin -- --with-cflags="-Wno-error=implicit-function-declaration"
I'm on 12.0.1 of Xcode and 10.15.6 of macOS. I wouldn't recommend downgrading.
3.8.1 is the latest version of zendesk_apps_tools, so if you're on 3.1.4, getting the newer one installed is definitely recommended.
-
Same issue here.
Have you found a solution already? I am using Big Sur.
-
Hello Cesar,
try to follow this tutorial here
It woks for me now.
Good luck
-
Modifying my previous post: try including the version number of the "thin" gem if running into build issues around it:
gem install thin -v 1.7.2 -- --with-cflags="-Wno-error=implicit-function-declaration"
The "zendesk_apps_tools" gem has a dependency on thin version 1.7.2. Without specifying a version, the later version of thin (v1.8.0) will get compiled instead by default.
-
I'm having the same issue as above. Doing
gem install thin -v 1.7.2 -- --with-cflags="-Wno-error=implicit-function-declaration"
Works without error but I'm not able to do gem install zendesk_apps_tools and zat doesn't work
-
Hello Divya Chittoor. You may be running into a different issue — see this other community comment for ideas:
https://develop.zendesk.com/hc/en-us/articles/360001075048/comments/1500000014142
If the ideas from the above link don't resolve the issue, please post back with the exact error message that you're getting. Thanks!
-
Same problem on Mac OS Big Sur, installing the new version of zat called zcli worked for me.
https://developer.zendesk.com/apps/docs/developer-guide/zcli
-
Bryan,
I suggest you all add this information:
gem install thin -v 1.7.2 -- --with-cflags="-Wno-error=implicit-function-declaration"
The "zendesk_apps_tools" gem has a dependency on thin version 1.7.2. Without specifying a version, the later version of thin (v1.8.0) will get compiled instead by default.
to this post: https://develop.zendesk.com/hc/en-us/articles/360001075068
I imagine that's impacting many users with Mac OS Big Sur like myself.
-
Agreed Autumn Grassel. I put in a request to get that KB article updated with this point.
Please sign in to leave a comment.
11 Comments