Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Failing #9

Open
davis190 opened this issue Feb 23, 2021 · 4 comments
Open

Build Failing #9

davis190 opened this issue Feb 23, 2021 · 4 comments

Comments

@davis190
Copy link

davis190 commented Feb 23, 2021

Using the link from here: https://www.balena.io/blog/monitoring-your-balena-devices-with-datadog/ and building on generic x86_64 the build is failing.

Logs

From balena UI

[Info]      Building on x64_01
[Info]      Pulling previous images for caching purposes...
[Success]   Successfully pulled cache images
[Info]      Starting to build datadog
[Info]      Starting to build frontend
[Success]   Successfully built service frontend
[Success]   Successfully built service datadog
[Info]      Uploading images
[Success]   Successfully uploaded images
[Error]     Some services failed to build:
[Error]       Service: datadog
[Error]         Error: The command '/bin/sh -c export PATH=$PATH:$GOPATH/bin GODEBUG=netdns=go &&   cd /usr/app/src/github.com/DataDog/datadog-agent &&   invoke deps -v' returned a non-zero code: 1
[Info]      Built on x64_01
[Error]     Not deploying release.

From running balena deploy <APP> --debug

Error: The command '/bin/sh -c export PATH=$PATH:$GOPATH/bin GODEBUG=netdns=go &&   cd /usr/app/src/github.com/DataDog/datadog-agent &&   invoke deps -v' returned a non-zero code: 1
    at Stream.<anonymous> (/snapshot/volume/node_modules/resin-docker-build/build/builder.js:181:23)
    at Stream.stream.write (/snapshot/volume/node_modules/through/index.js:26:11)
    at Stream.ondata (internal/streams/legacy.js:15:31)
    at Stream.emit (events.js:198:13)
    at Stream.EventEmitter.emit (domain.js:448:20)
    at drain (/snapshot/volume/node_modules/through/index.js:36:16)
    at Stream.stream.queue.stream.push (/snapshot/volume/node_modules/through/index.js:45:5)
    at Parser.exports.parse.parser.onToken (/snapshot/volume/node_modules/JSONStream/index.js:132:18)
    at Parser.proto.write (/snapshot/volume/node_modules/jsonparse/jsonparse.js:135:34)
    at Stream.<anonymous> (/snapshot/volume/node_modules/JSONStream/index.js:23:12)
    at Stream.stream.write (/snapshot/volume/node_modules/through/index.js:26:11)
    at IncomingMessage.ondata (_stream_readable.js:710:20)
    at IncomingMessage.emit (events.js:198:13)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
From previous event:
    at createBuildStream.Bluebird.try.then (/snapshot/volume/node_modules/resin-docker-build/build/builder.js:73:20)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
    at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
    at Builder.createBuildStream (/snapshot/volume/node_modules/resin-docker-build/build/builder.js:72:97)
    at taskResolved.then (/snapshot/volume/node_modules/resin-multibuild/build/build.js:85:21)

Steps to reproduce:

  1. Follow this link
  2. Change device type to generic x86_64
  3. I also changed application type to microservices
@jezzab
Copy link

jezzab commented Mar 2, 2021

Had the same on armhf. Did a quick hack and this got it building but its far from optimal. Im sure there is a better way but im out of time:

RUN export PATH=$PATH:$GOPATH/bin GODEBUG=netdns=go
RUN cd /usr/app/src/github.com/DataDog/datadog-agent
RUN mkdir -p $GOPATH/src/golang.org/x \
  && git clone https://github.com/golang/lint.git $GOPATH/src/golang.org/x/lint \
  && go get -u golang.org/x/lint/golint

RUN mkdir -p $GOPATH/src/github.com/spf13/pflag \
  && git clone https://github.com/spf13/pflag.git $GOPATH/src/github.com/spf13/pflag \
  && go get -u github.com/spf13/pflag

RUN invoke deps -v

@davis190
Copy link
Author

davis190 commented Mar 2, 2021

I did something similar for my workaround, also not ideal.

RUN go get -d github.com/spf13/pflag
RUN mkdir -p /usr/app/src/github.com/spf13/pflag
RUN cp -r /usr/app/pkg/mod/github.com/spf13/[email protected]/* /usr/app/src/github.com/spf13/pflag

RUN export PATH=$PATH:$GOPATH/bin GODEBUG=netdns=go && \
  cd /usr/app/src/github.com/DataDog/datadog-agent && \
  invoke deps -v

@gelbal
Copy link

gelbal commented Mar 10, 2021

Hi @davis190 @jezzab thank you for sharing your solutions. Can you please open a PR with your changes?

With the repo maintainers, we can all work together to clean up and merge the changes.

@gitroli
Copy link

gitroli commented Jul 11, 2021

My build is also failing with same error, can you please post the whole Dockerfile.template, which is working. Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants