Bug 2833 - ns-3-dce compilation fails on gcc-6.3
ns-3-dce compilation fails on gcc-6.3
Status: RESOLVED FIXED
Product: dce
Classification: Unclassified
Component: other
unspecified
All All
: P3 normal
Assigned To: Hajime Tazaki
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-03 18:23 EST by Tom Henderson
Modified: 2018-01-23 02:41 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2017-12-03 18:23:16 EST
ns-3-dce compilation fails on Ubuntu 17.04, gcc-6.3; it passes on Ubuntu 16.04, gcc-5.3.

Compilation error is as follows

../model/libc-ns3.h: In function ‘void libc_dce(Libc**)’:
../model/libc-ns3.h:225:6: warning: ‘char* getwd(char*)’ is deprecated [-Wdeprecated-declarations]
 DCE (getwd)
      ^
../model/libc-dce.cc:154:62: note: in definition of macro ‘DCE’
 #define DCE(name) (*libc)->name ## _fn = (func_t)(__typeof (&name))dce_ ## name;
                                                              ^~~~
In file included from ../model/dce-unistd.h:6:0,
                 from ../model/libc-dce.cc:16:
/usr/include/unistd.h:528:14: note: declared here
 extern char *getwd (char *__buf)
              ^~~~~
../model/libc-ns3.h:491:6: warning: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Wdeprecated-declarations]
 DCE (readdir_r)
      ^
../model/libc-dce.cc:154:62: note: in definition of macro ‘DCE’
 #define DCE(name) (*libc)->name ## _fn = (func_t)(__typeof (&name))dce_ ## name;
                                                              ^~~~
In file included from ../model/dce-dirent.h:25:0,
                 from ../model/libc-dce.cc:41:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~
../model/libc-ns3.h:614:9: error: overloaded function with no contextual type information
 NATIVE (ceil)
         ^
../model/libc-dce.cc:159:34: note: in definition of macro ‘NATIVE’
   (*libc)->name ## _fn = (func_t)name;
                                  ^~~~
../model/libc-ns3.h:615:9: error: overloaded function with no contextual type information
 NATIVE (floor)
         ^
../model/libc-dce.cc:159:34: note: in definition of macro ‘NATIVE’
   (*libc)->name ## _fn = (func_t)name;
                                  ^~~~
Waf:
Comment 1 Hajime Tazaki 2018-01-23 02:41:41 EST
This should be fixed by the following commit.

https://github.com/direct-code-execution/ns-3-dce/commit/267f216ae454f5582fd0ae388a99247435aa91c1