- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried compiling the runtime on latest Cygwin w/ GCC 5.3, but ran into some errors which are solved with the patch below.
A few of the code samples do work well under Cygwin (e.g. Fibonacci), but some don't (cilk-reducers-demo never finishes). Unfortunately I'm at the limit of my debugging skills and time to figure out why.
diff -Naur cilkplus-rtl-src-004420/runtime/os-unix.c cilkplus-rtl-src-004420_cygwin/runtime/os-unix.c --- cilkplus-rtl-src-004420/runtime/os-unix.c 2015-11-09 22:27:52.000000000 +0100 +++ cilkplus-rtl-src-004420_cygwin/runtime/os-unix.c 2016-02-11 11:54:05.473915000 +0100 @@ -432,7 +432,8 @@ #elif defined(__MIC__) _mm_delay_32(1024); #elif defined(__linux__) || \ - defined(__APPLE__) + defined(__APPLE__) || \ + defined(__CYGWIN__) usleep(10000); #else # error "Unsupported architecture" @@ -452,6 +453,7 @@ { #if defined(__ANDROID__) || \ defined(__APPLE__) || \ + defined(__CYGWIN__) || \ defined(__FreeBSD__) || \ defined(__VXWORKS__) || \ (defined(__sun__) && defined(__svr4__)) diff -Naur /cygdrive/d/Downloads/cilk/cilkplus-rtl-src-004420/runtime/sysdep-unix.c cilkplus-rtl-src-004420/runtime/sysdep-unix.c --- cilkplus-rtl-src-004420/runtime/sysdep-unix.c 2015-11-09 22:27:54.000000000 +0100 +++ cilkplus-rtl-src-004420_cygwin/runtime/sysdep-unix.c 2016-02-10 18:08:51.610235700 +0100 @@ -568,7 +568,7 @@ { // dladdr is a glibc extension. If it's available, use it to find the path // for libcilkrts.so -#ifdef _GNU_SOURCE +#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) Dl_info info; if (0 != dladdr(dummy_function, &info)) return info.dli_fname;
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had no clue it might be as simple as this to take a step forward. I assumed the cilkplus project had no intention of supporting cygwin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Correct. We did get the runtime building for Cygwin at one point, with GCC 4.8 or so, but that was more to demonstrate that it could be done. We had no plans to support Cygwin as a target platform. But we did leave the #ifdef's in the code. :o)
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to build gcc trunk on cygwin with --enable-libcilkrts, I still get the configure not supported message.
I tried to test the recent release of gcc 5.3 including cilkplus, but there are still previously reported failures associated with apparent non-support of reducers etc and additional difficult to diagnose run-time segfaults which vary with compile flags. Few cases are running successfully.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page