Error compiling latest yara-python code
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start with setup.py and the YARA submodule build path, then compare the flags in yara/configure.ac with the gcc invocation shown in the report. Inspect yara/libyara/tlshc/tlsh_impl.h to trace the missing definitions. Done means yara-python builds successfully on the reported Rocky Linux environment with the TLSH configuration flags applied.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
I'm trying to compile the latest yara-python code (version 4.2.3), and I'm getting a compilation error. I'm doing the build on a system running Rocky Linux 8.5. These are the commands I'm using to build the code:
git clone --recursive https://github.com/VirusTotal/yara-python
cd yara-python
python3 setup.py build
These are the compilation errors I'm getting:
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -D_GNU_SOURCE=1 -DUSE_LINUX_PROC=1 -DHAVE_STDBOOL_H=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.6m -c yara/libyara/tlshc/tlsh.c -o build/temp.linux-x86_64-3.6/yara/libyara/tlshc/tlsh.o -std=c99
In file included from yara/libyara/tlshc/tlsh.c:3:
yara/libyara/tlshc/tlsh_impl.h:61:28: error: ‘TLSH_CHECKSUM_LEN’ undeclared here (not in a function)
unsigned char checksum[TLSH_CHECKSUM_LEN];
^~~~~~~~~~~~~~~~~
yara/libyara/tlshc/tlsh_impl.h:72:28: error: ‘CODE_SIZE’ undeclared here (not in a function); did you mean ‘FD_SETSIZE’?
unsigned char tmp_code[CODE_SIZE];
^~~~~~~~~
FD_SETSIZE
error: command 'gcc' failed with exit status 1
I successfully built yara 4.2.3 from source earlier; I'm only getting this error when building yara-python.
While looking into the error, I found the following lines in yara/configure.ac, which appear to set the proper variables in order to define the missing TLSH_CHECKSUM_LEN and CODE_SIZE variables:
Configure TLSH function
CFLAGS="$CFLAGS -DBUCKETS_128=1 -DCHECKSUM_1B=1"
These extra flags don't appear to be passed along to gcc, however.
Any ideas would be greatly appreciated.
Thanks,
-Bill
- Ngôn ngữ chính
- C
- Star
- 754
- Fork
- 190
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của VirusTotal/yara-python
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
VirusTotal/yara-python#263 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 28/100
VirusTotal/yara-python#234 · 2 bình luận ·
-
Missing python interface fileĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
VirusTotal/yara-python#218 · 3 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
VirusTotal/yara-python#216 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
VirusTotal/yara-python#199 · 3 bình luận ·
Tất cả issue của VirusTotal/yara-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
libretro/libretro-common#233 ·
-
area:lint-tooling bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
InauguralSystems/EigenScript#1340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BasedHardware/omi#19047 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100