kbandla / pydeep

Python bindings for ssdeep
Other
91 stars 33 forks source link

pydeep fails on OSX 10.9.5 #8

Closed GelosSnake closed 10 years ago

GelosSnake commented 10 years ago

it seems that it can't locate file:

running install running build running build_ext building 'pydeep' extension cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pydeep.c -o build/temp.macosx-10.9-intel-2.7/pydeep.o pydeep.c:2:10: error: 'fuzzy.h' file not found with include; use "quotes" instead

include

     ^~~~~~~~~
     "fuzzy.h"

1 error generated. error: command 'cc' failed with exit status 1

kbandla commented 10 years ago

Hi @SnakeByteIL pydeep needs ssdeep to build. Looks like the installer is unable to find libssdeep and its headers(fuzzy.h) Or do you have ssdeep installed at a non standard location?

GelosSnake commented 10 years ago

Nop it's installed also ssdeep works. Was also trying via brew ssdeep and still failed On Oct 15, 2014 5:35 PM, "Kiran Bandla" notifications@github.com wrote:

Hi @SnakeByteIL https://github.com/SnakeByteIL pydeep needs ssdeep to build. Looks like the installer is unable to find libssdeep and its headers(fuzzy.h) Or do you have ssdeep installed at a non standard location?

— Reply to this email directly or view it on GitHub https://github.com/kbandla/pydeep/issues/8#issuecomment-59214747.

SnakeByte - Advanced Malicious Cyber Attacks Simulations www.SnakeByte.co.il http://www.snakebyte.co.il/

kbandla commented 10 years ago

I just installed ssdeep and pydeep on a fresh 10.9.5 and it worked. Based on the pydeep build logs you posted, it looks like the build was for i386. Can you make sure that ssdeep was i386 as well? If not, set the arch to x86_64: export ARCHFLAGS='-arch x86_64' And then try pydeep build again?

If that still fails, can you post the "otool -L" and "file" output for the ssdeep binary? And the version of ssdeep too.

(I will add the architecture check to the setup.py script soon.)

GelosSnake commented 10 years ago

ssdeep -V 2.9 installed in /usr/local/bin/ssdeep

otool -L ssdeep ssdeep: /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

kbandla commented 10 years ago

Not sure whats going on here, but forcing setup.py to look in /usr/local/include for fuzzy.h seems to solve this corner case. Adding the two lines to setup.py should make it work. Also, this is how you make setup.py look in non-standard locations.

kai5263499 commented 9 years ago

Out of curiosity, why was this marked as wontfix?

kbandla commented 9 years ago

@kai5263499 you might be onto something. I dont see why i cant update setup.py to include those two paths. What say you?

kai5263499 commented 9 years ago

So long as it doesn't break the build for other platforms I say go for it. I changed setup.py to get it to build on FreeBSD 10 so it appears that this issue affects both OSX and BSD platforms at least.

GelosSnake commented 9 years ago

Just a reminder I've had the same problem again with the newest version of OSX - 10.10.3

It was solved using your previous changes to setup.py: https://gist.github.com/kbandla/51d53470710e4ca77c90

kbandla commented 9 years ago

Finally got this into 54aa11da8db4213db2e84d202822fe0a81f5f565

GelosSnake commented 9 years ago

thanks