You are not logged in.

#1 2011-01-11 12:01:06

xyproto
Package Maintainer (PM)
From: Oslo
Registered: 2011-01-11
Posts: 43
Website

Trying to package an app written in Go for AUR [solved]

Hello,

I'm trying to package a tiny app written in Go for AUR, namely addinclude.

When using makepkg+pacman or yaourt, the package installs fine. But, when using clyde, I get:

==> Validating source files with md5sums...
    addinclude-0.4.tbz2 ... Passed
==> Extracting Sources...
  -> Extracting addinclude-0.4.tbz2 with bsdtar
==> Entering fakeroot environment...
==> Starting build()...
  -> Compiling...
echo GOROOT is /usr/lib/go
GOROOT is /usr/lib/go
6g addinclude.go
addinclude.go:16: can't find import: fmt
make: *** [addinclude.6] Error 1
    Aborting...
error: Build failed

"go" is installed, and "fmt" does exist in:
/usr/lib/go/pkg/linux_amd64/fmt.a

This is only an issue with clyde. With makepkg+pacman it works great:

==> Starting build()...
  -> Compiling...
6g addinclude.go
6l -o addinclude addinclude.6
  -> Packaging...

Is this a problem with enviroment variables in this particular combination with go and clyde?

In addition, I get the following warning when installing the package,

==> WARNING: Package contains reference to $srcdir

But, I can't find any place where that is the case. I've searched through all the files in the pkg directory using the "cg" tool (from the cgvg package) and find/strings/grep.

Why could this be?

Any help is welcome. Thanks.

Last edited by xyproto (2011-01-24 21:39:37)

Offline

#2 2011-01-24 21:39:12

xyproto
Package Maintainer (PM)
From: Oslo
Registered: 2011-01-11
Posts: 43
Website

Re: Trying to package an app written in Go for AUR [solved]

By adding a declaration of the GOROOT, GOOS and GOBIN environment variables to the makefile, this issue disappeared. Perhaps clyde handles environment variables differently?
Strange, but now it's solved.

Offline

Board footer

Powered by FluxBB