sipcapture / heplify-server

HEP Capture Server for HOMER
https://sipcapture.org
GNU Affero General Public License v3.0
184 stars 85 forks source link

complie error in MacOS #472

Closed Gomam0n closed 3 years ago

Gomam0n commented 3 years ago

I get the source code of heplify-server with go get github.com/sipcapture/heplify-server

Then I compile it with "make", but an error occur: go build github.com/sipcapture/golua/lua: invalid flag in pkg-config --libs: -pagezero_size

I have no idea how to fix this error. Can you help me with this?

negbie commented 3 years ago

Hi @Gomam0n, I think you need to use CGO_CFLAGS_ALLOW/CGO_LDFLAGS_ALLOW on macOS like explained here https://github.com/golang/go/wiki/InvalidFlag#what-can-i-do

But I've never tried it myself. Mby @lmangani or @adubovikov have more experience with macOS and can help.

adubovikov commented 3 years ago

i am also a poor linux guy :-) but let me try on VM

joshelson commented 3 years ago

It is preferred to be a poor Linux guy. ;) I ran across this as well and the hack solution was:

export CGO_LDFLAGS_ALLOW='(-pagezero_size|100000000|10000|-image_base)'

There may be a few other issues here with very modern versions of OS X, but this resolved the invalid flags issues.

adubovikov commented 3 years ago

since no activity here - I close the ticket