biometrics / likely

A compiler intermediate representation for image recognition and heterogeneous computing.
http://www.liblikely.org
Other
78 stars 11 forks source link

Windows build fails with CMake 3.2.1 #55

Closed fgenolini closed 9 years ago

fgenolini commented 9 years ago

Windows 7, Visual Studio 2013 Professional Update 4, Python 2.7 with NumPy CMake 3.2.1 configured to generate a VisualStudio 2013 SLN file Generated library is called liblikely.lib instead of likely.lib If library is manually renamed, likely.exe starts but crashes at the first line of code

Would you have pre-built binaries for Windows 7 and Mac OSX so that I can try to run this? At the moment I fully fail to build and install Likely everywhere I have tried.

Regards,

Francois Genolini

Aberdeen, Scotland

jklontz commented 9 years ago

Hey, sorry you are having trouble! I'm not set up to ship pre-built binaries yet. You might try downgrading CMake to 2.8.12.2, I haven't moved my buildbots to 3.x yet.

fgenolini commented 9 years ago

I have CUDA 7... and this seems to break many things too (compute_11 no longer supported, I run on Maxwell hardware: compute_50 and above, so I have edited the CMake configuration to start at compute_20, and this helps a bit during compilation)

Tried configuring with CMake 2.8.12.2, Windows 7 (64 bit build, Debug), similar behaviour. The project likely_shared did not link (again a CUDA 7 issue where the SDK path was not listed in the linker additional library directories, maybe a CMake issue?), therefore likely.lib was never created. After editing the project files, I got more success, but there are still issues remaining. Will persist and see how far I can go

jklontz commented 9 years ago

Seeing as you're the first person to post compilation issues, I'm going to assume that you're also the first person to actually try using the project, so I feel very compelled to help you work through these issues :)

The CUDA backend is incomplete, and it's my mistake for not turning it off by default. Will fix this weekend or Monday. Thanks for your persistence!

fgenolini commented 9 years ago

On Windows 7, I have rebuilt / recompiled as 32 bit, and I get the same behavior: very simple one line code works such as (read-image "data/misc/lenna.tiff") When you run anything more complicated such as the hello-world function, then there is an Access violation Test results on Windows 8.1 (32-bit build using Windows 8.1 SDK with VisualStudio 2013 Update 4): 97% tests passed, 7 tests failed out of 232 The following tests FAILED: 2 - benchmark_parallel (SEGFAULT) 224 - mandelbrot_set (Not Run) 225 - mandelbrot_set-m (Not Run) 226 - gabor_wavelet (Not Run) 227 - gabor_wavelet-m (Not Run) 228 - hello_world_interpreted (SEGFAULT) 229 - hello_world_jit (SEGFAULT)

I have also tried with the latest Ubuntu Linux 14.10... and a change in ffmpeg (excluded from the distribution for political reasons, replaced by libav) breaks the build of OpenCV (CODEC_ID_XXX no longer defined), so cap_ffmpeg.cpp does not compile any more, as described in https://help.ubuntu.com/community/OpenCV . If using the libopencv from utbuntu (and a few other mods), then all compile, and all 234 tests pass. I can also run the tutorials on Linux. I still have issues with the tutorials on Mac OSX, still working on fault finding these.

So it looks like both Linux and Mac builds can be made to work, but the Windows port still eludes me for the moment.

Please note: there is a spelling mistake in the tutorial section "Likely as a Pre-compiler" benifits instead of benefits

In the same section you refer to static instead of precompiled for the name of the C source file.

The last tutorial (hello_world_main) fails to save the PNG output file (no error message)

When encountering typing errors in lisp source code (error message: invalid atom at:), the likely parser generates seg faults / core dumps, not quite the user friendly llvm / cfront behaviour usually found for C / C++ / Objective C ;-)

jklontz commented 9 years ago

FYI first attempt at pre-built binaries now available: http://liblikely.org/?href=README.md

fgenolini commented 9 years ago

Thanks

The URLs are not yet valid, but I appreciate the thought.

Regards,

jklontz commented 9 years ago

Clearly I didn't try actually clicking on them :) Fixed in b7f27a10a183ddabea680deb8a920880aa4c13b2

fgenolini commented 9 years ago

Thanks, I have just tried the OSX binaries and they kind of work (see below).

The Hello World still has typos ;0) The section "Likely as a Pre-compiler" refers to hello_world_static.c instead of hello_world_precompiled.c

Also as before with my own OSX executable, I cannot get the hello_world_main to create the file dark_lenna_main.png using the instructions from the section "Likely as a Standalone Language". The line

(write dst (argv 2))

seems to do nothing

jklontz commented 9 years ago

Both issues should be fixed now, thanks for reporting. Fresh binaries will be uploaded automatically in a few minutes once the buildbots finish. The bug was that I had marked write as read-only and so LLVM optimized out the call :)