I got it compiled (if anyone is interested) with the attached rough patch.
Here are the steps I took:

# compile latest Cheetah
wget https://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz
tar -zxf Cheetah-2.4.4.tar.gz
cd Cheetah-2.4.4
python setup.py build
python setup.py install

# compile gnuradio
GNUR=gnuradio-3.7.8
wget http://gnuradio.org/releases/gnuradio/$GNUR.tar.gz
tar -zxf $GNUR.tar.gz
# apply patch

[ -d $GNUR/build ] || mkdir $GNUR/build
cd $GNUR/build

cmake \
    -DENABLE_DEFAULT=False \
    -DENABLE_VOLK=True \
    -DENABLE_GNURADIO_RUNTIME=True \
    -DENABLE_GR_BLOCKS=True \
    -DENABLE_GR_FFT=True \
    -DENABLE_GR_FILTER=True \
    -DENABLE_GR_ANALOG=True \
    -DENABLE_GR_AUDIO=True \
    -DENABLE_GR_CHANNELS=True \
    -DENABLE_GR_CTRLPORT=True \
    -DENABLE_GR_DIGITAL=True \
    -DENABLE_GR_FCD=False \
    -DENABLE_GR_FEC=True \
    -DENABLE_GR_NOAA=True \
    -DENABLE_GR_PAGER=True \
    -DENABLE_GR_VOCODER=True \
    -DENABLE_GR_WAVELET=True \
    -DENABLE_GR_UTILS=True \
    -DENABLE_GRC=True \
    -DENABLE_GR_DTV=True \
    -DENABLE_GR_ATSC=True \
    -DENABLE_GR_VIDEO_SDL=True \
    -DENABLE_PYTHON=True \
    ..
make
make install
export PYTHONPATH=/usr/local/lib/python2.7/site-packages
gnuradio-companion


On Sun, Aug 23, 2015 at 10:03 PM, Matt Dunford <[email protected]> wrote:

> Has anyone had any luck compiling the latest 3.7.8 on cygwin?  I'm running
> into the following:
>
> [ 14%] Built target pygen_python_volk_modtool_95e3e
> [ 14%] Built target pmt_generated
> [ 15%] Built target gnuradio-pmt
> Scanning dependencies of target gnuradio-runtime
> [ 15%] Building CXX object
> gnuradio-runtime/lib/CMakeFiles/gnuradio-runtime.dir/thread/thread.cc.o
> /home/matt/src/gnuradio-3.7.8/gnuradio-runtime/lib/thread/thread.cc:245:23:
> fatal error: sys/prctl.h: No such file or directory
>  #include <sys/prctl.h>
>                        ^
> compilation terminated.
>
> I don't believe sys/prctl.h exists in cygwin (or even all flavors of
> unix).  Am I missing something obvious?
>
> --
> -- Matt Dunford -- [email protected]
>



-- 
-- Matt Dunford -- [email protected]
Only in ../gnuradio-3.7.8: build
diff -ur ./gnuradio-3.7.8/gnuradio-runtime/lib/CMakeLists.txt 
../gnuradio-3.7.8/gnuradio-runtime/lib/CMakeLists.txt
--- ./gnuradio-3.7.8/gnuradio-runtime/lib/CMakeLists.txt        2015-08-05 
11:54:39.000000000 -0700
+++ ../gnuradio-3.7.8/gnuradio-runtime/lib/CMakeLists.txt       2015-08-26 
14:13:24.179705200 -0700
@@ -149,7 +149,7 @@
 IF(HAVE_WINDOWS_H)
     ADD_DEFINITIONS(-DHAVE_WINDOWS_H -DUSING_WINSOCK -DWIN32_LEAN_AND_MEAN)
     MESSAGE(STATUS "Adding windows libs to gnuradio runtime libs...")
-    LIST(APPEND gnuradio_runtime_libs WS2_32.lib WSock32.lib)
+    LIST(APPEND gnuradio_runtime_libs ws2_32 wsock32)
 ENDIF(HAVE_WINDOWS_H)
 
 #need to link with librt on ubuntu 11.10 for shm_*
