LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   TRYING to install gcc 4.3.6 in ubuntu 14.04 (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-install-gcc-4-3-6-in-ubuntu-14-04-a-4175573236/)

milina 02-25-2016 02:52 PM

TRYING to install gcc 4.3.6 in ubuntu 14.04
 
hello,
I am using evalvid and ns2 and i use ubuntu 14.04 to evaluate video traffic, when i try to recompile ns2 version 2.35 , with these command :

/ns-allinone-2.35/ns-2.35$ sudo ./configure - -with-tcl-ver = 8.5.10
/ns-allinone-2.35/ns-2.35$ sudo make clean ;
/ns-allinone-2.35/ns-2.35$ sudo make ;
the following error is coming....
******************************************************************************
In file included from common/packet.cc:40:0:
common/packet.h:271:15: error: ‘p_info::name_’ has a previous declaration as ‘char* p_info::name_ [58]’
static char* name_[PT_NTYPE+1];
^
common/packet.cc:44:16: error: declaration of ‘char* p_info::name_ [58]’ outside of class is not definition [-fpermissive]
char** p_info::name_;
^
common/packet.cc:45:22: error: ‘unsigned int p_info::nPkt_’ is not a static member of ‘class p_info’
unsigned int p_info::nPkt_ = 0;
^
common/packet.cc:46:1: error: ‘PacketClassifier’ does not name a type
PacketClassifier *p_info::pc_ = 0;
^
common/packet.cc:48:33: error: no ‘int p_info::addPacket(char*)’ member function declared in class ‘p_info’
int p_info::addPacket(char *name)
^
In file included from common/packet.cc:40:0:
common/packet.cc: In member function ‘virtual void CommonHeaderClass::export_offsets()’:
common/packet.cc:131:42: error: cast from ‘packet_t*’ to ‘int’ loses precision [-fpermissive]
field_offset("ptype_", OFFSET(hdr_cmn, ptype_));
^
common/packet.h:288:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
common/packet.cc:132:41: error: cast from ‘int*’ to ‘int’ loses precision [-fpermissive]
field_offset("size_", OFFSET(hdr_cmn, size_));
^
common/packet.h:288:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
common/packet.cc:133:40: error: cast from ‘int*’ to ‘int’ loses precision [-fpermissive]
field_offset("uid_", OFFSET(hdr_cmn, uid_));
^
common/packet.h:288:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
common/packet.cc:134:42: error: cast from ‘int*’ to ‘int’ loses precision [-fpermissive]
field_offset("error_", OFFSET(hdr_cmn, error_));
^
common/packet.h:288:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
make: *** [common/packet.o] Error 1
******************************************************************************
Then I tried to install gcc-4.3.6 , which I think it is the solution but i can't install it
does anyone can help me to install gcc-4.3.6 step by step , and has a solution to this problem...Knowing that the Architecture of my computer is x86_64
plz reply to me
Thanks & Regards

Ztcoracat 02-25-2016 07:06 PM

Hi:

-::-The current version of gcc is 5.3.-::-
https://gcc.gnu.org/

Is there a particular reason your installing 4.3.6?

What is the output of:

Code:

gcc --version
See this thread here and Knudfl's links in post # 2
http://www.linuxquestions.org/questi...e2-4175541668/

knudfl 02-27-2016 07:42 AM

@milina, Please read the "evalvid2" posts :
. http://www.linuxquestions.org/questi...965/page5.html >> #71
"" The `myevalvid2' code can be compiled with g++-4.4: sudo apt-get install g++-4.4 "", etc.
. http://www.linuxquestions.org/questions/tags/myevalvid/
. http://www.linuxquestions.org/questi...gs/myevalvid2/

The "recompile command" is :
cd ns-allinone-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install


-


All times are GMT -5. The time now is 01:18 AM.