flier / gohs

GoLang Binding of HyperScan https://www.hyperscan.io/
Other
280 stars 51 forks source link

Undefined C symbols when system has libhyperscan-4.7.0 #12

Closed gshimansky closed 6 years ago

gshimansky commented 6 years ago

Ubuntu has upgraded libhyperscan-dev to version 4.7.0-1 and now gohs/hyperscan doesn't build:

go get -v github.com/flier/gohs/hyperscan
github.com/flier/gohs/hyperscan
# github.com/flier/gohs/hyperscan
../../../../../flier/gohs/hyperscan/internal.go:119:32: could not determine kind of name for C.HS_FLAG_COMBINATION
../../../../../flier/gohs/hyperscan/internal.go:120:32: could not determine kind of name for C.HS_FLAG_QUIET

I updated my copy commenting lines 119, 120, 133 and 134 and now I can build the library, but I am not sure whether it is a right approach.

dkolistratova commented 6 years ago

Maybe makes sense to introduce tags and versions, to have an ability to checkout 4.7 (now it is 5.0 as I see)

flier commented 6 years ago

Please try to use go build -tags hyperscan_v4, anything I missed?

gshimansky commented 6 years ago

Yes, works for me now on Ubuntu 18.08 with libhyperscan-dev-4.7.0-1 and go get -tags hyperscan_v4. We can use this switch in our Travis script now.

flier commented 6 years ago

Thanks for your feedback!