warewulf icon indicating copy to clipboard operation
warewulf copied to clipboard

bug: missing build dependencies in spec

Open anderbubble opened this issue 2 years ago • 4 comments

gpgme-devel

cd cmd/config_defaults && go build -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=./etc/warewulf.conf'\
 -X 'github.com/hpcng/warewulf/internal/pkg/node.ConfigFile=./etc/nodes.conf'"\
 -mod vendor -tags "containers_image_openpgp containers_image_ostree" -o ../../config_defaults
go build -o ./wwapid internal/app/api/wwapid/wwapid.go
# github.com/mtrmac/gpgme
vendor/github.com/mtrmac/gpgme/data.go:4:11: fatal error: gpgme.h: No such file or directory
 // #include <gpgme.h>
           ^~~~~~~~~
compilation terminated.
make: *** [Makefile:276: wwapid] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.hD6oM4 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.hD6oM4 (%build)

anderbubble avatar Sep 16 '22 16:09 anderbubble

libassuan-devel

cd cmd/config_defaults && go build -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=./etc/warewulf.conf'\
 -X 'github.com/hpcng/warewulf/internal/pkg/node.ConfigFile=./etc/nodes.conf'"\
 -mod vendor -tags "containers_image_openpgp containers_image_ostree" -o ../../config_defaults
go build -o ./wwapid internal/app/api/wwapid/wwapid.go
# github.com/mtrmac/gpgme
/usr/bin/ld: cannot find -lassuan
collect2: error: ld returned 1 exit status
make: *** [Makefile:276: wwapid] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.NgADLx (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.NgADLx (%build)

anderbubble avatar Sep 16 '22 16:09 anderbubble

For dnf systems like rocky, add powertools:

sudo dnf config-manager --set-enabled powertools
sudo dnf install gpgme-devel
sudo dnf install libassuan-devel

MatthewHink avatar Sep 17 '22 01:09 MatthewHink

@MatthewHink I was able to install the packages. My point is that they need to be listed as BuildRequires in the spec file.

anderbubble avatar Sep 17 '22 02:09 anderbubble

Makes sense to me. I hit the same issue in January and did not know how to install the dnf packages on Rocky. Docs to do so cannot hurt while we’re here.

Sent from my phone.

On Sep 16, 2022, at 7:18 PM, Jonathon Anderson @.***> wrote:

 @MatthewHink I was able to install the packages. My point is that they need to be listed as BuildRequires in the spec file.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

MatthewHink avatar Sep 17 '22 03:09 MatthewHink

Fixed in #564.

anderbubble avatar Dec 18 '22 07:12 anderbubble

I'm sorry to comment on a closed issue but if someone using Rocky 9 finds this thread they can do the following (powertools installation is slightly different in Rocky 9):

sudo dnf config-manager --enable crb sudo dnf install gpgme-devel sudo dnf install libassuan-devel

bindatype avatar Dec 23 '22 00:12 bindatype