dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

fix: dragonfly compilation failure due to glibc version less than 2.30

Open Super-long opened this issue 3 years ago • 1 comments

Signed-off-by: Super-long [email protected]

This is a problem to be solved, but not necessarily the final version. I encountered the following problem when compiling dragonfly:

截屏2022-10-25 19 24 19

In the man documentation I found this description: 截屏2022-10-25 19 36 47

You can check the glibc version by running ldd --version, and on my machine I have the following output: 截屏2022-10-25 19 38 29

This is an issue that needs to be fixed in order to compile dragonfly more robustly. Currently gettid appears in helio/util/uring/proactor_test.cc and src/server/main_service.cc, and in proactor_test.cc because of third_party/gperf/src/stacktrace_ instrument-inl.h(#include <gperftools/profiler.h>) defines #define gettid() syscall(__NR_gettid), so it compiles without error on my machine.

It looks like there are several fixes like this

  1. Create a public file in helio where gettid is defined and dragonfly uses the definition in helio.
  2. Define it directly in main_service.cc, like this PR.

Super-long avatar Oct 25 '22 11:10 Super-long

@Super-long thanks for fixing this. Can you tell, for the protocol, what Linux OS you are building on?

romange avatar Oct 25 '22 12:10 romange

@romange The Linux OS and Version is this: uname-a -> Linux VM-9-54-centos 5.4.119-1-tlinux4-0008 #1 SMP Fri Nov 26 11:17:45 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

Super-long avatar Oct 26 '22 01:10 Super-long