hillu/go-yara

Documentation Is Not Clear

Closed this issue · 3 comments

The document of go-yara is not clear enough (build steps), After I read the compilation procedure documentation, I still don't know how the file directory is composed, and how to set the environment variables

image

hillu commented

Those are essentially three commands that you can paste as-is into a UNIX shell, provided that those variables are set. (Backslashes are line continuations.)

Let's try putting the three commands into long lines. Does this work for you?

( cd ${YARA_BUILD_LINUX_MUSL} && ${YARA_SRC}/configure CC=musl-gcc --prefix=${PREFIX_LINUX_MUSL} )

make -C ${YARA_BUILD_LINUX_MUSL} install

GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=musl-gcc PKG_CONFIG_PATH=${PREFIX_LINUX_MUSL}/lib/pkgconfig go build -ldflags '-extldflags "-static"' -tags yara_static -o simple-yara-musl ./_examples/simple-yara

I know these are three ENV VAR. but How to set it correctly? what's your project tree?

hillu commented

I have added a paragraph describing the YARA_* variables. Feelfree to reopen this issue if things are still unclear.