Issue installing dependencies for a golang application


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
but the build fails when trying to go get the dependencies.

Here is the build log:

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!

Hi and welcome to the Forum :slight_smile:
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 :wink:
Looks like you need

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 :wink:

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 lol!

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;

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

You need to add a BuildRequires on golang-github-gotk3-gotk3-devel.

Hi thanks for the help!
My project also needs to build
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 :confused:

I feel like this should be much easier :confused:

Looking at the build log it’s missing a few development packages, add the following and see how it goes;

BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(pango)

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.

You need to create a link to this package in your project and let it build;

Go to your main project page

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;

osc linkpac Education gtkglarea2 home:edinpriqtel