Coder Social home page Coder Social logo

Comments (2)

bernardoaraujor avatar bernardoaraujor commented on May 25, 2024 1

Issue fully resolved. Posting solution here if anyone ever faces similar issues.
Excerpt from https://itnext.io/getting-go-onto-internet-things-582396ff2760

Go bitbake recipes by default produce applications which link to the go runtime library. This can complicate deployment and dependency management. For these and other reasons, you may want to have Yocto build Go application as the default binary type of a completely contained application. To do this just add GO_LINKSHARED = "" to the recipe. The result is that the main RPM will have the same name, but will not require the go-runtime rpm be installed.

As suspected, the main problem was a compilation flag (linkshared in this case), which created executable dependency to go-runtime and unstable behaviour of a few libraries (such as regexp) depending on the target CPU architecture. This is probably because several additional compilation flags are also required for dynamic linking of some libraries and unfortunately BitBake does not resolve them automatically.

Btw, linkshared is marked as experimental at the official golang linking documentation, so another good reason to stay away from it.

Adding GO_LINKSHARED = "" to the BitBake recipe completely solved the issue because the linkshared flag is removed and for each application, a single standalone executable is generated without dependencies to any shared objects at runtime.

from iota.go.

bernardoaraujor avatar bernardoaraujor commented on May 25, 2024

Partially fixed by pointing recipe to Release v1.0.0-beta.9 (instead of 6, like I did previously).
Problem definitely has to do with regexp. For some reason, when cross-compiled with BitBake, the implementation of regexp is buggy.

I'm doing modifications similar to d40e388
I'll submit a PR soon.

Closing the issue.

from iota.go.

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.