[Pkg-netsim-devel] Bug#811808: ns2: FTBFS with GCC 6: error: reference is ambiguous

Martin Michlmayr tbm at hpe.com
Wed Jan 20 02:09:50 UTC 2016


Package: ns2
Version: 2.35+dfsg-2
Severity: important
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-6 gcc-6-reference-ambiguous

This package fails to build with GCC 6.  GCC 6 has not been released
yet, but it's expected that GCC 6 will become the default compiler for
stretch.

Note that only the first error is reported; there might be more.  You
can find a snapshot of GCC 6 in experimental.  To build with GCC 6,
you can set CC=gcc-6 CXX=g++-6 explicitly.

You may be able to find out more about this issue at
https://gcc.gnu.org/gcc-6/changes.html

> sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
> g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-write-strings -DUSE_INTERP_RESULT  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_14 -DHAVE_OTCL_H -DHAVE_LIBTK8_6 -DHAVE_TK_H -DHAVE_LIBTCL8_6 -DHAVE_TCLINT_H -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test  -I. -I. -I/usr/include/tclcl -I/usr/include -I/usr/include/tcl -I/usr/include/tcl8.6/tcl-private/generic -I/usr/include/tcl8.6/tcl-private/generic -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o mdart/mdart_adp.o mdart/mdart_adp.cc
> In file included from ./config.h:60:0,
>                  from ./tools/random.h:41,
>                  from ./mdart/mdart_function.h:52,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/tclcl/tclcl.h: In member function 'void Tcl::result(const char*)':
> /usr/include/tclcl/tclcl.h:88:44: warning: 'Tcl_Interp::result' is deprecated: use Tcl_GetStringResult/Tcl_SetResult [-Wdeprecated-declarations]
>   inline void result(const char* p) { tcl_->result = (char*)p; }
>                                             ^~~~~~
> 
> In file included from /usr/include/tclcl/tclcl.h:42:0,
>                  from ./config.h:60,
>                  from ./tools/random.h:41,
>                  from ./mdart/mdart_function.h:52,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/tcl/tcl.h:169:71: note: declared here
>  # define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg)))
>                                                                        ^
> 
> /usr/include/tcl/tcl.h:506:18: note: in expansion of macro 'TCL_DEPRECATED_API'
>      char *result TCL_DEPRECATED_API("use Tcl_GetStringResult/Tcl_SetResult");
>                   ^~~~~~~~~~~~~~~~~~
> 
> In file included from ./config.h:60:0,
>                  from ./tools/random.h:41,
>                  from ./mdart/mdart_function.h:52,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/tclcl/tclcl.h:88:44: warning: 'Tcl_Interp::result' is deprecated: use Tcl_GetStringResult/Tcl_SetResult [-Wdeprecated-declarations]
>   inline void result(const char* p) { tcl_->result = (char*)p; }
>                                             ^~~~~~
> 
> In file included from /usr/include/tclcl/tclcl.h:42:0,
>                  from ./config.h:60,
>                  from ./tools/random.h:41,
>                  from ./mdart/mdart_function.h:52,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/tcl/tcl.h:169:71: note: declared here
>  # define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg)))
>                                                                        ^
> 
> /usr/include/tcl/tcl.h:506:18: note: in expansion of macro 'TCL_DEPRECATED_API'
>      char *result TCL_DEPRECATED_API("use Tcl_GetStringResult/Tcl_SetResult");
>                   ^~~~~~~~~~~~~~~~~~
> 
> In file included from ./config.h:60:0,
>                  from ./tools/random.h:41,
>                  from ./mdart/mdart_function.h:52,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/tclcl/tclcl.h:88:44: warning: 'Tcl_Interp::result' is deprecated: use Tcl_GetStringResult/Tcl_SetResult [-Wdeprecated-declarations]
>   inline void result(const char* p) { tcl_->result = (char*)p; }
>                                             ^~~~~~
> 
> In file included from /usr/include/tclcl/tclcl.h:42:0,
>                  from ./config.h:60,
>                  from ./tools/random.h:41,
>                  from ./mdart/mdart_function.h:52,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/tcl/tcl.h:169:71: note: declared here
>  # define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg)))
>                                                                        ^
> 
> /usr/include/tcl/tcl.h:506:18: note: in expansion of macro 'TCL_DEPRECATED_API'
>      char *result TCL_DEPRECATED_API("use Tcl_GetStringResult/Tcl_SetResult");
>                   ^~~~~~~~~~~~~~~~~~
> 
> mdart/mdart_adp.cc: In member function 'void ADP::sendDarq(nsaddr_t, int)':
> mdart/mdart_adp.cc:108:21: error: reference to 'hash' is ambiguous
>   nsaddr_t dstAdd_ = hash(reqId);
>                      ^~~~
> 
> In file included from ./mdart/mdart.h:52:0,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> ./mdart/mdart_function.h:230:17: note: candidates are: nsaddr_t hash(nsaddr_t)
>  inline nsaddr_t hash(nsaddr_t id) {
>                  ^~~~
> 
> In file included from /usr/include/c++/6/bits/basic_string.h:5628:0,
>                  from /usr/include/c++/6/string:52,
>                  from /usr/include/c++/6/bitset:47,
>                  from ./mdart/mdart_function.h:62,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
>      struct hash;
>             ^~~~
> 
> mdart/mdart_adp.cc: In member function 'void ADP::sendDaup()':
> mdart/mdart_adp.cc:396:21: error: reference to 'hash' is ambiguous
>   nsaddr_t dstAdd_ = hash(mdart_->id_);
>                      ^~~~
> 
> In file included from ./mdart/mdart.h:52:0,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> ./mdart/mdart_function.h:230:17: note: candidates are: nsaddr_t hash(nsaddr_t)
>  inline nsaddr_t hash(nsaddr_t id) {
>                  ^~~~
> 
> In file included from /usr/include/c++/6/bits/basic_string.h:5628:0,
>                  from /usr/include/c++/6/string:52,
>                  from /usr/include/c++/6/bitset:47,
>                  from ./mdart/mdart_function.h:62,
>                  from ./mdart/mdart.h:52,
>                  from ./mdart/mdart_adp.h:51,
>                  from mdart/mdart_adp.cc:47:
> /usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
>      struct hash;
>             ^~~~
> 
> Makefile:93: recipe for target 'mdart/mdart_adp.o' failed
> make[1]: *** [mdart/mdart_adp.o] Error 1
> make[1]: Leaving directory '/<<BUILDDIR>>/ns2-2.35+dfsg'

-- 
Martin Michlmayr
Linux for HPE Helion, Hewlett Packard Enterprise



More information about the Pkg-netsim-devel mailing list