Skip to content

Failure during Make: SYS_futex not declared in scope #1618

Closed
@cheezeburglar

Description

@cheezeburglar

Hey all,

I'm trying to build spike on Mint. Once I succesfully configure the project with $RISCV=/opt/riscv and run make, I get this error:

In file included from /usr/include/c++/11/bits/atomic_base.h:41,
                 from /usr/include/c++/11/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11/memory:78,
                 from ../fesvr/context.h:12,
                 from ../fesvr/dtm.h:5,
                 from ../fesvr/dtm.cc:1:
/usr/include/c++/11/bits/atomic_wait.h: In function ‘void std::__detail::__platform_wait(const _Tp*, std::__detail::__platform_wait_t)’:
/usr/include/c++/11/bits/atomic_wait.h:108:29: error: ‘SYS_futex’ was not declared in this scope
  108 |         auto __e = syscall (SYS_futex, static_cast<const void*>(__addr),
      |                             ^~~~~~~~~
/usr/include/c++/11/bits/atomic_wait.h: In function ‘void std::__detail::__platform_notify(const _Tp*, bool)’:
/usr/include/c++/11/bits/atomic_wait.h:121:18: error: ‘SYS_futex’ was not declared in this scope
  121 |         syscall (SYS_futex, static_cast<const void*>(__addr),
      |                  ^~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-nonportable-include-path’ may have been intended to silence earlier diagnostics
make: *** [Makefile:347: dtm.o] Error 1

I did some digging, and I can't replicate this same error in other programs that import the same headers. The above directory contains all RISCV toolchains - I don't know if that's actually important. All help appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions