mcpa-stlouis / hack-the-arch

Welcome to HackTheArch! A free open source scoring server for cyber Capture the Flag competitions!
https://hackthearch.herokuapp.com
MIT License
67 stars 27 forks source link

Fail to buid json gem #22

Closed noraj closed 7 years ago

noraj commented 7 years ago

I often have this json build error:

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

    current directory: /tmp/bundler20170506-4135-1362aq7json-1.8.3/gems/json-1.8.3/ext/json/ext/generator
/usr/bin/ruby -r ./siteconf20170506-4135-1ccu47r.rb extconf.rb
creating Makefile

current directory: /tmp/bundler20170506-4135-1362aq7json-1.8.3/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /tmp/bundler20170506-4135-1362aq7json-1.8.3/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function)
     } else if (klass == rb_cFixnum) {
                         ^~~~~~~~~~
generator.c:861:25: note: each undeclared identifier is reported only once for each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function)
     } else if (klass == rb_cBignum) {
                         ^~~~~~~~~~
make: *** [Makefile:242: generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /tmp/bundler20170506-4135-1362aq7json-1.8.3/gems/json-1.8.3 for inspection.
Results logged to /tmp/bundler20170506-4135-1362aq7json-1.8.3/extensions/x86_64-linux/2.4.0/json-1.8.3/gem_make.out

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

For now HTA seems to specific to your need only and seems not mature enough to be production ready as CTFd or RootTheBox.

Maybe this CTF platform is good but I can't say as I never managed to install it. Install this platform seems to require good knowledge about ruby / rake debugging.

paullj1 commented 7 years ago

@noraj1337, Thanks for all of your input and help. I'm pushing to the dev branch a Gemfile that should build in the docker environment just fine.

Your comment about it not being ready is accurate, but I think we're a step closer thanks to your help. Unfortunately, I haven't kept up with this project as much as I'd like to have, but now I think we're about there. Thanks for your patience.

noraj commented 7 years ago

I'm trying to get a Ruby CTF platform and Hack-the-Arch looks like a good one, I may help in the future.

noraj commented 7 years ago

I think this bug occurred when I tried to bundle install from ruby 2.4.0 but I this didn't happened with ruby 2.3.x.

paullj1 commented 7 years ago

Closing because 2.4 isn't officially supported right now.