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 06-05-2013, 03:53 AM   #1
Robera
LQ Newbie
 
Registered: Jun 2013
Posts: 6

Rep: Reputation: Disabled
*** glibc detected *** ./ns: malloc(): memory corruption (fast): 0x0a2b6448 ***


Hi,
I am new to ns2. I installed ns2.35 and was working fine with generating trace files from tcl scripts. but when i uninstalled ns2.35 and installed ns2.33 , the same tcl file working with ns2.35 is not working with ns2.33, it even works with ns2.33 for other friends. It displays the following error when i try to run it using :
$./ns /home/.../.../file.tcl
*** glibc detected *** ./ns: malloc(): memory corruption (fast): 0x0a2b6448 ***

what could be the problem...pls help me , i spent 3 weeks trying to find the solution.
 
Old 06-05-2013, 04:48 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.
Quote:
When I uninstalled ns2.35 and installed ns2.33
No reason to uninstall ns-2.35 :
You can have as many versions of ns-allinone-2* as you want,
installed at the same time. But : Do not add any path text to .bashrc.


Quote:
** glibc detected *** ./ns: malloc(): memory corruption (fast): 0x0a2b6448 ***
Looks like a failed install of ns-allinone-2.33.
Which Ubuntu version are you using ? Version and architecture, please :
1) $ cat /etc/issue
2) $ uname -m

-
 
Old 06-05-2013, 05:11 AM   #3
Robera
LQ Newbie
 
Registered: Jun 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi,
I have to use a protocol developed using/on ns2.33 thats why I uninstalled ns2.35
And I installed ns2.33 successfully , with some problems , corrected by the time

$ uname -m
i686

$ cat /etc/issue
Ubuntu 12.04.2 LTS \n \l

thanks
 
Old 06-05-2013, 06:26 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 3 .

Which protocol was added to ns-2.33 ? ?


P.S. : Still no reason to uninstall ns-2.35. See post # 2.

-
 
Old 06-05-2013, 07:32 AM   #5
Robera
LQ Newbie
 
Registered: Jun 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yea , i know ...there is no reason to uninstall ns2.35..we can use both alongside. but
forget the new protocol , why is sth working with ns2.35 in not working with ns2.33.

thanks

Last edited by Robera; 06-05-2013 at 07:33 AM.
 
Old 06-06-2013, 09:47 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5
Quote:
why is sth working with ns2.35 in not working with ns2.33.
Probable because you did the ns-2.33 build in a wrong way.

A default ns-allione-2.33 build goes like :
$ export CC=gcc41 CXX=g++41 && ./install

-
 
Old 06-07-2013, 10:42 AM   #7
Robera
LQ Newbie
 
Registered: Jun 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you once again, I changed mu ubuntu from 12.04 32 bit to 64 bit ...and the problem still exists with one more additional error
*** glibc detected *** ns: corrupted double-linked list: 0x00000000025ede00 ***

when i run: $ns /home/.../.../file.tc this time without ./ before ns.

so how can I build it correctly, here is the errors after i run the above command (export CC=gcc41 CXX=g++41 && ./install)

the installation was successful by the way...and i have to :make or build first?

