Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

gb v0.3.1 looking for gcc on FreeBSD 10.1 using port #506

Closed
derekmarcotte opened this issue Dec 20, 2015 · 3 comments
Closed

gb v0.3.1 looking for gcc on FreeBSD 10.1 using port #506

derekmarcotte opened this issue Dec 20, 2015 · 3 comments

Comments

@derekmarcotte
Copy link
Contributor

Hi,
I'm using gb from FreeBSD packages, and recently updated to v0.3.1 (most current in ports). My project depends on a library that uses cgo (go-libucl imported via gb vendor).

When I do a gb test all -v (or gb build all) using a previous version (v0.1.0), every works great.

After doing a pkg upgrade to v0.3.1 I get:

/usr/local/go/pkg/tool/freebsd_amd64/link: running gcc failed: exec: "gcc": executable file not found in $PATH

I've never had gcc installed, and only ever used LLVM + clang.

If I downgrade to gb v0.1.0, everything goes back to working fine.

With v0.3.1, I tried exporting $CC and $CXX to point to clang and clang++, but the same result.

I started trawling through gb source, and it appears that clang support is there. I'm not sure what I need to do to enable this, or where I can look next?

Any thoughts? I'd be grateful for any pointers.

@derekmarcotte
Copy link
Contributor Author

I was also able to update to v0.3.5 using a custom package I built, and I have the same result as v0.3.1.

@derekmarcotte
Copy link
Contributor Author

I was able to build (with v0.3.5) using gb build -ldflags "-extld clang" all, the resultant build appears to work correctly.

However I was unable to test via gb test -ldflags "-extld clang" all:

usage: link [options] main.o
...

cmd/hfm/testmain

cmd/hfm

FATAL: command "test" failed: exit status 2

@davecheney
Copy link
Contributor

Thanks for logging the issue. I'm travelling for the next few days so
responses may be delayed.

Fwiw, if you have go installed, there is no benefit that I can see in using
the ports packaged version vs the installation instructions on getgb.io. I
would strongly recommend installing gb via that method.

On Mon, 21 Dec 2015, 07:48 Derek Marcotte [email protected] wrote:

I was able to build (with v0.3.5) using gb build -ldflags "-extld clang"
all, the resultant build appears to work correctly.

However I was unable to test via gb test -ldflags "-extld clang" all:

usage: link [options] main.o
...

cmd/hfm/testmain

cmd/hfm

FATAL: command "test" failed: exit status 2


Reply to this email directly or view it on GitHub
#506 (comment).

derekmarcotte added a commit to derekmarcotte/gb that referenced this issue Dec 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants