LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-23-2011, 12:15 PM   #1
king2k
LQ Newbie
 
Registered: Jan 2011
Posts: 4

Rep: Reputation: 0
urgent -- error installing ns2 on ubuntu 7.04


i am using ubuntu 7.04 and ns2.26 (for some reasons i have to use these versions)

i receive this error, and i need quick help please. thanks

Code:
diffusion3/lib/dr.o: In function `std::list<CallbackEntry*, std::allocator<CallbackEntry*> >::_M_insert(std::_List_iterator<CallbackEntry*>, CallbackEntry* const&)':
dr.cc:(.text._ZNSt4listIP13CallbackEntrySaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_[std::list<CallbackEntry*, std::allocator<CallbackEntry*> >::_M_insert(std::_List_iterator<CallbackEntry*>, CallbackEntry* const&)]+0x29): undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
diffusion3/lib/dr.o: In function `std::list<FilterEntry*, std::allocator<FilterEntry*> >::_M_insert(std::_List_iterator<FilterEntry*>, FilterEntry* const&)':
dr.cc:(.text._ZNSt4listIP11FilterEntrySaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_[std::list<FilterEntry*, std::allocator<FilterEntry*> >::_M_insert(std::_List_iterator<FilterEntry*>, FilterEntry* const&)]+0x29): undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
diffusion3/lib/dr.o: In function `std::list<HandleEntry*, std::allocator<HandleEntry*> >::_M_insert(std::_List_iterator<HandleEntry*>, HandleEntry* const&)':
dr.cc:(.text._ZNSt4listIP11HandleEntrySaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_[std::list<HandleEntry*, std::allocator<HandleEntry*> >::_M_insert(std::_List_iterator<HandleEntry*>, HandleEntry* const&)]+0x29): undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
diffusion3/lib/dr.o: In function `std::list<DiffusionIO*, std::allocator<DiffusionIO*> >::_M_insert(std::_List_iterator<DiffusionIO*>, DiffusionIO* const&)':
dr.cc:(.text._ZNSt4listIP11DiffusionIOSaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_[std::list<DiffusionIO*, std::allocator<DiffusionIO*> >::_M_insert(std::_List_iterator<DiffusionIO*>, DiffusionIO* const&)]+0x29): undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
 
Old 01-23-2011, 01:50 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

NS-2.26 will compile with gcc / g++ version 3.3.3 :

gcc33-3.3.3_i386.deb
https://docs.google.com/uc?id=0B7S25...CO28jrwN&hl=en

gcc33-c++-3.3.3_i386.deb
https://docs.google.com/uc?id=0B7S25...CIOCxt0D&hl=en

export CC=gcc33 CXX=g++33 && ./install
( Or you can edit the ns-allinone-2.26/ns-2.26/Makefile to
CC = gcc33 , CXX = g++33 , if it's only ns, that fails.)
..
 
Old 01-23-2011, 07:09 PM   #3
king2k
LQ Newbie
 
Registered: Jan 2011
Posts: 4

Original Poster
Rep: Reputation: 0
by doing this even otcl does not install and gives c compiler error

Quote:
checking for gcc... gcc33
checking for C compiler default output... configure: error: C compiler cannot create executables
otcl-1.0a8 configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.
 
Old 01-23-2011, 08:08 PM   #4
king2k
LQ Newbie
 
Registered: Jan 2011
Posts: 4

Original Poster
Rep: Reputation: 0
i got that back to working, and only changed makefile.in in ns-2.26 folder with
Quote:
CC = gcc33
CPP = g++33

and i receive these errors

Quote:
s -I./diffusion3/diffusion -I./asim/ -I./qs -o gen/ns_tcl.o gen/ns_tcl.cc
make: g++33: Command not found
make: *** [gen/ns_tcl.o] Error 127
Ns make failed!
 
Old 01-24-2011, 03:43 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
When you have installed gcc33-3.3.3_i386.deb + gcc33-c++-3.3.3_i386.deb,
they will provide /usr/gcc33/bin/gcc33 : g++33

If not in the path, they should be, when you reboot.
A script /etc/profile.d/gcc33.sh is included, to set the path.

Please try the commands : 'which gcc33' and 'which g++33'.

The full path can be used too :
CC = /usr/gcc33/bin/gcc33
CPP = /usr/gcc33/bin/g++33

..
 
Old 01-26-2011, 01:15 PM   #6
king2k
LQ Newbie
 
Registered: Jan 2011
Posts: 4

Original Poster
Rep: Reputation: 0
/etc/profile.d/gcc33.sh exist and i used the full path in makefile.in in the ns-2.26 folder

CC = /usr/gcc33/bin/gcc33
CPP = /usr/gcc33/bin/g++33

but i still get the same error, please help me. i need to present my project tomorrow and ns2 is not installing
 
Old 01-26-2011, 03:49 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
1) Please hit the 'Report' button, and ask for a title change :
'urgent' is a forbidden word here at LQ. We are volunteers only.
And will answer, when we have the time to do so.

2) Issues with e.g. ns-allinone-2.26 in Ubuntu are with the old tcl/tk.
I guessed, that when you had passed tcl / tk / otcl / tclcl,
then ns itself just required a different compiler ( as usual ).

The problem is, that nobody uses an old obsolete OS like Ubuntu 7.04.

I installed it anyway, and here is a new solution :
Please start from scratch in a new directory and do :

cd ns-allinone-2.26/ && patch -p1 < ns-2.26-gcc410.patch && ./install
( No edits are requird, it just compiles OK with the default gcc / g++ :
version 4.1.2 ).
..
Attached Files
File Type: txt ns-2.26-gcc410.patch.txt (25.8 KB, 49 views)
 
Old 02-01-2011, 07:59 PM   #8
sawyer
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Rep: Reputation: 0
Steps to install NS2.27 on Ubuntu 7.04

Hey Knud

I am having lots of errors in installing NS2.27 on Ubuntu 7.04. Some of the errors are

1) Couldn't find build essential

2) gcc -o mp3cut mp3cut.c
mp3cut.c:25:19: error: stdio.h: No such file or directory
mp3cut.c:26:20: error: stdlib.h: No such file or directory
mp3cut.c:27:20: error: string.h: No such file or directory
mp3cut.c:28:20: error: unistd.h: No such file or directory

..etc .. etc

Please mail me the solution

Thank you
 
Old 02-02-2011, 05:28 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 8, @ sawyer : Why are you using an unsupported Ubuntu 7.04 ?

You will have to use this URL for the lines in /etc/apt/sources.list :
http://old-releases.ubuntu.com/ubuntu/

Then you can do : sudo apt-get install g++

( g++ will take care that the required headers gets installed.)


"Package: build-essential" ( For information only )
http://packages.ubuntu.com/dapper/build-essential
QUOTE :
"If you do not plan to build Debian packages, you don't need this package.
Moreover this package is not required for building Debian packages."

..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hi i am trying to install ns2 2.34 in ubuntu 10.04. it showing the following error v123 Linux - Newbie 1 11-10-2010 11:10 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
[SOLVED] problem in installing ns2.33 in ubuntu 8.10 neeraj.dwivedi Linux - Newbie 18 09-12-2009 08:00 AM
Installing NS2.26 (Network Simulator) Error:can't find X library linuxsimulationboy Debian 3 07-13-2008 02:41 AM
Problem Installing NS2 in Ubuntu 7.10 smetya Linux - Software 5 04-27-2008 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration