LinuxQuestions.org
Help answer threads with 0 replies.
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 09-11-2014, 10:07 AM   #16
huangguanglun
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled

Quote:
Originally Posted by huangguanglun View Post
knudfl,i got the following errors
o common/ptypes2tcl.cc
g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
Segmentation fault (core dumped)
make: *** [gen/ptypes.cc] Error 139

and the version of ns-allinone i use is ns-allinone-2.35, the ubuntu version is 12.04
i don't remember i change anything
 
Old 09-11-2014, 10:48 AM   #17
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Ref. post #15 .
Quote:
g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
"g++" : That's an error ! Must be g++-4.4 .

How to build ns-allinone-2.35 :
$ sudo apt-get install g++-4.4
$ cd ns-allinone-2.35/
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
The install : $ cd ns-2.35/ && sudo make install

Ns2 info : http://www.linuxquestions.org/questions/tags/ns2/

-
 
1 members found this post helpful.
Old 09-12-2014, 04:13 AM   #18
huangguanglun
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled
@knudfl

Quote:
Originally Posted by knudfl View Post
Ref. post #15 .

"g++" : That's an error ! Must be g++-4.4 .

How to build ns-allinone-2.35 :
$ sudo apt-get install g++-4.4
$ cd ns-allinone-2.35/
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
The install : $ cd ns-2.35/ && sudo make install

Ns2 info : http://www.linuxquestions.org/questions/tags/ns2/

-
dear knudfl, i accepted your advice and executed the commands, but i got the following errors:

/usr/ns-2/NS-2/ns-allinone-2.35/include/tclPort.h:25: fatal error: ../unix/tclUnixPort.h: 没有那个文件或目录
compilation terminated.
make: *** [libotcl.so] 错误 1
otcl-1.14 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

i used to changed the "include" file in tclPort.h,. i corrected it, but i still got the above errors. i examined the file tclPort.h again, found that my correction does not work. why?
 
Old 09-12-2014, 04:53 AM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #18 .

Start from scratch in a new folder in /home/<name>/,
with a new downloaded ns-allinone-2.35.tar.gz
http://sourceforge.net/projects/nsnam/

An ns-allinone-2 that was compiled with the wrong compiler,
cannot be reused as is.

-
 
1 members found this post helpful.
Old 09-13-2014, 05:27 AM   #20
huangguanglun
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled
@knudfl

dear knudfl

i met an error when i installed tcl-debug-2.0, the error is:

warning: Script debugging disabled. Reconfigure with
--with-tcldebug, and recompile.


it was compiling fine. after that I tried with the same example by adding a statement, "debug 1" ,in the second line of the script, just to check whether it's getting enabled or not. so when I tried to run the script in the normal way(not in the debugging mode) like ns example.tcl at the prompt, it's giving above warning. the version of ns is ns-2.34, and ubuntu is 12.04. Specially, ns-2.34 is newly installed.

can you tell me why?
 
Old 09-13-2014, 06:24 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #20 .
Quote:
can you tell me why ?
? May be ? If you tell what you are doing / have done, like ...
$ cd ns-allinone-2.34/
$ tar xvf tcl-debug.tar.gz
$ cd tcl-debug/
$ patch -p1 < tcl-debug-2.0-configure.patch
$ ./configure
$ cp libtcldbg.a ../lib/
$ cp libtcldbg.a ../ns-2.34/lib/
$ cd ../ns-2.34/
$ ./configure --with-tcldebug
$ make
 
Old 09-13-2014, 07:23 AM   #22
huangguanglun
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled
@knudfl

this is my operation:

mv tcl-debug-2.0.tar.gz /home/romeo/ns2/ns-allinone-2.34/
cd /home/romeo/ns2/ns-allinone-2.34/
tar -zxvf tcl-debug-2.0.tar.gz
cd tcl-debug-2.0
./configure --prefix=/home/romeo/ns2/ns-allinone-2.34 --with-tcl=/home/romeo/ns2/ns-allinone-2.34/tcl8.4.13/unix
make
cd /home/romeo/ns2/ns-allinone-2.34/ns-2.34
./configure --with-tcldebug=/home/romeo/ns2/ns-allinone-2.34/tcl-debug-2.0
make clean