diff -ur ./gnuradio-3.7.8/gnuradio-runtime/lib/thread/thread.cc 
../gnuradio-3.7.8/gnuradio-runtime/lib/thread/thread.cc
--- ./gnuradio-3.7.8/gnuradio-runtime/lib/thread/thread.cc      2014-10-01 
11:08:16.000000000 -0700
+++ ../gnuradio-3.7.8/gnuradio-runtime/lib/thread/thread.cc     2015-08-26 
13:14:36.769280900 -0700
@@ -242,7 +242,10 @@
 #include <sstream>
 #include <stdexcept>
 #include <pthread.h>
+
+#ifndef __CYGWIN__
 #include <sys/prctl.h>
+#endif
 
 namespace gr {
   namespace thread {
@@ -276,6 +279,7 @@
     void
     thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
     {
+#ifndef __CYGWIN__
       cpu_set_t set;
       size_t len = sizeof(cpu_set_t);
       std::vector<int> _mask = mask;
@@ -291,6 +295,7 @@
         s << "thread_bind_to_processor failed with error: " << ret << 
std::endl;
         throw std::runtime_error(s.str());
       }
+#endif
     }
 
     void
@@ -302,6 +307,7 @@
     void
     thread_unbind(gr_thread_t thread)
     {
+#ifndef __CYGWIN__
       cpu_set_t set;
       size_t len = sizeof(cpu_set_t);
 
@@ -317,6 +323,7 @@
         s << "thread_unbind failed with error: " << ret << std::endl;
         throw std::runtime_error(s.str());
       }
+#endif
     }
 
     int
@@ -366,7 +373,9 @@
         name = name.substr(0, std::max(0, max_len - ((int)name.size() - (i + 
1)))) + name.substr(i + 1);
       }
 
+#ifndef __CYGWIN__
       prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
+#endif
     }
 
   } /* namespace thread */
diff -ur ./gnuradio-3.7.8/gr-blocks/lib/ConfigChecks.cmake 
../gnuradio-3.7.8/gr-blocks/lib/ConfigChecks.cmake
--- ./gnuradio-3.7.8/gr-blocks/lib/ConfigChecks.cmake   2014-07-30 
13:39:51.000000000 -0700
+++ ../gnuradio-3.7.8/gr-blocks/lib/ConfigChecks.cmake  2015-08-26 
15:38:43.720304300 -0700
@@ -56,7 +56,7 @@
 IF(HAVE_WINDOWS_H)
     ADD_DEFINITIONS(-DHAVE_WINDOWS_H -DUSING_WINSOCK)
     MESSAGE(STATUS "Adding windows libs to gr blocks libs...")
-    LIST(APPEND blocks_libs WS2_32.lib WSock32.lib)
+    LIST(APPEND blocks_libs ws2_32 wsock32)
 ENDIF(HAVE_WINDOWS_H)
 
 ########################################################################
diff -ur ./gnuradio-3.7.8/gr-dtv/lib/dvbt/dvbt_reed_solomon.cc 
../gnuradio-3.7.8/gr-dtv/lib/dvbt/dvbt_reed_solomon.cc
--- ./gnuradio-3.7.8/gr-dtv/lib/dvbt/dvbt_reed_solomon.cc       2015-08-05 
11:54:39.000000000 -0700
+++ ../gnuradio-3.7.8/gr-dtv/lib/dvbt/dvbt_reed_solomon.cc      2015-08-26 
23:46:04.100361000 -0700
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <fstream>
+#include <tgmath.h>
 
 using namespace std;
 
@@ -42,7 +43,7 @@
       d_p = p; d_m = m;
 
       //maximum number of elements in the GF(p^m)
-      int q = powl(p, m);
+      int q = pow(p, m);
 
       d_gf_exp = new unsigned char[q];
       if (d_gf_exp == NULL) {
diff -ur ./gnuradio-3.7.8/volk/gen/volk_tmpl_utils.py 
../gnuradio-3.7.8/volk/gen/volk_tmpl_utils.py
--- ./gnuradio-3.7.8/volk/gen/volk_tmpl_utils.py        2015-08-05 
11:56:08.000000000 -0700
+++ ../gnuradio-3.7.8/volk/gen/volk_tmpl_utils.py       2015-08-26 
11:55:21.065383200 -0700
@@ -21,13 +21,13 @@
 #
 
 import os
+from Cheetah import Template
 import re
 import sys
 import optparse
 import volk_arch_defs
 import volk_machine_defs
 import volk_kernel_defs
-from Cheetah import Template
 
 def __escape_pre_processor(code):
     out = list()
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to