Bug 1800

Summary: ns-3-dce can't build on debian testing
Product: dce Reporter: Hajime Tazaki <tazaki>
Component: otherAssignee: Hajime Tazaki <tazaki>
Status: CLOSED FIXED    
Severity: major CC: ns-bugs
Priority: P5    
Version: unspecified   
Hardware: PC   
OS: Linux   
Attachments: the output of gcc -sdumpspecs
patch for ns-3-dce

Description Hajime Tazaki 2013-11-13 01:47:31 EST
$ cat /etc/issue.net 
Debian GNU/Linux jessie/sid
$ gcc --version
gcc (Debian 4.8.2-1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



$ ./waf
Waf: Entering directory `/home/wide/dce/mptcp/arch/sim/test/buildtop/source/ns-3-dce/build'
[ 12/380] lib/pkgconfig/libns3-dev-netlink-debug.pc:  -> build/lib/pkgconfig/libns3-dev-netlink-debug.pc
[100/380] lib/pkgconfig/libns3-dev-dce-debug.pc:  -> build/lib/pkgconfig/libns3-dev-dce-debug.pc
[119/380] lib/pkgconfig/libns3-dev-dce-quagga-debug.pc:  -> build/myscripts/ns-3-dce-quagga/lib/pkgconfig/libns3-dev-dce-quagga-debug.pc
[175/380] lib/pkgconfig/libns3-dev-dce-umip-debug.pc:  -> build/myscripts/ns-3-dce-umip/lib/pkgconfig/libns3-dev-dce-umip-debug.pc
[372/380] cxxshlib: build/model/libc.cc.100.o build/model/libc-setup.cc.100.o -> build/lib/libpthread-ns3.so
[377/380] cxxshlib: build/model/libc.cc.101.o build/model/libc-setup.cc.101.o -> build/lib/librt-ns3.so
model/libc.cc.100.o: In function `getwd':
/home/wide/dce/mptcp/arch/sim/test/buildtop/source/ns-3-dce/build/../model/libc-ns3.h:221: multiple definition of `getwd'
collect2: error: ld returned 1 exit status
model/libc.cc.101.o: In function `getwd':
/home/wide/dce/mptcp/arch/sim/test/buildtop/source/ns-3-dce/build/../model/libc-ns3.h:221: multiple definition of `getwd'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/home/wide/dce/mptcp/arch/sim/test/buildtop/source/ns-3-dce/build'
Build failed
 -> task in 'lib/pthread-ns3' failed (exit status 1): 
   {task 38642960: cxxshlib libc.cc.100.o,libc-setup.cc.100.o -> libpthread-ns3.so}
['/usr/bin/g++', '-Wl,--no-as-needed', '-pthread', '-pthread', '-pthread', '-nostdlib', '-lc', '-fno-profile-arcs', '-Wl,--version-script=model/libpthread.version', '-Wl,-soname=libpthread.so.0', '-shared', 'model/libc.cc.100.o', 'model/libc-setup.cc.100.o', '-o', '/home/wide/dce/mptcp/arch/sim/test/buildtop/source/ns-3-dce/build/lib/libpthread-ns3.so', '-Wl,-Bstatic', '-Wl,-Bdynamic']
 -> task in 'lib/rt-ns3' failed (exit status 1): 
   {task 38643344: cxxshlib libc.cc.101.o,libc-setup.cc.101.o -> librt-ns3.so}
['/usr/bin/g++', '-Wl,--no-as-needed', '-pthread', '-pthread', '-pthread', '-nostdlib', '-lc', '-fno-profile-arcs', '-Wl,--version-script=model/librt.version', '-Wl,-soname=librt.so.1', '-shared', 'model/libc.cc.101.o', 'model/libc-setup.cc.101.o', '-o', '/home/wide/dce/mptcp/arch/sim/test/buildtop/source/ns-3-dce/build/lib/librt-ns3.so', '-Wl,-Bstatic', '-Wl,-Bdynamic']


'-lc' option for the linker of libpthread-ns3.so and librt-ns3.so seems to be redundant. but not happened in the other linker, even in the same gcc version. dumpsecs ?
Comment 1 Hajime Tazaki 2013-11-13 01:48:01 EST
Created attachment 1707 [details]
the output of gcc -sdumpspecs
Comment 2 Hajime Tazaki 2013-11-13 01:49:06 EST
Created attachment 1708 [details]
patch for ns-3-dce
Comment 3 Hajime Tazaki 2013-12-16 08:34:07 EST
fixed by the following changeset.

changeset cfdf06d4e88f

but debian testing has still an issue when running simulation (#1773)