Compile errors with gcc-4.4

Hi all-

I just installed Fedora 11 x86_64 which features gcc-4.4. I get compile
errors such as:

“gr_fft_filter_ccc.cc: In member function ‘void
gr_fft_filter_ccc::compute_sizes(int)’:
gr_fft_filter_ccc.cc:133: error: ‘stderr’ was not declared in this scope
gr_fft_filter_ccc.cc:134: error: ‘fprintf’ was not declared in this
scope”

I found this post online at

“Your package fails to build with GCC 4.4, which has cleaned up some
more
C++ headers. You always have to #include headers directly and cannot
rely for things to be included indirectly.”

The patch to fix the problem was to explicitly add cstdio include
statements.

Taking that as a clue, I found that if I add “#include ” to
gr_fft_filter_ccc.cc that fixes the problem, however there are other
files
which also appear to need the same fix. Perhaps somebody can look into
this? The problem appears on subversions 10991 and 11181.

thanks,
eric


Eric H. Matlis, Ph.D.
Aerospace & Mechanical Engineering Dept.
121 Hessert Center for Aerospace Research
University of Notre Dame
Notre Dame, IN 46556-5684
Phone: (574) 631-6054
Fax: (574) 631-8355

On Tue, 9 Jun 2009, [email protected] wrote:

I found this post online at
gr_fft_filter_ccc.cc that fixes the problem, however there are other files
University of Notre Dame
Notre Dame, IN 46556-5684
Phone: (574) 631-6054
Fax: (574) 631-8355

Updating this post- after fixing quite a few files, I ran into this
different problem on svn 10991:

Making all in usrp2
make[5]: Entering directory
/home/matlis/z.downloads/z.gnuradio/gnuradio_10991/usrp/firmware/src/usrp2' test -fbasename 'eeprom_boot.a51’|| ln -s 'eeprom_boot.a51' . test -f ../common/basename 'eeprom_boot.a51’-o \ \! -fdirname 'eeprom_boot.a51’/../common/basename
'eeprom_boot.a51’\ || ln -sdirname 'eeprom_boot.a51’/../common/basename
'eeprom_boot.a51’../common/basename 'eeprom_boot.a51’asx8051 -plosgffbasename 'eeprom_boot.a51’sdcc -mmcs51 --no-xinit-opt -I../../../../usrp/firmware/include -I../../../../usrp/firmware/src/usrp2 -I../../../../usrp/firmware/src/common -I../../../../usrp/firmware/src/common -DHAVE_USRP2 \ -c -o eeprom_init.reltest -f ‘eeprom_init.c’ || echo
'./'eeprom_init.c test -fbasename '_startup.a51’|| ln -s '_startup.a51' . test -f ../common/basename '_startup.a51’-o \ \! -fdirname '_startup.a51’/../common/basename
'_startup.a51’\ || ln -sdirname ‘_startup.a51’/../common/basename
‘_startup.a51’../common/basename ‘_startup.a51’asx8051 -plosgffbasename ‘_startup.a51’sdcc -mmcs51 --no-xinit-opt --code-loc 0x0000 --code-size 0x1800 --xram-loc 0x1800 --xram-size 0x0800 -Wl '-b USBDESCSEG = 0xE000' -L ../../lib libfx2.lib -o eeprom_boot.ihx eeprom_boot.rel eeprom_init.rel _startup.rel *** glibc detected *** /usr/libexec/sdcc/aslink: double free or corruption (fasttop): 0x0000000001e009a0 *** ======= Backtrace: ========= /lib64/libc.so.6[0x3c14875a26] /usr/libexec/sdcc/aslink[0x40c490] /usr/libexec/sdcc/aslink[0x402d27] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3c1481ea2d] /usr/libexec/sdcc/aslink[0x401219] ======= Memory map: ======== 00400000-00413000 r-xp 00000000 08:08 142876 /usr/libexec/sdcc/aslink 00613000-00617000 rw-p 00013000 08:08 142876 /usr/libexec/sdcc/aslink 00617000-00b1b000 rw-p 00617000 00:00 0 00c16000-00c17000 rw-p 00016000 08:08 142876 /usr/libexec/sdcc/aslink 01dff000-01e41000 rw-p 01dff000 00:00 0 [heap] 3c14200000-3c1421f000 r-xp 00000000 08:08 261633 /lib64/ld-2.10.1.so 3c1441e000-3c1441f000 r--p 0001e000 08:08 261633 /lib64/ld-2.10.1.so 3c1441f000-3c14420000 rw-p 0001f000 08:08 261633 /lib64/ld-2.10.1.so 3c14800000-3c14964000 r-xp 00000000 08:08 261636 /lib64/libc-2.10.1.so 3c14964000-3c14b64000 ---p 00164000 08:08 261636 /lib64/libc-2.10.1.so 3c14b64000-3c14b68000 r--p 00164000 08:08 261636 /lib64/libc-2.10.1.so 3c14b68000-3c14b69000 rw-p 00168000 08:08 261636 /lib64/libc-2.10.1.so 3c14b69000-3c14b6e000 rw-p 3c14b69000 00:00 0 3c1ee00000-3c1ee19000 r-xp 00000000 08:08 10872 /lib64/libgcc_s-4.4.0-20090506.so.1 3c1ee19000-3c1f019000 ---p 00019000 08:08 10872 /lib64/libgcc_s-4.4.0-20090506.so.1 3c1f019000-3c1f01a000 rw-p 00019000 08:08 10872 /lib64/libgcc_s-4.4.0-20090506.so.1 7fee10215000-7fee10217000 rw-p 7fee10215000 00:00 0 7fee1022b000-7fee1022c000 rw-p 7fee1022b000 00:00 0 7fee1022f000-7fee10232000 rw-p 7fee1022f000 00:00 0 7fff1821c000-7fff18231000 rw-p 7ffffffea000 00:00 0 [stack] 7fff183fe000-7fff183ff000 r-xp 7fff183fe000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] make[5]: *** [eeprom_boot.ihx] Error 1 make[5]: Leaving directory/home/matlis/z.downloads/z.gnuradio/gnuradio_10991/usrp/firmware/src/usrp2’
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
/home/matlis/z.downloads/z.gnuradio/gnuradio_10991/usrp/firmware/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory/home/matlis/z.downloads/z.gnuradio/gnuradio_10991/usrp/firmware’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
/home/matlis/z.downloads/z.gnuradio/gnuradio_10991/usrp' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/matlis/z.downloads/z.gnuradio/gnuradio_10991’
make: *** [all] Error 2

