apple / apple/foundationdb

ambiguating new declaration of ‘uint64_t gettid

Open
#2,545 3 comments 0 reactions 1 assignee Claimed by @AlvinMooreSr View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

gcc 9.2.1
Linux 5.4.10
commit 16c32c3

> [ 2%] Building CXX object flow/CMakeFiles/flow.dir/Profiler.actor.g.cpp.o
> /home/pc/workarea/test/foundationdb/flow/Profiler.actor.cpp:39:17: error: ambiguating new declaration of ‘uint64_t gettid()’
> 39 | static uint64_t gettid() { return syscall(__NR_gettid); }
> | ^~~~~~
> In file included from /usr/include/unistd.h:1170,
> from /home/pc/workarea/test/foundationdb/flow/Platform.h:49,
> from /home/pc/workarea/test/foundationdb/flow/flow.h:40,
> from /home/pc/workarea/test/foundationdb/flow/Profiler.actor.cpp:21:
> /usr/include/bits/unistd_ext.h:34:16: note: old declaration ‘__pid_t gettid()’
> 34 | extern __pid_t gettid (void) __THROW;
> | ^~~~~~
> make[2]: *** [flow/CMakeFiles/flow.dir/build.make:326: flow/CMakeFiles/flow.dir/Profiler.actor.g.cpp.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:770: flow/CMakeFiles/flow.dir/all] Error 2
> make: *** [Makefile:163: all] Error 2
>

oh and I had to add this as well, there was an error "pthread_once not defined"
```
TARGET_LINK_LIBRARIES( actor_flamegraph
pthread
)
```
to contrib/monitoring/CMakeLists.txt

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.