GithubHelp home page GithubHelp logo

unable to build about agoo HOT 24 CLOSED

ohler55 avatar ohler55 commented on May 19, 2024
unable to build

from agoo.

Comments (24)

ohler55 avatar ohler55 commented on May 19, 2024

I see you are using gcc-4.9 which is the minimum. That should support C11. It looks like the generated makefile has not set -std=c11. I'll see what I can do about getting that compile option into the Makefile.

from agoo.

matteolc avatar matteolc commented on May 19, 2024

Thanks.
I have however tried to compile directly and i get the following error:

gcc -std=c11 http.c
http.c: In function ‘http_header_ok’:
http.c:518:6: warning: implicit declaration of function ‘strncasecmp’ [-Wimplicit-function-declaration]
      ((0 <= len && len <= MAX_KEY_UNIQ) || 0 == strncasecmp(s->key, key, klen))) {
      ^
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccVNMBLy.o: In function `http_header_ok':
http.c:(.text+0x384): undefined reference to `err_set'
http.c:(.text+0x3d6): undefined reference to `err_set'
http.c:(.text+0x43c): undefined reference to `err_set'
collect2: error: ld returned 1 exit status

from agoo.

matteolc avatar matteolc commented on May 19, 2024

(but probably i lack a makefile and i can't compile one by one)

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

I'll give something a try tonight and see what I can do.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

Looks like just std=c11 did not do the trick. I made some changes but did not replace the stdatomic.h. That will take a bit more. Any chance you can move to a more modern version of gcc?

from agoo.

matteolc avatar matteolc commented on May 19, 2024

Ok let me give it a try

from agoo.

twetzel avatar twetzel commented on May 19, 2024

I also can't build it ... here the error:

Fetching: agoo-2.5.5.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing agoo:
	ERROR: Failed to build gem native extension.

    current directory: /Users/austin/.rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/agoo-2.5.5/ext/agoo
/Users/austin/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20181113-16532-19ljybe.rb extconf.rb
creating Makefile
>>>>> Created Makefile for ruby version 2.4.1 on x86_64-darwin14 <<<<<

current directory: /Users/austin/.rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/agoo-2.5.5/ext/agoo
make "DESTDIR=" clean

current directory: /Users/austin/.rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/agoo-2.5.5/ext/agoo
make "DESTDIR="
compiling agoo.c
In file included from agoo.c:8:
./debug.h:6:10: fatal error: 'stdatomic.h' file not found
#include <stdatomic.h>
         ^
1 error generated.
make: *** [agoo.o] Error 1

make failed, exit code 2

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

If that is the only error remaining I can work with that. I'll write a stdatomic alternative.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

@twetzel what OS and compier are you using? I assume you are using a very old gcc as well.

from agoo.

twetzel avatar twetzel commented on May 19, 2024

OSX Yosemite 10.10.5 .. after SnowLeopard, each new OS feels worse, so I just update when I really need to

➭ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

.. hope that helps .. would really like to try your server, I´m a huge fan of oj and ox so looking forward for the next turbo you offer :)

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

Thanks, I will get Agoo compiling for you but it may take a few days or a week. If you can make sure your code tools are as recent as possible that would be helpful.

from agoo.

twetzel avatar twetzel commented on May 19, 2024

sounds great .. thank you

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

Please try the develop branch. There is a stdatomic.h replacement in it. Lets see what else is needed if that work. Thanks.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

The latest develop branch compiles without stdatomic.h.

from agoo.

twetzel avatar twetzel commented on May 19, 2024

it worked, I can bundle!! .. many thanks!

Now I need to figure out how to use it .. can it be used seamlessly with rails? So as a replacement for puma, or thin in my case.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

I can be used with Rails or with rackup.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

Can this be closed?

from agoo.

twetzel avatar twetzel commented on May 19, 2024

From my side for sure, build works even on my old system .. thanks again for the fast help

I have some trouble to use it, but I´ll create another issue for that.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

I'd be glad to help if you can describe the trouble you are having.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

Are you still having trouble or can this be closed?

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

No response, closing.

from agoo.

Stono avatar Stono commented on May 19, 2024

Hey sorry to rekindle an old issue but I think I'm having this too, when building from develop the issue persists:

compiling log.c
log.c: In function ‘find_color’:
log.c:65:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
  for (agooColor c = colors; NULL != c->name; c++) {
  ^
log.c:65:2: note: use option -std=c99 or -std=gnu99 to compile your code
log.c: In function ‘agoo_log_queue_pop’:
log.c:128:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int cnt = (int)(timeout / (double)WAIT_MSECS * 1000.0);
atomic_load(&agoo_log.tail) == next; cnt--) {
     ^
log.c: In function ‘agoo_log_rotate’:
log.c:283:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
  for (int seq = agoo_log.max_files; 0 < seq; seq--) {
  ^
log.c:291:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
  for (int seq = agoo_log.max_files; 0 < seq; seq--) {
  ^
log.c: At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by
default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand"
[enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality"
[enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare"
[enabled by default]
make: *** [log.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/usr/local/autotrader/app/vendor/bundle/ruby/2.5.0/bundler/gems/agoo-bc89ecdbc609
for inspection.
Results logged to
/usr/local/autotrader/app/vendor/bundle/ruby/2.5.0/bundler/gems/extensions/x86_64-linux/2.5.0-static/agoo-bc89ecdbc609/gem_make.out

An error occurred while installing agoo (2.8.0a1), and Bundler cannot continue.

This is a build inside a centos:7 docker container.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

I'll fall back to pre-1999 C. Any chance you would be willing to run compiles when I make the changes? I checked in a change to the develop branch.

from agoo.

ohler55 avatar ohler55 commented on May 19, 2024

Did this work for you?

from agoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.