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

cmd/cgo: -Wl , -rpath in LDFLAGS throws invalid flag in #cgo LDFLAGS: -Wl,-rpath=$ORIGIN/lib #23904

Closed
datNurd opened this issue Feb 18, 2018 · 3 comments

Comments

@datNurd
Copy link

commented Feb 18, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10 windows/386

Does this issue reproduce with the latest release?

Yes

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

Windows 10, 64 bit

What did you do?

#cgo CFLAGS: -I${SRCDIR}/lib
#cgo LDFLAGS: -L${SRCDIR}/lib -Wl,-rpath=\$ORIGIN/lib -ltest
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?

Compiled go program.

What did you see instead?

go build command-line-arguments: invalid flag in #cgo LDFLAGS: -Wl,-rpath=$ORIGIN/lib

@odeke-em odeke-em changed the title -Wl , -rpath in LDFLAGS throws invalid flag in #cgo LDFLAGS: -Wl,-rpath=$ORIGIN/lib cmd/cgo: -Wl , -rpath in LDFLAGS throws invalid flag in #cgo LDFLAGS: -Wl,-rpath=$ORIGIN/lib Feb 18, 2018

@odeke-em

This comment has been minimized.

Copy link
Member

commented Feb 18, 2018

@hirochachacha

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2018

use ',' instead of '='.

#cgo LDFLAGS: -L${SRCDIR}/lib -Wl,-rpath,$ORIGIN/lib -ltest
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Feb 20, 2018

Consolidating into #23937.

@golang golang locked and limited conversation to collaborators Feb 20, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.