Results 1 to 10 of 10

Thread: Issue installing dependencies for a golang application

  1. #1

    Post Issue installing dependencies for a golang application

    Hello,

    I am having an issue building my golang application.
    The issue is around `go get`-ing dependencies in my `%build` part of the spec file.

    I've followed the guidelines in the this guide https://en.opensuse.org/openSUSEackaging_Go
    but the build fails when trying to `go get` the dependencies.

    Here is the build log: https://pb.viktorbarzin.me/?1e1297c6...EXhVdtBHPfaoqE

    I know that the build vm does not have internet access but I am not sure how to go about making it `go get` the dependencies for my project.

    Any help would be appreciated!
    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

    Default Re: Issue installing dependencies for a golang application

    Quote Originally Posted by edinpriqtel View Post
    Hello,

    I am having an issue building my golang application.
    The issue is around `go get`-ing dependencies in my `%build` part of the spec file.

    I've followed the guidelines in the this guide https://en.opensuse.org/openSUSEackaging_Go
    but the build fails when trying to `go get` the dependencies.

    Here is the build log: https://pb.viktorbarzin.me/?1e1297c6...EXhVdtBHPfaoqE

    I know that the build vm does not have internet access but I am not sure how to go about making it `go get` the dependencies for my project.

    Any help would be appreciated!
    Thanks
    Hi and welcome to the Forum
    Build against the golang development repository and is your dependencies exist it should build, else AFAIK you would need to build the dependencies in you project for it to have access...

    If you building locally and using osc, then can just use --alternative-project to build...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

    Default Re: Issue installing dependencies for a golang application

    Quote Originally Posted by malcolmlewis View Post
    Hi and welcome to the Forum
    Build against the golang development repository and is your dependencies exist it should build, else AFAIK you would need to build the dependencies in you project for it to have access...

    If you building locally and using osc, then can just use --alternative-project to build...
    Hi again
    Looks like you need https://github.com/gotk3/gotk3/

    Sidenote, just share a link to your package, no need to post a log it can all be seen if you just share the link
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4

    Default Re: Issue installing dependencies for a golang application

    Quote Originally Posted by malcolmlewis View Post
    Hi and welcome to the Forum
    Build against the golang development repository and is your dependencies exist it should build, else AFAIK you would need to build the dependencies in you project for it to have access...

    If you building locally and using osc, then can just use --alternative-project to build...
    Thanks for your reply!

    I'm quite new to OBS and I'm not quite sure what you mean by building against the golang repo.
    Can you please elaborate

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

    Default Re: Issue installing dependencies for a golang application

    Quote Originally Posted by edinpriqtel View Post
    Thanks for your reply!

    I'm quite new to OBS and I'm not quite sure what you mean by building against the golang repo.
    Can you please elaborate
    Hi
    After a look at the code it should only need that one dependency (gotk3) built first in your home repository and added as a build requires for the goclip package.

    I would suggest following the format as the rest of the golang packages are built for naming etc for example;
    https://build.opensuse.org/package/v....spec?expand=1
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

    Default Re: Issue installing dependencies for a golang application

    Hi
    I built gotk3 without any major issues and have submitted it to your home repository for acceptance;

    https://build.opensuse.org/request/show/789562

    You need to add a BuildRequires on golang-github-gotk3-gotk3-devel.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7

    Default Re: Issue installing dependencies for a golang application

    Hi thanks for the help!
    My project also needs to build https://github.com/mattn/go-gtk
    I tried to follow exactly what you did for building gotk3 but I'm still struggling.
    I tried uploading the tar-red source of the library and build it but the go library is split in 2 sublibraries that use each other and I've had limited success at building them both :/

    I feel like this should be much easier :/

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

    Default Re: Issue installing dependencies for a golang application

    Quote Originally Posted by edinpriqtel View Post
    Hi thanks for the help!
    My project also needs to build https://github.com/mattn/go-gtk
    I tried to follow exactly what you did for building gotk3 but I'm still struggling.
    I tried uploading the tar-red source of the library and build it but the go library is split in 2 sublibraries that use each other and I've had limited success at building them both :/

    I feel like this should be much easier :/
    Hi
    Looking at the build log it's missing a few development packages, add the following and see how it goes;

    Code:
    BuildRequires:  pkgconfig(glib-2.0)
    BuildRequires:  pkgconfig(gobject-2.0)
    BuildRequires:  pkgconfig(pango)
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  9. #9

    Default Re: Issue installing dependencies for a golang application

    This made some progress.
    Now I'm stuck building pkgconfig(gtkgl-2.0)
    Tried a lot of combinations but it's either unresolvable or it's throwing the same error. Perhaps I'm solving the wrong issue, but that's what I made out of the build error.

  10. #10
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

    Default Re: Issue installing dependencies for a golang application

    Quote Originally Posted by edinpriqtel View Post
    This made some progress.
    Now I'm stuck building pkgconfig(gtkgl-2.0)
    Tried a lot of combinations but it's either unresolvable or it's throwing the same error. Perhaps I'm solving the wrong issue, but that's what I made out of the build error.
    Hi
    You need to create a link to this package in your project and let it build;
    https://build.opensuse.org/package/s...ion/gtkglarea2

    Go to your main project page https://build.opensuse.org/project/s...me:edinpriqtel

    Under the package list on the web interface hit the button called 'Branch Existing Package', in the 'Original Project name' start type Education this is the project, now in 'Original Package name' start typing gtkglarea2, you only need those two fields complete and hit the accept button. In your project you will see tha package name along with a 'link' icon. All you then need to do is in the package enable the build targets, wait for it to build and finish. Then add the build requires for the gtkgl-2 in your package and should be good to go.

    If I was using the command line tool osc on my local machine it would be;

    Code:
    osc linkpac Education gtkglarea2 home:edinpriqtel
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •