Bugzilla – Bug 317
build error
Last modified: 2008-09-08 14:29:07 UTC
[335/519] cxx: src/internet-stack/nsc-tcp-socket-impl.cc -> build/debug/src/inte rnet-stack/nsc-tcp-socket-impl_1.o ../src/internet-stack/nsc-tcp-socket-impl.cc: In member function `virtual int ns 3::NscTcpSocketImpl::Send(ns3::Ptr<ns3::Packet>, uint32_t)': ../src/internet-stack/nsc-tcp-socket-impl.cc:347: warning: converting of negativ e value `-0x000000001' to `long unsigned int' Build failed -> task failed (err #129): [bld:///cygdrive/d/NS-3/repos/ns-3-dev/src/internet- stack/nsc-tcp-socket-impl_1.o]
In mingw more problems occur. Maybe it's better to not compile nsc code unconditionally after all? [329/529] cxx: src\internet-stack\nsc-tcp-socket-impl.cc -> build\debug\src\inte rnet-stack\nsc-tcp-socket-impl_1.o ..\src\internet-stack\nsc-tcp-socket-impl.cc:36:24: sys/socket.h: No such file o r directory ..\src\internet-stack\nsc-tcp-socket-impl.cc:37:24: netinet/in.h: No such file o r directory ..\src\internet-stack\nsc-tcp-socket-impl.cc:38:23: arpa/inet.h: No such file or directory ..\src\internet-stack\nsc-tcp-socket-impl.cc:39:24: netinet/ip.h: No such file o r directory ..\src\internet-stack\nsc-tcp-socket-impl.cc:40:25: netinet/tcp.h: No such file or directory ..\src\internet-stack\nsc-tcp-socket-impl.cc: In member function `virtual int ns 3::NscTcpSocketImpl::Connect(const ns3::Address&)': ..\src\internet-stack\nsc-tcp-socket-impl.cc:310: error: aggregate `ns3::in_addr remoteAddr' has incomplete type and cannot be defined ..\src\internet-stack\nsc-tcp-socket-impl.cc:316: error: `inet_ntoa' was not dec lared in this scope ..\src\internet-stack\nsc-tcp-socket-impl.cc:316: warning: unused variable 'inet _ntoa' ..\src\internet-stack\nsc-tcp-socket-impl.cc: In member function `virtual int ns 3::NscTcpSocketImpl::Send(ns3::Ptr<ns3::Packet>, uint32_t)': ..\src\internet-stack\nsc-tcp-socket-impl.cc:347: warning: converting of negativ e value `-0x000000001' to `unsigned int' ..\src\internet-stack\nsc-tcp-socket-impl.cc: In member function `void ns3::NscT cpSocketImpl::CompleteFork()': ..\src\internet-stack\nsc-tcp-socket-impl.cc:500: error: `ntohs' was not declare d in this scope ..\src\internet-stack\nsc-tcp-socket-impl.cc:500: warning: unused variable 'ntoh s' ..\src\internet-stack\nsc-tcp-socket-impl.cc: In member function `void ns3::NscT cpSocketImpl::ConnectionSucceeded()': ..\src\internet-stack\nsc-tcp-socket-impl.cc:535: error: `ntohs' was not declare d in this scope ..\src\internet-stack\nsc-tcp-socket-impl.cc:535: warning: unused variable 'ntoh s' Build failed -> task failed (err #129): [bld://P:\ns\ns-3-dev\src\internet-stack\nsc-tcp-soc ket-impl_1.o]
I doubt NSC itself works on mingw (or cygwin, for that matter), so I think we need to blacklist those two. Regarding the src/internet-stack/nsc-tcp-socket-impl.cc:347: warning: converting of error: That looks like a compiler bug to me, why would it need to convert to an unsigned type here? return txEmpty ? p->GetSize () : -1; The method returns int. Does return txEmpty ? (int) p->GetSize () : -1; make things work?
(In reply to comment #2) > I doubt NSC itself works on mingw (or cygwin, for that matter), so > I think we need to blacklist those two. I am fairly certain that sam made sure that nsc would work on cygwin so disabling it on these platforms would require at least a serious understanding of the problem and being convinced that we can't fix the problems. > Regarding the > src/internet-stack/nsc-tcp-socket-impl.cc:347: warning: converting of > error: That looks like a compiler bug to me, why would it need to convert > to an unsigned type here? > > return txEmpty ? p->GetSize () : -1; I don't know about the code or the error but Packet::GetSize returns an unsigned integer so, the (int) below is probably right. > > The method returns int. > Does > return txEmpty ? (int) p->GetSize () : -1; > > make things work? >
(In reply to comment #0) > [335/519] cxx: src/internet-stack/nsc-tcp-socket-impl.cc -> > build/debug/src/inte > rnet-stack/nsc-tcp-socket-impl_1.o > ../src/internet-stack/nsc-tcp-socket-impl.cc: In member function `virtual int > ns > 3::NscTcpSocketImpl::Send(ns3::Ptr<ns3::Packet>, uint32_t)': > ../src/internet-stack/nsc-tcp-socket-impl.cc:347: warning: converting of > negativ > e value `-0x000000001' to `long unsigned int' > Build failed > -> task failed (err #129): > [bld:///cygdrive/d/NS-3/repos/ns-3-dev/src/internet- > stack/nsc-tcp-socket-impl_1.o] > I posted a patch to fix this in bug #316.
this bug is fixed now.