PrincetonVision / marvin

Marvin: A Minimalist GPU-only N-Dimensional ConvNets Framework
MIT License
422 stars 137 forks source link

add cmake support #24

Closed fyu closed 8 years ago

danielsuo commented 8 years ago

This might fail on OS X, which has cuda in lib instead of lib64.

On Thu, Dec 3, 2015 at 3:51 PM, Fisher Yu notifications@github.com wrote:

You can view, comment on, or merge this pull request online at: https://github.com/PrincetonVision/marvin/pull/24 -- Commit Summary --

fyu commented 8 years ago

@danielsuo Can you test it on Mac? I think it will work. I do want to clean up the file in a following commit.

danielsuo commented 8 years ago

Resolved both the lib vs lib64 issue and the pthread problem. It turns out that TRY_COMPILE on OS X doesn't want to work for pthread.h because we need to enable both C and CXX in the project command.

On Thu, Dec 3, 2015 at 5:01 PM, Fisher Yu notifications@github.com wrote:

@danielsuo https://github.com/danielsuo Can you test it on Mac? I think it will work. I do want to clean up the file in a following commit.

— Reply to this email directly or view it on GitHub https://github.com/PrincetonVision/marvin/pull/24#issuecomment-161798718 .

danielsuo commented 8 years ago

Both 2cf9229 and c7b834c cause the error pasted below on Ubuntu 15.04 for me. Fixed with 6f9f4f0.

/usr/bin/ld: CMakeFiles/marvin.dir/marvin_generated_marvin.cu.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/marvin.dir/build.make:375: recipe for target 'marvin' failed
make[2]: *** [marvin] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/marvin.dir/all' failed
make[1]: *** [CMakeFiles/marvin.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2
fyu commented 8 years ago

Resolved by commit @947c456d80e4710d130b13ac4314029f3cf48259