Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all failed, trying to do go build #26461

Closed
ki0 opened this issue Jul 19, 2018 · 4 comments
Closed

Make all failed, trying to do go build #26461

ki0 opened this issue Jul 19, 2018 · 4 comments

Comments

@ki0
Copy link

ki0 commented Jul 19, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes, it does

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/frodriguez/work/go"
GORACE=""
GOROOT="/opt/boxen/homebrew/Cellar/go/1.9.2/libexec"
GOTOOLDIR="/opt/boxen/homebrew/Cellar/go/1.9.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_1/mjn2hy4d3pd3x5y049qfhb140000gn/T/go-build581093275=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

make all
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

I supposed nothing.

What did you see instead?

/Applications/Xcode.app/Contents/Developer/usr/bin/make deps
go get -u github.com/golang/lint/golint
go get -u github.com/golang/dep/cmd/dep
dep ensure -vendor-only
/Applications/Xcode.app/Contents/Developer/usr/bin/make telegraf
go build -ldflags "-L/opt/boxen/homebrew/lib -X main.commit=71eb24a -X main.branch=master -X main.commit=71eb24a -X main.branch=master" ./cmd/telegraf

github.com/influxdata/telegraf/cmd/telegraf

flag provided but not defined: -L/opt/boxen/homebrew/lib
usage: link [options] main.o
-B note
add an ELF NT_GNU_BUILD_ID note when using ELF
-D address
set data segment address (default -1)
-E entry
set entry symbol name
-H type
set header type
-I linker
use linker as ELF dynamic linker
-L directory
add specified directory to library path
-R quantum
set address rounding quantum (default -1)
-T address
set text segment address (default -1)
-V print version and exit
-X definition
add string value definition of the form importpath.name=value
-a disassemble output
-buildid id
record id as Go toolchain build id
-buildmode mode
set build mode
-c dump call graph
-cpuprofile file
write cpu profile to file
-d disable dynamic executable
-debugtramp int
debug trampolines
-dumpdep
dump symbol dependency graph
-extar string
archive program for buildmode=c-archive
-extld linker
use linker when linking in external mode
-extldflags flags
pass flags to external linker
-f ignore version mismatch
-g disable go package data checks
-h halt on error
-importcfg file
read import configuration from file
-installsuffix suffix
set package directory suffix
-k symbol
set field tracking symbol
-libgcc string
compiler support lib for internal linking; use "none" to disable
-linkmode mode
set link mode
-linkshared
link against installed Go shared libraries
-memprofile file
write memory profile to file
-memprofilerate rate
set runtime.MemProfileRate to rate
-msan
enable MSan interface
-n dump symbol table
-o file
write output to file
-pluginpath string
full path name for plugin
-r path
set the ELF dynamic linker search path to dir1:dir2:...
-race
enable race detector
-s disable symbol table
-tmpdir directory
use directory for temporary files
-u reject unsafe packages
-v print link trace
-w disable DWARF generation
make[1]: *** [telegraf] Error 2
make: *** [all] Error 2

@ysmolski
Copy link
Member

You might want to address that to github.com/influxdata/telegraf/ if you tried to build their software.

Or if you have more details why it should be relevant to Go developers, please let us know.

@ki0
Copy link
Author

ki0 commented Jul 19, 2018

Hi, im doing a output plugin for Devo Inc. and i got it but when im trying to do the make all, or make test i got this error. Im already on github.com/influxdata/telegraf path, so i dont understand the error.

➜  telegraf git:(master) ✗ pwd
/Users/frodriguez/work/go/src/github.com/influxdata/telegraf

@cherrymui
Copy link
Member

cherrymui commented Jul 19, 2018

flag provided but not defined: -L/opt/boxen/homebrew/lib

It needs a space between -L and the directory, as -L /opt/boxen/homebrew/lib.

@bradfitz
Copy link
Contributor

Sorry, this doesn't look to be a Go bug. You seem to be building something else. I'd find that other thing's issue tracker instead.

@golang golang locked and limited conversation to collaborators Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants