Re: [ns] Problems compiling ns-2.30 with g++ 4.1
Richard Hansen wrote: Ignacio Mas Ivars wrote: On Wed, 2006-10-11 at 22:38 -0700, Tom Henderson wrote: Ignacio Mas Ivars wrote: Hi all! I am trying to compile ns-2.30 in an linux Ubuntu box with g++ 4.1 and I am having problems with the linker. All the files are compiled correctly but when linking the following message appears: /usr/bin/ld: ns: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status I have tried compiling as well with g++ 4.0 without success and now I am a bit out of ideas. Any pointers on where to look? This is my version of g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Thanks for the help! /Nacho This page seems to suggest to turn off SSP by changing the default options to build with -fno-stack-protector https://wiki.ubuntu.com/GccSsp Let me know if that works. Tom Hi! I tried that but still the same error. This are the flags passed to g++ g++ -c -O3 -march=pentium3 -pipe -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -fno-stack-protector -Wall and the error while linking is still the same... Thanks anyway! /Nacho I can confirm this problem (Ubuntu 6.10, gcc 4.1.2) and that -fno-stack-protector does not fix it. A temporary workaround is to use an older gcc for compiling OTcl, TclCL, and ns: export CC=gcc-4.0 export CXX=g++-4.0 (Make sure the above is entered before building OTcl, TclCL, and ns.) In addition, I have discovered that OTcl 1.18 also fails to compile (same error) on my dual-core P4 system with Ubuntu's gcc 4.1.2 and when make is run with the command-line argument -j 3 (or higher). It compiles without any errors if run without -j or if I switch to gc 4.0.4. I hope this helps someone. Richard Update: Compiling ns-2.30 with gcc 4.1.2 on Ubuntu 6.10 (Edgy Eft) works fine, *if* OTcl is compiled with gcc 4.0. Here's the configure line I used for OTcl: CC=gcc-4.0 CXX=g++-4.0 ./configure --with-tcl=../tcl8.4.13 --with-tk=../tk8.4.13 Richard
[ns] Problems compiling ns-2.30 with g++ 4.1
Hi all! I am trying to compile ns-2.30 in an linux Ubuntu box with g++ 4.1 and I am having problems with the linker. All the files are compiled correctly but when linking the following message appears: /usr/bin/ld: ns: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status I have tried compiling as well with g++ 4.0 without success and now I am a bit out of ideas. Any pointers on where to look? This is my version of g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Thanks for the help! /Nacho --- ,,, (o o) --ooO--(_)---Ooo--- Quantum Mechanics: The dreams stuff is made of. --oo00oo---
Re: [ns] Problems compiling ns-2.30 with g++ 4.1
On Wed, 2006-10-11 at 22:38 -0700, Tom Henderson wrote: Ignacio Mas Ivars wrote: Hi all! I am trying to compile ns-2.30 in an linux Ubuntu box with g++ 4.1 and I am having problems with the linker. All the files are compiled correctly but when linking the following message appears: /usr/bin/ld: ns: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status I have tried compiling as well with g++ 4.0 without success and now I am a bit out of ideas. Any pointers on where to look? This is my version of g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Thanks for the help! /Nacho --- ,,, (o o) --ooO--(_)---Ooo--- Time flies like an arrow, fruit flies like a banana. -Groucho Marx --oo00oo--- This page seems to suggest to turn off SSP by changing the default options to build with -fno-stack-protector https://wiki.ubuntu.com/GccSsp Let me know if that works. Tom Hi! I tried that but still the same error. This are the flags passed to g++ g++ -c -O3 -march=pentium3 -pipe -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -fno-stack-protector -Wall and the error while linking is still the same... Thanks anyway! /Nacho --- ,,, (o o) --ooO--(_)---Ooo--- I only please one person per day. Today is not your day. Tomorrow isn't looking good either. - Scott Adams --oo00oo---
[ns] Problems compiling ns-2.30 with g++ 4.1
Hi all! I am trying to compile ns-2.30 in an linux Ubuntu box with g++ 4.1 and I am having problems with the linker. All the files are compiled correctly but when linking the following message appears: /usr/bin/ld: ns: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status I have tried compiling as well with g++ 4.0 without success and now I am a bit out of ideas. Any pointers on where to look? This is my version of g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Thanks for the help! /Nacho --- ,,, (o o) --ooO--(_)---Ooo--- Time flies like an arrow, fruit flies like a banana. -Groucho Marx --oo00oo---
Re: [ns] Problems compiling ns-2.30 with g++ 4.1
Ignacio Mas Ivars wrote: Hi all! I am trying to compile ns-2.30 in an linux Ubuntu box with g++ 4.1 and I am having problems with the linker. All the files are compiled correctly but when linking the following message appears: /usr/bin/ld: ns: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status I have tried compiling as well with g++ 4.0 without success and now I am a bit out of ideas. Any pointers on where to look? This is my version of g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Thanks for the help! /Nacho --- ,,, (o o) --ooO--(_)---Ooo--- Time flies like an arrow, fruit flies like a banana. -Groucho Marx --oo00oo--- This page seems to suggest to turn off SSP by changing the default options to build with -fno-stack-protector https://wiki.ubuntu.com/GccSsp Let me know if that works. Tom