nvdla / vp

Virtual Platform for NVDLA
Other
135 stars 81 forks source link

vp make step error #29

Closed shgangchen closed 5 years ago

shgangchen commented 5 years ago
  1. git clone the vp and set up environment.
  2. git clone greenlib and install, then copy findgreenlib.cmake to vp directory.
  3. change python3 to python2.7
  4. cmake -DCMAKE_INSTALL_PREFIX=build -DSYSTEMC_PREFIX=/usr/local/systemc-2.3.0/ -DNVDLA_HW_PREFIX=/usr/local/nvdla/hw -DNVDLA_HW_PROJECT=nv_small
  5. make. Then this step I get error information as follows:

/NVDLA/vp/libs/qbox/util/memfd.c:40:12: error: static declaration of ‘memfd_create’ follows non-static declaration static int memfd_create(const char *name, unsigned int flags) ^ In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:115:0, from /usr/include/x86_64-linux-gnu/bits/mman.h:45, from /usr/include/x86_64-linux-gnu/sys/mman.h:41, from /media/simon/360A152B0A14E99F/WorkSpace/NVDLA/vp/libs/qbox/include/sysemu/os-posix.h:29, from /NVDLA/vp/libs/qbox/include/qemu/osdep.h:104, from /NVDLA/vp/libs/qbox/util/memfd.c:28: /usr/include/x86_64-linux-gnu/bits/mman-shared.h:46:5: note: previous declaration of ‘memfd_create’ was here int memfd_create (const char *__name, unsigned int __flags) __THROW; ^ /NVDLA/vp/libs/qbox/rules.mak:66: recipe for target 'util/memfd.o' failed make[3]: *** [util/memfd.o] Error 1 CMakeFiles/qbox.dir/build.make:112: recipe for target 'libs/qbox.build/stampdir/qbox-build' failed make[2]: *** [libs/qbox.build/stampdir/qbox-build] Error 2 CMakeFiles/Makefile2:111: recipe for target 'CMakeFiles/qbox.dir/all' failed make[1]: *** [CMakeFiles/qbox.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2

So anyone can give a suggestion about that?

Thanks.

shgangchen commented 5 years ago

So I know it's a ubuntu 18.04 issue.

zhouweiscut commented 5 years ago

So I know it's a ubuntu 18.04 issue.

i also meet this issue with my ubuntu 18.04, how do you solve this issue? do you change your OS to Ubuntu 14.04 ?

owlyangp commented 4 years ago

Encounter the same issue and did some online research. This is caused by some change in newer glibc, which added memfd_create in sys/mman.h. Made changes in /home/yangp/git_hub/vp/libs/qbox/util/memfd.c as below and the problem is resolved:

//static int memfd_create(const char name, unsigned int flags)
int memfd_create(const char
name, unsigned int flags)