Not sure what to do about this one… if it should be necessary to use
an
earlier compiler, does anybody know how to make the system use an
earlier
version of the necessary libraries in Fedora cleanly, using rpm packages
(ie I’d rather not have to manually compile and install tar files, etc)?

thanks,
eric

On Tue, 9 Jun 2009, [email protected] wrote:

gr_fft_filter_ccc.cc:134: error: ‘fprintf’ was not declared in this scope"

Aerospace & Mechanical Engineering Dept.
make[5]: Entering directory
-I…/…/…/…/usrp/firmware/src/common
sdcc -mmcs51 --no-xinit-opt --code-loc 0x0000 --code-size 0x1800
/usr/libexec/sdcc/aslink[0x401219]
3c14200000-3c1421f000 r-xp 00000000 08:08 261633
/lib64/libc-2.10.1.so
7fee1022b000-7fee1022c000 rw-p 7fee1022b000 00:00 0
make[4]: *** [all-recursive] Error 1
`/home/matlis/z.downloads/z.gnuradio/gnuradio_10991’
make: *** [all] Error 2

Not sure what to do about this one… if it should be necessary to use an
earlier compiler, does anybody know how to make the system use an earlier
version of the necessary libraries in Fedora cleanly, using rpm packages
(ie I’d rather not have to manually compile and install tar files, etc)?

thanks,
eric

Second update- I was able to compile gnuradio successfully on Fedora 11.
I had to revert my sdcc from Fedora 11’s 2.9 version to Fedora 10’s
2.8 to eliminate the double free corruption issue I posted about
earlier.

In addition, I had to add "#include " to the following files:

gr_fft_ccc.cc
gr_fft_fff.cc
gr_align_on_samplenumbers_ss.cc
gr_clock_recovery_mm_cc.cc
gr_constellation_decoder_cb.cc
gr_correlate_access_code_bb.cc
gr_dd_mpsk_sync_cc.cc
gr_dpll_bb.cc
gr_fft_vfc.cc
gr_ofdm_frame_acquisition.cc
gr_ofdm_sampler.cc
gr_simple_correlator.cc
gr_stream_mux.cc
mb_worker.cc
qa_bitset.cc
qa_disconnect.cc
usrp_basic.cc
usrp_standard.cc
db_boards.cc
db_dbs_rx.cc
db_xcvr2450.cc
fusb_linux.cc
fusb_linux.cc
eth_buffer.cc **** also add #include “eth_buffer.h”
ethernet.cc *** also add #include “eth_buffer.h”
find.cc
usrp2.cc
find_usrps.cc
rx_streaming_samples.cc
tx_samples.cc
test_mimo_tx
gpio.cc
usrp_sink_base.cc
usrp_source_base.cc
usrp_siggen.cc

I also had to add #include “eth_buffer.h” to eth_buffer.cc and
ethernet.cc.

I also had to change my PYTHONPATH to reflect the change to python2.6

After this, my applications run, although I get this warning:

/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py:14450:
UserWarning: wxPython/wxWidgets release number mismatch
warnings.warn(“wxPython/wxWidgets release number mismatch”)

(using svn checkout 11181).

One other concern: I noticed that with 11181 opengl scopes and gui’s now
work on my system. However, even with my config.conf as below:

[wxgui]
style=gl
#style=nongl
fft_rate=30
waterfall_rate=30
scope_rate=30
number_rate=5
const_rate=5
const_size=2048

trying to send the gui remotely over the network to a remote computer
doesn’t really work; the latencies or delays are too high and the gui is
unresponsive. Any way to make them as snappy as the non-gl versions?

thanks,
eric

On Wed, Jun 10, 2009 at 11:22:05AM -0400, [email protected] wrote:

gr_fft_filter_ccc::compute_sizes(int)’:
gr_fft_filter_ccc.cc:133: error: ‘stderr’ was not declared in this scope
gr_fft_filter_ccc.cc:134: error: ‘fprintf’ was not declared in this scope"

Eric,

Thanks for all the detailed information.

I’ll see if I can’t install F11 in the next couple of days and get
this cleaned up.

Thanks!
Eric