You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead I get a number of linker errors about missing symbols from libyara, such as:
/tmp/go-build548616898/b001/_pkg1_.a(_x013.o): In function `_cgo_5e5c217eb5fc_Cfunc_yr_rules_define_boolean_variable':
/tmp/go-build/cgo-gcc-prolog:46: undefined reference to `yr_rules_define_boolean_variable'
The go-yara library contains a file cgo.go that contains the following lines:
Bypassing pkg-config, by either setting CGO_LDFLAGS or passing the no_pkg_config build tag, results in a working binary.
Replacing the three lines with
// #cgo pkg-config: yara
does not work.
Running go-8 build -a -x main.go shows that pkg-config --cflags yara and pkg-config --libs yara are executed. The latter corretctly emits -lyara, but that string appears only in the cgo call...
The quoting code that read _cgo_flags, currently only in the gccgo
version of cmd/go, was losing the last flag read from the file.
Fixesgolang/go#23666
Reviewed-on: https://go-review.googlesource.com/91655
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257373 138bc75d-0d04-0410-961f-82ee72b054a4
The quoting code that read _cgo_flags, currently only in the gccgo
version of cmd/go, was losing the last flag read from the file.
Fixesgolang/go#23666
Reviewed-on: https://go-review.googlesource.com/91655
From-SVN: r257373
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10rc1 gccgo (Debian 8-20180130-1) 8.0.1 20180130 (experimental) [trunk revision 257194] linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I treid to build the following simple program, using
go-8 build main.go
:What did you expect to see?
A working binary that is (uselessly) linked against libyara.so.3, like so:
What did you see instead?
Instead I get a number of linker errors about missing symbols from libyara, such as:
The go-yara library contains a file
cgo.go
that contains the following lines:Some things I have tried:
no_pkg_config
build tag, results in a working binary.go-8 build -a -x main.go
shows thatpkg-config --cflags yara
andpkg-config --libs yara
are executed. The latter corretctly emits-lyara
, but that string appears only in thecgo
call...The text was updated successfully, but these errors were encountered: