{"action":"created","issue":{"url":"https://api.github.com/repos/rmosolgo/graphql-libgraphqlparser-ruby/issues/2","repository_url":"https://api.github.com/repos/rmosolgo/graphql-libgraphqlparser-ruby","labels_url":"https://api.github.com/repos/rmosolgo/graphql-libgraphqlparser-ruby/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/rmosolgo/graphql-libgraphqlparser-ruby/issues/2/comments","events_url":"https://api.github.com/repos/rmosolgo/graphql-libgraphqlparser-ruby/issues/2/events","html_url":"https://github.com/rmosolgo/graphql-libgraphqlparser-ruby/issues/2","id":139094378,"number":2,"title":"Error when building native extension","user":{"login":"chanks","id":300058,"avatar_url":"https://avatars.githubusercontent.com/u/300058?v=3","gravatar_id":"","url":"https://api.github.com/users/chanks","html_url":"https://github.com/chanks","followers_url":"https://api.github.com/users/chanks/followers","following_url":"https://api.github.com/users/chanks/following{/other_user}","gists_url":"https://api.github.com/users/chanks/gists{/gist_id}","starred_url":"https://api.github.com/users/chanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanks/subscriptions","organizations_url":"https://api.github.com/users/chanks/orgs","repos_url":"https://api.github.com/users/chanks/repos","events_url":"https://api.github.com/users/chanks/events{/privacy}","received_events_url":"https://api.github.com/users/chanks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-07T21:08:50Z","updated_at":"2016-03-07T22:07:55Z","closed_at":null,"body":"Hi -\r\n\r\nSuper excited for this faster parser, but I'm running into a problem when I try to install it. This may have been my own error, since I don't know a ton about C, but I managed to make and install libgraphqlparser without any apparent issue, so I'm not sure what the problem is. This is on Linux Mint, btw. \r\n\r\n```\r\n$ gem install graphql-libgraphqlparser -v '0.1.3'\r\nBuilding native extensions.  This could take a while...\r\nERROR:  Error installing graphql-libgraphqlparser:\r\n\tERROR: Failed to build gem native extension.\r\n\r\n    current directory: /home/chris/.rvm/gems/ruby-2.3.0/gems/graphql-libgraphqlparser-0.1.3/ext/libgraphqlparser\r\n/home/chris/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160307-19445-1ux8w1r.rb extconf.rb\r\nchecking for main() in -lgraphqlparser... yes\r\ncreating Makefile\r\n\r\nTo see why this extension failed to compile, please check the mkmf.log which can be found here:\r\n\r\n  /home/chris/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/graphql-libgraphqlparser-0.1.3/mkmf.log\r\n\r\ncurrent directory: /home/chris/.rvm/gems/ruby-2.3.0/gems/graphql-libgraphqlparser-0.1.3/ext/libgraphqlparser\r\nmake \"DESTDIR=\" clean\r\n\r\ncurrent directory: /home/chris/.rvm/gems/ruby-2.3.0/gems/graphql-libgraphqlparser-0.1.3/ext/libgraphqlparser\r\nmake \"DESTDIR=\"\r\ncompiling libgraphqlparser.c\r\ncompiling visitor_functions.c\r\nvisitor_functions.c: In function ‘enum_value_begin_visit’:\r\nvisitor_functions.c:281:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]\r\n   const char* str_value = GraphQLAstEnumValue_get_value(node);\r\n   ^\r\nlinking shared-object libgraphqlparser.so\r\n./libgraphqlparser.so: file not recognized: File truncated\r\ncollect2: error: ld returned 1 exit status\r\nmake: *** [libgraphqlparser.so] Error 1\r\n\r\nmake failed, exit code 2\r\n\r\nGem files will remain installed in /home/chris/.rvm/gems/ruby-2.3.0/gems/graphql-libgraphqlparser-0.1.3 for inspection.\r\nResults logged to /home/chris/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/graphql-libgraphqlparser-0.1.3/gem_make.out\r\n```\r\n\r\nThe log it directs me to reads:\r\n```\r\n$ cat /home/chris/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/graphql-libgraphqlparser-0.1.3/mkmf.log\r\nhave_library: checking for main() in -lgraphqlparser... -------------------- yes\r\n\r\n\"gcc -o conftest -I/home/chris/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/x86_64-linux -I/home/chris/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/backward -I/home/chris/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I. -I/usr/local/include/graphqlparser     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  -fPIC conftest.c  -L. -L/home/chris/.rvm/rubies/ruby-2.3.0/lib -Wl,-R/home/chris/.rvm/rubies/ruby-2.3.0/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic     -Wl,-R/home/chris/.rvm/rubies/ruby-2.3.0/lib -L/home/chris/.rvm/rubies/ruby-2.3.0/lib -lruby  -lpthread -ldl -lcrypt -lm   -lc\"\r\nchecked program was:\r\n/* begin */\r\n1: #include \"ruby.h\"\r\n2: \r\n3: int main(int argc, char **argv)\r\n4: {\r\n5:   return 0;\r\n6: }\r\n/* end */\r\n\r\n\"gcc -o conftest -I/home/chris/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/x86_64-linux -I/home/chris/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/backward -I/home/chris/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I. -I/usr/local/include/graphqlparser     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  -fPIC conftest.c  -L. -L/home/chris/.rvm/rubies/ruby-2.3.0/lib -Wl,-R/home/chris/.rvm/rubies/ruby-2.3.0/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic     -Wl,-R/home/chris/.rvm/rubies/ruby-2.3.0/lib -L/home/chris/.rvm/rubies/ruby-2.3.0/lib -lruby -lgraphqlparser  -lpthread -ldl -lcrypt -lm   -lc\"\r\nchecked program was:\r\n/* begin */\r\n 1: #include \"ruby.h\"\r\n 2: \r\n 3: /*top*/\r\n 4: extern int t(void);\r\n 5: int main(int argc, char **argv)\r\n 6: {\r\n 7:   if (argc > 1000000) {\r\n 8:     printf(\"%p\", &t);\r\n 9:   }\r\n10: \r\n11:   return 0;\r\n12: }\r\n13: int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return !p; }\r\n/* end */\r\n\r\n--------------------\r\n\r\n```\r\n\r\nIf anyone has some advice on where to look or what to try, it'd be much appreciated.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/rmosolgo/graphql-libgraphqlparser-ruby/issues/comments/193477538","html_url":"https://github.com/rmosolgo/graphql-libgraphqlparser-ruby/issues/2#issuecomment-193477538","issue_url":"https://api.github.com/repos/rmosolgo/graphql-libgraphqlparser-ruby/issues/2","id":193477538,"user":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars.githubusercontent.com/u/2231765?v=3","gravatar_id":"","url":"https://api.github.com/users/rmosolgo","html_url":"https://github.com/rmosolgo","followers_url":"https://api.github.com/users/rmosolgo/followers","following_url":"https://api.github.com/users/rmosolgo/following{/other_user}","gists_url":"https://api.github.com/users/rmosolgo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmosolgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmosolgo/subscriptions","organizations_url":"https://api.github.com/users/rmosolgo/orgs","repos_url":"https://api.github.com/users/rmosolgo/repos","events_url":"https://api.github.com/users/rmosolgo/events{/privacy}","received_events_url":"https://api.github.com/users/rmosolgo/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T22:07:55Z","updated_at":"2016-03-07T22:07:55Z","body":"I had this same error on Travis earlier, but _only_ when building Ruby 2.1. I ended up just removing it from the build :grimacing:  \r\n\r\nI wonder if you're on to something there. I think I should at least rename the extension file so it's easier to see _where_ the problem is! \r\n\r\n>  I don't know a ton about C,\r\n\r\n:hand:  same! \r\n"}}