============================================================
* Testing for Darwin (OS X) environment
============================================================
============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Testing for FreeBSD environment
============================================================
FreeBSD not detected
============================================================
* Build XGraph-12.1
============================================================
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... gcc41
checking whether the C compiler (gcc41 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make: *** No targets specified and no makefile found. Stop.
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
gcc -g -c -o ctangle.o ctangle.c
ctangle.w:75:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
gcc -g -DCWEBINPUTS=\"/usr/local/lib/cweb\" -c common.c
common.w:1409:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
common.w: In function ‘fatal’:
common.w:1176:1: warning: format not a string literal and no format arguments [-Wformat-security]
gcc -g -o ctangle ctangle.o common.o
gcc -g -c -o cweave.o cweave.c
cweave.w:79:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
cweave.w: In function ‘print_cat’:
cweave.w:1739:1: warning: format not a string literal and no format arguments [-Wformat-security]
gcc -g -o cweave cweave.o common.o
ln: failed to create symbolic link `cweave': File exists
ln: failed to create symbolic link `ctangle': File exists
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
gcc41 -g -I/usr/local/sgb/include test_io.c gb_io.o -o test_io
make: gcc41: Command not found
make: *** [test_io] Error 127
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
gcc -I../include -L../lib -DFBSD -o ../bin/itm itm.o geog.o ts.o dfs.o -lm -lgb
gcc -I../include -L../lib -DFBSD -o ../bin/sgb2alt sgb2alt.o -lm -lgb
gcc -I../include -L../lib -DFBSD -o ../bin/edriver edriver.o eval.o -lm -lgb
gt-itm has been installed successfully.
gcc -I../include -L../lib -o ../bin/sgb2comns sgb2comns.o -lm -lgb
gcc -I../include -L../lib -o ../bin/sgb2hierns sgb2hierns.o -lm -lgb
gcc -I../include -L../lib -o ../bin/sgb2ns sgb2ns.o -lm -lgb
sgb2ns has been installed successfully.
============================================================
* Build zlib
============================================================
./install: 404: ./install: ./configure: Permission denied
Zlib-1.2.3 configuration failed, but it's optional, so continuing ...
============================================================
* Build tcl8.4.18
============================================================
rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
errors tclsh tcltest lib.exp Tcl
cd dltest ; make clean
make[1]: Entering directory `/home/some/ns-allinone-2.33/tcl8.4.18/unix/dltest'
rm -f *.o config.cache config.log config.status
rm -f lib.exp ../dltest.marker
rm -f *.so
make[1]: Leaving directory `/home/some/ns-allinone-2.33/tcl8.4.18/unix/dltest'
rm -rf Makefile config.status config.cache config.log tclConfig.sh \
SCRPtcl.* prototype *.plist Tcl.framework
cd dltest ; make distclean
make[1]: Entering directory `/home/some/ns-allinone-2.33/tcl8.4.18/unix/dltest'
rm -f *.o config.cache config.log config.status
rm -f lib.exp ../dltest.marker
rm -f *.so
rm -f Makefile
make[1]: Leaving directory `/home/some/ns-allinone-2.33/tcl8.4.18/unix/dltest'
configure: WARNING: unrecognized options: --enable-gcc
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc41
checking whether the C compiler works... no
configure: error: in `/home/some/ns-allinone-2.33/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.4.18 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
 
Old 06-07-2013, 10:56 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 7 .
Quote:
I changed my ubuntu from 12.04 32 bit to 64 bit
Not a good idea. Ns2 is for a 32bits OS :
Some ns2 {versions / files} will work on a 64bits OS, others not.


You will of course have to answer the question in post # 4 :
"Which protocol was added to ns-2.33 ?"
.. if you want a solution.

Quote:
checking for gcc... gcc41
checking whether the C compiler works... no
You can use an additional compiler when it is installed, else not.
gcc41 / g++41 are compiler packages for the 32bits Ubuntu 11.10 .. 13.** :
http://www.linuxquestions.org/questi...532/page4.html
>>> Post # 47.

-
 
Old 06-13-2013, 03:07 AM   #9
Robera
LQ Newbie
 
Registered: Jun 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi knudfl,
Thank you for your patience and cooperation
Quote:
"Which protocol was added to ns-2.33 ?"
Its sth i dont want to disclose , its confidential , I am sorry. But it still works for my friends

To install ns2.33 on ubuntu 12.04 for both 32 and 64 bit I used the steps at : http://www.techquark.com/2009/09/ins...buntu-904.html
and some other sites to correct errors happened during installation process.
even though its for ubuntu 9.04. does this has any problem?

Quote:
Ns2 is for a 32bits OS
My friends installed and using the same ns2.33(with the new protocol included) on ubuntu 12.04 64 bit, except we use different hardware specification/laptop

#6

Quote:
A default ns-allione-2.33 build goes like :
$ export CC=gcc41 CXX=g++41 && ./install
I used
export CC=gcc4.4 CXX=g++4.4 && ./install with both 32 bit and 64 bit , for which it wasn't worked for both.

Shall I use $export CC=gcc41 CXX=g++41 && ./install instead , with ubuntu 12.04 32 bit as a last try.



what makes the problem more difficult to solve is, its difficult to trace . Its :
*** glibc detected *** ./ns: malloc(): memory corruption (fast): 0x0000000002869720 ***
*** glibc detected *** ns: malloc(): memory corruption (fast): 0x0000000001bb8600 ***

Thank you very much
 
Old 06-13-2013, 10:07 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 9 .
Quote:
I don't want to disclose , its confidential , I am sorry.
But it still works for my friends
If you want an answer to unknown / secret software :
http://www.linuxquestions.org/questi...ember&u=386037

One thing is sure : A stock ns-allinone-2.33 will not compile on
Ubuntu 12.04 with gcc-4.4/g++-4.4, unless you are incredibly lucky.
A stable result requires gcc/g++ version 4.1 or some modifications.

? But may be the otcl / ns-2.33 (etc.) modifications for gcc/g++
version 4.4 are included in the "new protocol patch" ?

-
 
Old 06-27-2013, 03:18 AM   #11
Robera
LQ Newbie
 
Registered: Jun 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hello knudfl
Hope u r doing good
couple of questions

these are gcc compilers currently installed on my pc . how can I use only gcc-4.6 selectively? Is that
gcc/g++ version 41 or 4.1, you mentioned above , which one shall I use?

$ dpkg -l | grep gcc | awk '{print $2}'
gcc
gcc-4.4
gcc-4.4-base
gcc-4.6
gcc-4.6-base
gcc-4.6-base:i386
libgcc1
libgcc1:i386

Thanks for your cooperation
 
Old 06-27-2013, 05:01 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 11 .

No ns2 can be build with gcc-4.6 / g++-4.6 . Unless you edit ns2.

ns-allinone-2.35 : $ export CC=gcc-4.4 CXX=g++-4.4 && ./install

ns-allinone-2.33 : $ export CC=gcc41 CXX=g++41 && ./install

Installing gcc41 / g++41, post # 47 here
http://www.linuxquestions.org/questi...532/page4.html

-
 
  


Reply

Tags
ns2



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
Memory leaks.. *** glibc detected *** ./SuffixTree: malloc(): memory corruption: 0x00 evansash Programming 12 03-21-2011 01:17 PM
*** glibc detected ***: malloc() memory corruption Dinarchik Programming 5 02-16-2010 05:38 PM
*** glibc detected *** ruby: malloc(): memory corruption: priceey Linux - Software 0 10-16-2009 05:24 PM
*** glibc detected *** malloc(): memory corruption arvind.ayyangar Programming 2 11-20-2006 11:59 PM
glibc detected *** malloc(): memory corruption: abefroman Linux - Software 2 04-12-2006 12:12 PM

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

All times are GMT -5. The time now is 09:23 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