Compile Error Under Cygwin: Undefined Symbol "INFINITY"

Is anyone familiar with the following error? I don’t see it already on
the
list.

g++ -DHAVE_CONFIG_H -I. -I…/…/…/… -DOMNITHREAD_POSIX=1
-I…/…/…/…/omnith
read -I…/…/…/…/gnuradio-core/src/lib/runtime
-I…/…/…/…/gnuradio-core/src
/lib/general -I…/…/…/…/gnuradio-core/src/lib/general
-I…/…/…/…/gnuradio-
core/src/lib/gengen -I…/…/…/…/gnuradio-core/src/lib/gengen
-I…/…/…/…/gnu
radio-core/src/lib/filter -I…/…/…/…/gnuradio-core/src/lib/filter
-I…/…/…/
…/gnuradio-core/src/lib/reed-solomon
-I…/…/…/…/gnuradio-core/src/lib/io -I.
./…/…/…/gnuradio-core/src/lib/g72x
-I…/…/…/…/gnuradio-core/src/lib/swig -
I…/…/…/…/gnuradio-core/src/lib/swig -I/usr/local/include
-I/usr/include/boos
t-1_33_1/ -I/usr/local/include -g -O2 -Wall -Woverloaded-virtual -MT
gr_peak_det
ector_fb.lo -MD -MP -MF .deps/gr_peak_detector_fb.Tpo -c
gr_peak_detector_fb.cc
-DDLL_EXPORT -DPIC -o .libs/gr_peak_detector_fb.o
gr_peak_detector_fb.cc: In member function virtual int gr_peak_detector_fb::wor k(int, gr_vector_const_void_star&, gr_vector_void_star&)': gr_peak_detector_fb.cc:64: error:INFINITY’ undeclared (first use this
function
)
gr_peak_detector_fb.cc:64: error: (Each undeclared identifier is
reported only o
nce for each function it appears in.)
make[6]: *** [gr_peak_detector_fb.lo] Error 1

I’m using current svn under Cygwin with GCC 3.4.4-3. Obviously this is
a
constant that somehow got undefined. If I were to go in and give it a
quick
fix via #define INFINITY (something), what would I use?

Thanks,
Reid

----- Original Message -----
From: “Reid N Kleckner” [email protected]
To: [email protected]
Sent: Wednesday, August 08, 2007 2:17 PM
Subject: [Discuss-gnuradio] Compile Error Under Cygwin: Undefined
Symbol"INFINITY"

-I.
k(int, gr_vector_const_void_star&, gr_vector_void_star&)’:
quick
fix via #define INFINITY (something), what would I use?

When building from the svn repository on Cygwin, I use the following:

CPPFLAGS="-DNOMINMAX -DINFINITY=HUGE_VAL"
./configure --with-boost-include-dir=/usr/include/boost-1_33_1

INFINITY appears to be (inadvertently?) omitted from the Cygwin include
files. NOMINMAX works around a Microsoft incompatibility with ANSI C++
(required when using libusb 0.1.12; see
http://www.gnuradio.org/trac/ticket/145).

– Don W.

So, that advice fixed that problem. Now I have a problem similar to the
one
documented here: http://www.gnuradio.org/trac/ticket/138 I applied the
patch
listed there, but my error has not gone away:

/usr/src/gnuradio/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.cc:(.text+
0x325be): undefined reference to omni_thread::init_t::init_t()' /usr/src/gnuradio/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.cc:(.text+ 0x325dc): undefined reference toomni_thread::init_t::~init_t()’

Is there a similar fix to make it link/include/magic omnithread before
building
the rest of the code?

Thanks,
Reid

Quoting Don W. [email protected]:

----- Original Message -----
From: “Reid N Kleckner” [email protected]
To: “Don W.” [email protected]
Cc: [email protected]
Sent: Wednesday, August 08, 2007 4:33 PM
Subject: SVN Compile Error Under Cygwin: Omnithread Stuff

Is there a similar fix to make it link/include/magic omnithread before
building
the rest of the code?

As far as I know, no agreement has been reached on the right way to
handle
this, but the attached patches work for me. Use them instead of the
ones
from ticket 138.

– Don W.

On Wed, Aug 08, 2007 at 05:10:12PM -0400, Don W. wrote:

documented here: http://www.gnuradio.org/trac/ticket/138 I applied the
the rest of the code?

As far as I know, no agreement has been reached on the right way to handle
this, but the attached patches work for me. Use them instead of the ones
from ticket 138.

– Don W.

Here’s a bit of background on this issue:

Though Don’s patches do work around the problem that we see on Cygwin,
they violate the “write it once” principle. That is, they force us to
encode in multiple places the external dependencies of particular
libraries. This is just plain ugly and encourages bit rot.
The libtool .la files already contain this information. It may be
that libool needs some work for Cygin, though I’m not sure about this.

Eric