patch-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patch-gnuradio] quick fixes for next on Cygwin with gcc 4.5.0


From: Don Ward
Subject: [Patch-gnuradio] quick fixes for next on Cygwin with gcc 4.5.0
Date: Wed, 9 Mar 2011 13:37:31 -0500

Here are some quick fixes for building the 'next' branch on Cygwin with gcc 4.5.0. They address the following problems:

(1) config/grc_gr_uhd.m4:
error in configure --disable-uhd:
conditional "GR_DEFINE_HAVE_UHD" was never defined
-> fixed by moving AM_CONDITIONAL outside of 'if'

(2) io/gr_{tagged_file_sink,wavefile_source}.h, runtime/gr_error_handler.h:
'FILE' does not name a type
-> fixed by #include <stdio.h>

(3) usrp/host/lib/db_{flexrf,wbxng}.cc:
'nanosleep' was not declared in this scope
-> fixed by #include <time.h>

(4) usrp/host/lib/fusb_win32.h:
fprintf and stderr not declared
-> fixed by #include <stdio.h>

(5) gr-usrp/src/{usrp_swig.i,Makefile.am}:
macro "min" requires 2 arguments, but only 1 given
caused by <usb.h> #including <windows.h>, which #defines min and max, preventing boost from using them as identifiers -> fixed by #include "config.h" (which #defines NOMINMAX) in usrp_swig.i and adding $(DEFAULT_INCLUDES) (which has the include path to config.h) to usrp_swig_swig_args in Makefile.am

(6) gnuradio-core/src/tests/benchmark_dotprod_cc[cf].cc:
fails because input is not 8-bit aligned (it was allocated on the stack, which only guarantees 4-bit alignment for floats---including, apparently, gr_complex)
-> fixed by using new to allocate input

Other issues not completely addressed by attached patch:

(1) make check fails because exceptions generated while trying the shm factories are not caught due to limitations in the Cygwin gcc4 exception handling and stack unwinding code. I suggest adding a configure option to specify the vmcircbuf method to use (with default to try them all, as is done now)).

(2) make check fails because of cancellation errors in qa_gri_fir_filter_with_buffer_ccc.cc. The average data element has a magnitude of 5e8, but one data point in the result has magnitude < 7e5 and error 2e1. I suggest using an error tolerance of 0.5*sqrt(n)*MAX_DATA*MAX_DATA*ERR_DELTA. This works for the file test that failed, but a proper fix needs review by others and should be applied to all similar tests.

(3) gnuradio-core/src/tests/benchmark*.cc: Times reported when clock() is used are off by 1e6. The factor of 1000000. needs to be removed. Because of the number of examples involved, I suggest moving the common timing code to a separate source file. All that is needed is a function to return the current time (user+system for rusage, or whatever for clock) as a double.

-- Don W.

Attachment: diff-110309.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]