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

invalid flag in #cgo LDFLAGS: -Wl,--whole-archive #722

Open
hicaoc opened this issue Jan 14, 2021 · 5 comments
Open

invalid flag in #cgo LDFLAGS: -Wl,--whole-archive #722

hicaoc opened this issue Jan 14, 2021 · 5 comments

Comments

@hicaoc
Copy link

hicaoc commented Jan 14, 2021

root@PC:/go/src/github.com/intel-go/nff-go# make
make -C nff-go-base
make[1]: Entering directory '/mnt/d/go/src/github.com/intel-go/nff-go/nff-go-base'
Checking for AVX support... AVX and AVX2
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/mnt/d/go/src/github.com/intel-go/nff-go/nff-go-base'
make -C dpdk
make[1]: Entering directory '/mnt/d/go/src/github.com/intel-go/nff-go/dpdk'
Checking for AVX support... AVX and AVX2
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/mnt/d/go/src/github.com/intel-go/nff-go/dpdk'
make -C test
make[1]: Entering directory '/mnt/d/go/src/github.com/intel-go/nff-go/test'
make -C stability
make[2]: Entering directory '/mnt/d/go/src/github.com/intel-go/nff-go/test/stability'
make -C testMerge
make[3]: Entering directory '/mnt/d/go/src/github.com/intel-go/nff-go/test/stability/testMerge'
Checking for AVX support... AVX and AVX2
go build -tags "mlx bpf" testMerge.go
go build runtime/cgo: invalid flag in go:cgo_ldflag: -Wl,-export-dynamic
make[3]: *** [../../../mk/leaf.mk:19: testMerge] Error 1
make[3]: Leaving directory '/mnt/d/go/src/github.com/intel-go/nff-go/test/stability/testMerge'
make[2]: *** [../../mk/intermediate.mk:16: testMerge] Error 2
make[2]: Leaving directory '/mnt/d/go/src/github.com/intel-go/nff-go/test/stability'
make[1]: *** [../mk/intermediate.mk:16: stability] Error 2
make[1]: Leaving directory '/mnt/d/go/src/github.com/intel-go/nff-go/test'
make: *** [mk/intermediate.mk:16: test] Error 2

go version go1.15.5 linux/amd64

@cang233
Copy link

cang233 commented Jan 20, 2021

@hsk9169
Copy link

hsk9169 commented Apr 6, 2021

@cang233 the link is broken.. plz provide me another link

@junjiezou1
Copy link

Have you solved the problem yet???

@junjiezou1
Copy link

Enter the following command:

export CGO_CFLAGS_ALLOW="."
export CGO_LDFLAGS_ALLOW=".
"

@caida-ricky
Copy link

The above command no longer works in go1.19, instead you need to specify the regex.

export CGO_LDFLAGS_ALLOW="-Wl,--(no-)?whole-archive"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants