Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

iperf compile issues

Altera_Forum
Honored Contributor II
1,459 Views

Hi All, 

 

I am having difficulty compiling iperf application using C++ compiler. It is a network monitoring tool included in uClinux distribution. It seems there several problems with compiling this application due to pthread dependencies. I resolved these issues by manually applying a patch. At the moment I am having problems linking the iostream library. I searched through the distribution and did not find an iostream library. Has anyone compiled this application using C++ compiler? I would appreciate your feedback on this issue. 

 

The error is  

 

/opt/nios2.new/bin/../lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/bin/ld.real: cannot find -liostream 

configure:1981: error: C++ compiler cannot create executables 

 

Thanks. 

 

Here is the relevant information from “config.log” 

 

configure:1903: $? = 0 

configure:1905: nios2-linux-uclibc-g++ -v </dev/null >&5 

Reading specs from /opt/nios2.new/bin/../lib/gcc/nios2-linux-uclibc/3.4.6/specs 

Configured with: /root/buildroot/toolchain_build_nios2/gcc-3.4.6/configure --prefix=/opt/nios2 --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=nios2-linux-uclibc --enable-languages=c,c++ --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-shared --disable-nls --enable-threads --enable-multilib 

Thread model: posix 

gcc version 3.4.6 

configure:1908: $? = 0 

configure:1910: nios2-linux-uclibc-g++ -V </dev/null >&5 

nios2-linux-uclibc-g++: `-V' option must have argument 

configure:1913: $? = 1 

configure:1936: checking for C++ compiler default output file name 

configure:1939: nios2-linux-uclibc-g++ -O2 -g -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/pganesh/mandala/trunk/software/uClinux-new-slave -I/home/pganesh/mandala/trunk/software/uClinux-new-slave/include -fno-builtin -Dfork=vfork -D__adjtimex=adjtimex -DBB_NOMMU -O2 -g -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/pganesh/mandala/trunk/software/uClinux-new-slave -I/home/pganesh/mandala/trunk/software/uClinux-new-slave/include -fno-builtin -Dfork=vfork -D__adjtimex=adjtimex -DBB_NOMMU -Wl,-d -Wl,-elf2flt conftest.cc -L/home/pganesh/mandala/trunk/software/uClinux-new-slave/lib -L/home/pganesh/mandala/trunk/software/uClinux-new-slave/lib/libnet -L/home/pganesh/mandala/trunk/software/uClinux-new-slave/lib/libdes -L/home/pganesh/mandala/trunk/software/uClinux-new-slave/lib/libaes -L/home/pganesh/mandala/trunk/software/uClinux-new-slave/lib/libpcap -L/home/pganesh/mandala/trunk/software/uClinux-new-slave/lib/libssl -lstdc++ -liostream -lio -liberty -lc -lgcc >&5 

/opt/nios2.new/bin/../lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/bin/ld.real: cannot find -liostream 

collect2: ld returned 1 exit status 

configure:1942: $? = 1 

configure: failed program was: 

| /* confdefs.h. */ 

|  

|# define PACKAGE_NAME "Iperf" 

|# define PACKAGE_TARNAME "iperf" 

|# define PACKAGE_VERSION "2.0.2" 

|# define PACKAGE_STRING "Iperf 2.0.2" 

|# define PACKAGE_BUGREPORT "" 

|# define PACKAGE "iperf" 

|# define VERSION "2.0.2" 

| /* end confdefs.h. */ 

|  

| int 

| main () 

| { 

|  

| ; 

| return 0; 

| } 

configure:1981: error: C++ compiler cannot create executables 

See `config.log' for more details. 

 

 

configure:1981: error: C++ compiler cannot create executables
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
748 Views

There is no such issue with current nios2 uClinux-dist. Please follow the nioswiki and update. 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
748 Views

Hi, 

 

I am facing issues with Iperf when I run the device under test as UDP streamer and iperf as the server I get the following error at the server end: 

 

[root@localhost src]# iperf -s -u -i 1 

------------------------------------------------------------ 

Server listening on UDP port 5001 

Receiving 1470 byte datagrams 

UDP buffer size: 108 KByte (default) 

------------------------------------------------------------ 

terminate called after throwing an instance of 'std::bad_alloc' 

what(): St9bad_alloc 

Aborted 

 

Could you throw some light on what might be going wrong here. 

 

Thank you, 

 

Suneel.
0 Kudos
Altera_Forum
Honored Contributor II
748 Views

Out of memory?? That's a pretty big buffer...

0 Kudos
Reply