Closed santalvarez closed 7 months ago
This is an example BUILD file that we use ourselves in VirusTotal, the only difference with yours is the absense of the @com_github_virustotal_yara//:
prefix in module source paths. So, you may try that.
load("@com_github_virustotal_yara//:bazel/yara.bzl", "yara_library")
yara_library(
name = "libyara",
modules = [
# Standard open-source modules.
"cuckoo",
"elf",
"hash",
"magic",
"math",
"pe",
"tests",
"time",
"dotnet",
],
modules_srcs = [
"libyara/modules/cuckoo/cuckoo.c",
"libyara/modules/elf/elf.c",
"libyara/modules/hash/hash.c",
"libyara/modules/magic/magic.c",
"libyara/modules/math/math.c",
"libyara/modules/pe/pe.c",
"libyara/modules/pe/pe_utils.c",
"libyara/modules/tests/tests.c",
"libyara/modules/time/time.c",
"libyara/modules/dotnet/dotnet.c",
],
deps = [
"@jansson//:jansson",
"@magic//:magic",
]
)
That works! Thanks
Hi, I have a project where I want to use the yara library but im having trouble building it.
This is how I have my project set up:
WORKSPACE file
BUILD file
The problem comes when I try to build the
libyara
dependency and I get the errors shown below which indicate some problems with the visibility of the files. Is it possible to do this? Or is the current bazel config in yara only meant to be used to build the standalone yara lib. (Im a bazel noob so I apologize if Im not understanding something).