VirusTotal / yara-python

The Python interface for YARA
http://virustotal.github.io/yara/
Apache License 2.0
648 stars 179 forks source link

4.0 Release is causing Installation issues #143

Closed patrickml closed 2 years ago

patrickml commented 4 years ago

After the 4.0 release, our builds are now failing we will revert to use 3.11.0 but the error is coming from yara/libyara/scanner.c:681:3 stating that use option -std=c99.

Sadly I cannot post the whole error but I can post the above.

wxsBSD commented 4 years ago

There is a variable declaration in that line, which is only supported in c99.

for (uint32_t i = 0; i < scanner->rules->num_rules; i++)

Is there any reason you can't get your compiler to use c99 as a workaround for now? The fix is trivial (I'll put up a PR now) but you can work around this if your toolchain is reasonably modern.

plusvic commented 4 years ago

This is not the only place where variables have been defined in the "for" loop. One of the good things about abandoning support for Python 2.7 is that we don't need to use old Visual Studio compilers anymore, and can adopt C99 standard.

@patrickml can you provide details about your platform? Which compiler are you using?

patrickml commented 4 years ago

Sadly I don't think I can share all of the details, but I can say we are using a later version of RHEL and we are using python 3 I'll take a look @ the GCC version we are using, but I don't think I can post it. What version would you recommend we use?