Comments (24)
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.
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.
(but probably i lack a makefile and i can't compile one by one)
from agoo.
I'll give something a try tonight and see what I can do.
from agoo.
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.
Ok let me give it a try
from agoo.
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.
If that is the only error remaining I can work with that. I'll write a stdatomic alternative.
from agoo.
@twetzel what OS and compier are you using? I assume you are using a very old gcc as well.
from agoo.
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.
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.
sounds great .. thank you
from agoo.
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.
The latest develop
branch compiles without stdatomic.h
.
from agoo.
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.
I can be used with Rails or with rackup.
from agoo.
Can this be closed?
from agoo.
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.
I'd be glad to help if you can describe the trouble you are having.
from agoo.
Are you still having trouble or can this be closed?
from agoo.
No response, closing.
from agoo.
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.
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.
Did this work for you?
from agoo.
Related Issues (20)
- Fragment usage HOT 17
- CORS issues HOT 8
- Agoo dumps core on malformed SDL HOT 5
- fails to launch in clustered mode HOT 17
- Agoo Fragment Cycle Security Vulnerability HOT 2
- Disabling introspection for GraphQL HOT 12
- Changes on args or req does not get fowarded to the other calls HOT 9
- Static asset with space in filename HOT 4
- gem install agoo fails on MacOS Ventura 13.2.1 HOT 9
- Static .txt files are not served with utf-8 encoding HOT 8
- Protect against smuggling attacks HOT 3
- Agoo & Sidekiq::Web HOT 9
- Can you tell me how I can use agoo with rack middleware? HOT 13
- Case insensitive Content-Type header HOT 4
- GraphQL in rails HOT 22
- How to render a error message using GraphQL HOT 6
- How to create a dynamic GraphQL schema HOT 6
- Configuring worker count and thread count when used with Rails HOT 5
- Port cleanup on shutdown? HOT 3
- REMOTE_ADDR not set on ENV HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agoo.