Giter Site home page Giter Site logo

Compiling on alpine about agoo HOT 17 CLOSED

ohler55 avatar ohler55 commented on May 18, 2024
Compiling on alpine

from agoo.

Comments (17)

ohler55 avatar ohler55 commented on May 18, 2024 1

PR is ready for you.

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

That is odd. Was that the only error or were there complaints about missing header files as well?

from agoo.

waghanza avatar waghanza commented on May 18, 2024

This the only missing thing in the-benchmarker/web-frameworks#1968.

I have update the full log in https://gist.github.com/bedc4fb00ab91574fb91b53958214ba5

  • Alpine Linux 3.10
  • gcc (Alpine 8.3.0) 8.3.0

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

Thanks. Has something changed since the last time? It looks like the headers are no longer the same and no longer POSIX.

from agoo.

waghanza avatar waghanza commented on May 18, 2024

Yep, I've also had some issues on alpine, see the PR with https://github.com/criticalstack/libevhtp

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

Which PR was that. I saw 6 but didn't know which was relevant.

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

Doing a little research it looks like Alpine might need the use of either -D_POSIX_SOURCE or maybe a #define _POSIX_C_SOURCE 199506L I'll do some experimenting with docker.

Can you verify that you've done something like this:

RUN apk update
&& apk add --virtual build-dependencies
build-base

from agoo.

waghanza avatar waghanza commented on May 18, 2024

seems to be the same with the docker line you gave me

I also see the #define _POSIX_C_SOURCE 199506L source when searching around on stackoverflow, but I have no C skill to PR 😛

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

I pulled your branch and did a docker build with no errors. Of course the Dockerfile generated FROM ruby:2.6. What should I use to get the failure you are seeing?

from agoo.

waghanza avatar waghanza commented on May 18, 2024

Run

shards install
shards build
bin/make config

This should create a Dockerfile in ruby/agoo.

The idea is that this error occurred on bundle install. If you run into the container, (with this line and after commented), you will see the compilation error

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

okay, will try from in the container. I'll try Sunday. Traveling today.

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

I'm not sure what the difference is but even from in the container I don't see any build errors. The Dockerfile is using the ruby:2.6 image. Is that the same for you? I used the use_alpine branch but can't seem to make it fail.

from agoo.

waghanza avatar waghanza commented on May 18, 2024

Ah sorry, yes.

The official image use Debian but I want to switch to alpine since less heavy

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

Right, so where can I find the alpine images or get them hooked into the shard/neph build environment?

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

So, if I don't use the neph stuff and just go for a custom Dockerfile from ruby:2.6.5-alpine I do get errors indicating the build environment isn't there. If that is the correct starting point I'll see what has to be added to make it work.

from agoo.

ohler55 avatar ohler55 commented on May 18, 2024

This worked for me with a change in Agoo to put in two compile directives.

FROM ruby:2.6.5-alpine

WORKDIR /usr/src/app

COPY . ./

RUN apk add --update build-base

RUN bundle install --without development test

ENV AGOO_WORKER_COUNT $(nproc)

CMD ruby app.rb

I suspect Aggo-C will need the same directives.

I would like to update the apps for both as well to match some changes in the graphql-benchmarks. @waghanza , I put you as a reviewer. Anyway if you would like me to make the changes on your fork, let me know and I can branch as long as I am a collaborator..

from agoo.

waghanza avatar waghanza commented on May 18, 2024

Sure, go on. ❤️

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.