https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92247

            Bug ID: 92247
           Summary: ‘__NR_open’ was not declared in this scope
                    libsanitizer/sanitizer_common/sanitizer_linux
                    compilation failed on ubuntu 18.04 WSL2
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: euloanty at live dot com
  Target Milestone: ---

In file included from
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:162:
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_open(const char*, int)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_open’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:200:27: note:
in expansion of macro ‘SYSCALL’
  200 |   return internal_syscall(SYSCALL(open), (uptr)filename, flags);
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_open(const char*, int,
__sanitizer::u32)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_open’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:209:27: note:
in expansion of macro ‘SYSCALL’
  209 |   return internal_syscall(SYSCALL(open), (uptr)filename, flags, mode);
      |                           ^~~~~~~
In file included from
../../../.././libsanitizer/sanitizer_common/sanitizer_flags.h:16,
                 from
../../../.././libsanitizer/sanitizer_common/sanitizer_common.h:18,
                 from
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:19:
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_ftruncate(__sanitizer::fd_t,
__sanitizer::uptr)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_ftruncate’ was not declared in this scope; did you mean
‘ftruncate’?
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_internal_defs.h:408:14:
note: in definition of macro ‘HANDLE_EINTR’
  408 |       res = (f);                                                   \
      |              ^
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:229:44: note:
in expansion of macro ‘SYSCALL’
  229 |   HANDLE_EINTR(res, (sptr)internal_syscall(SYSCALL(ftruncate), fd,
      |                                            ^~~~~~~
In file included from
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:162:
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_stat(const char*, void*)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_stat64’ was not declared in this scope; did you mean ‘__lxstat64’?
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:319:30: note:
in expansion of macro ‘SYSCALL’
  319 |   int res = internal_syscall(SYSCALL(stat64), path, &buf64);
      |                              ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_lstat(const char*, void*)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_lstat64’ was not declared in this scope; did you mean
‘__lxstat64’?
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:344:30: note:
in expansion of macro ‘SYSCALL’
  344 |   int res = internal_syscall(SYSCALL(lstat64), path, &buf64);
      |                              ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_dup2(int, int)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_dup2’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:385:27: note:
in expansion of macro ‘SYSCALL’
  385 |   return internal_syscall(SYSCALL(dup2), oldfd, newfd);
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_readlink(const char*, char*,
__sanitizer::uptr)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_readlink’ was not declared in this scope; did you mean ‘readlink’?
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:397:27: note:
in expansion of macro ‘SYSCALL’
  397 |   return internal_syscall(SYSCALL(readlink), (uptr)path, (uptr)buf,
bufsize);
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_unlink(const char*)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_unlink’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:405:27: note:
in expansion of macro ‘SYSCALL’
  405 |   return internal_syscall(SYSCALL(unlink), (uptr)path);
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_rename(const char*, const char*)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_rename’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:414:27: note:
in expansion of macro ‘SYSCALL’
  414 |   return internal_syscall(SYSCALL(rename), (uptr)oldpath,
(uptr)newpath);
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_getdents(__sanitizer::fd_t,
__sanitizer::linux_dirent*, unsigned int)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_getdents’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:741:27: note:
in expansion of macro ‘SYSCALL’
  741 |   return internal_syscall(SYSCALL(getdents), fd, (uptr)dirp, count);
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘__sanitizer::uptr __sanitizer::internal_lseek(__sanitizer::fd_t,
__sanitizer::OFF_T, int)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_lseek’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:746:27: note:
in expansion of macro ‘SYSCALL’
  746 |   return internal_syscall(SYSCALL(lseek), fd, offset, whence);
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘int __sanitizer::internal_fork()’:
../../../.././libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24:
error: ‘__NR_fork’ was not declared in this scope
   19 | # define SYSCALL(name) __NR_ ## name
      |                        ^~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:763:27: note:
in expansion of macro ‘SYSCALL’
  763 |   return internal_syscall(SYSCALL(fork));
      |                           ^~~~~~~
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp: In function
‘void* __sanitizer::internal_start_thread(void (*)(void*), void*)’:
../../../.././libsanitizer/sanitizer_common/sanitizer_linux.cpp:1712:58:
warning: cast between incompatible function types from ‘void (*)(void*)’ to
‘void* (*)(void*)’ [-Wcast-function-type]
 1712 |   real_pthread_create(&th, nullptr, (void*(*)(void *arg))func, arg);
      |                                                          ^~~~
Makefile:610: recipe for target 'sanitizer_linux.lo' failed
make[8]: *** [sanitizer_linux.lo] Error 1
make[8]: Leaving directory
'/home/cqwrteur/gcc/x86_64-pc-linux-gnu/32/libsanitizer/sanitizer_common'
Makefile:527: recipe for target 'all-recursive' failed
make[7]: *** [all-recursive] Error 1
make[7]: Leaving directory
'/home/cqwrteur/gcc/x86_64-pc-linux-gnu/32/libsanitizer'
Makefile:414: recipe for target 'all' failed
make[6]: *** [all] Error 2
make[6]: Leaving directory
'/home/cqwrteur/gcc/x86_64-pc-linux-gnu/32/libsanitizer'
Makefile:795: recipe for target 'multi-do' failed
make[5]: *** [multi-do] Error 1
make[5]: Leaving directory
'/home/cqwrteur/gcc/x86_64-pc-linux-gnu/libsanitizer'
Makefile:763: recipe for target 'all-multi' failed
make[4]: *** [all-multi] Error 2
make[4]: Leaving directory
'/home/cqwrteur/gcc/x86_64-pc-linux-gnu/libsanitizer'
Makefile:527: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
'/home/cqwrteur/gcc/x86_64-pc-linux-gnu/libsanitizer'
Makefile:414: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory
'/home/cqwrteur/gcc/x86_64-pc-linux-gnu/libsanitizer'
Makefile:20604: recipe for target 'all-target-libsanitizer' failed
make[1]: *** [all-target-libsanitizer] Error 2
make[1]: Leaving directory '/home/cqwrteur/gcc'
Makefile:1004: recipe for target 'all' failed
make: *** [all] Error 2

Reply via email to