make

Last edited by huangguanglun; 09-13-2014 at 07:30 AM.
 
Old 09-13-2014, 08:07 AM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #22 .

Tcl-debug info http://knowledgehurts.wordpress.com/...s-for-ns-2-34/
. ftp://193.219.28.2/vol/rzm1/linux-ge...l-debug.tar.gz

... Please try out my command sequence, from post #21


-

Last edited by knudfl; 09-13-2014 at 08:11 AM.
 
Old 09-13-2014, 10:28 AM   #24
huangguanglun
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled
@knudfl

Quote:
Originally Posted by knudfl View Post
← #22 .

Tcl-debug info http://knowledgehurts.wordpress.com/...s-for-ns-2-34/
. ftp://193.219.28.2/vol/rzm1/linux-ge...l-debug.tar.gz

... Please try out my command sequence, from post #21


-
dear knudfl,

according your command sequence, i got the following errors:
bash: tcl-debug-2.0-configure.patch: 没有那个文件或目录(no that file or directory)

and you know, i am Chinese, so the first link( http://knowledgehurts.wordpress.com/...s-for-ns-2-34/) you gave me cannot be accessed!

Last edited by huangguanglun; 09-13-2014 at 10:34 AM.
 
Old 09-13-2014, 11:38 AM   #25
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The page http://knowledgehurts.wordpress.com/...s-for-ns-2-34/
.. is attached as _tcl-debug-ns234.html.gz.txt :
Download the file, rename to _tcl-debug-ns234.html.gz ,
and do $ gunzip _tcl-debug-ns234.html.gz , then you can read html.


bash: tcl-debug-2.0-configure.patch: 没有那个文件或目录(no that file or directory)
A strange file, this "tcl-debug-2.0-configure.patch".
Looks normal, "properties" shows nothing unusual,
$ 'dos2unix' changes nothing, renaming doesn't do any difference.

This works for me : $ patch -p1 < t<TAB>
... then the »bash completion« will fill out the full file name.

-
Attached Files
File Type: txt _tcl-debug-ns234.html.gz.txt (16.7 KB, 15 views)
 
Old 09-15-2014, 12:05 PM   #26
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@huangguanglun, http://www.linuxquestions.org/questi...lp-4175518518/
→ Please use a descriptive title.
This is a "Help Forum". Title = ``HELP““ is not descriptive.

Tcl-debug for ns-2.35, in Ubuntu 12.04 :
$ cd ns-allinone-2.35/
$ tar xvf tcl-debug.tar.gz
$ cd tcl-debug/
$ patch -p1 < tcl-debug-2.0-configure.patch
$ ./configure --with-tcl=../tcl8.5.10/unix
$ cp ../tcl8.5.10/unix/tclUnixPort.h ./
$ make
$ cp libtcldbg.a ../lib/
$ cp libtcldbg.a ../ns-2.35/lib/
$ cd ../ns-2.35/
$ cp ns ns-orig
$ make clean
cd ../
Use the attached file "install", which has "./configure --with-tcldebug" in line 543.
.. and do $ ./install
.. and you have a new executable 'ns' with tcldebug.
-
Attached Files
File Type: txt install.gz.txt (6.3 KB, 12 views)

Last edited by knudfl; 09-15-2014 at 12:25 PM.
 
  


Reply

Tags
lcsrumor, ns2, rumor, tcl-debug



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
make error in ns2.29 when adding new protocol assassin91 Linux - Newbie 25 04-23-2012 11:17 PM
error in adding new protocol in ns2.34 for fedora 14 jothi8 LinuxQuestions.org Member Success Stories 0 03-05-2012 11:33 PM
Got error when add a new antenna module into NS2! haiying7 Linux - Software 4 12-02-2011 02:03 AM
Apache error after adding module in httpd.conf - but cant see why???? paul123 Linux - Server 2 04-26-2007 03:53 AM

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

All times are GMT -5. The time now is 05:42 PM.

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