oceanbase icon indicating copy to clipboard operation
oceanbase copied to clipboard

[Question] What's the GLIBC version requirement?

Open tisonkun opened this issue 2 years ago • 4 comments

Please check the issue list for the same question

  • [X] Please try full text in English and attach precise description.

Describe your question

I'm building oceanbase master on archlinux:

bash build.sh debug --init --make

Deps fetched correctly, but compilation failed as:

[100%] Built target obcdc_static
ld.lld: error: undefined symbol: pthread_mutexattr_setrobust_np
>>> referenced by proc_mutex.c
>>>               proc_mutex.o:(proc_mutex_pthread_create) in archive ../../../deps/3rd/usr/local/oceanbase/deps/devel/lib/libapr-1.a
>>> did you mean: pthread_mutexattr_setrobust_np@GLIBC_2.4
>>> defined in: /usr/lib/libc.so.6

ld.lld: error: undefined symbol: pthread_mutex_consistent_np
>>> referenced by proc_mutex.c
>>>               proc_mutex.o:(proc_mutex_pthread_acquire) in archive ../../../deps/3rd/usr/local/oceanbase/deps/devel/lib/libapr-1.a
>>> referenced by proc_mutex.c
>>>               proc_mutex.o:(proc_mutex_pthread_tryacquire) in archive ../../../deps/3rd/usr/local/oceanbase/deps/devel/lib/libapr-1.a
>>> did you mean: pthread_mutex_consistent_np@GLIBC_2.4
>>> defined in: /usr/lib/libc.so.6

ld.lld: error: undefined symbol: sys_siglist
>>> referenced by signals.c
>>>               signals.o:(apr_signal_description_get) in archive ../../../deps/3rd/usr/local/oceanbase/deps/devel/lib/libapr-1.a

ld.lld: error: undefined symbol: pthread_yield
>>> referenced by thread.c
>>>               thread.o:(apr_thread_yield) in archive ../../../deps/3rd/usr/local/oceanbase/deps/devel/lib/libapr-1.a
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/observer/CMakeFiles/observer.dir/build.make:161: src/observer/observer] Error 1
make[1]: *** [CMakeFiles/Makefile2:10155: src/observer/CMakeFiles/observer.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target obcdc
make: *** [Makefile:166: all] Error 2

It looks like GLIBC version mismatch. Do you have some suggestions to overcome this error?

tisonkun avatar Apr 06 '23 07:04 tisonkun

It seems bumping libapr to 1.7.0 can fix this issue - https://open.oceanbase.com/blog/1794247424

tisonkun avatar Apr 06 '23 07:04 tisonkun

Successfully compiled by replacing libapr with 1.7.3.

I may try to write this troubleshooting somewhere (Wiki pages are hard to cooperate with).

You guys may investigate whether we can upgrade libapr to 1.7.3 (the only dependency is coming from deps/oblib/src/lib/restore)

tisonkun avatar Apr 06 '23 07:04 tisonkun

For anyone stuck in this issue: You can download a copy of the source code of the libapr and recompile it, then replace the ../deps/3rd/usr/local/oceanbase/deps/devel/lib/libapr-1.a with archive file you've compiled.

Tiger1218 avatar Oct 26 '24 15:10 Tiger1218

oceanbase supports ubuntu24.04?

dzr171712 avatar Oct 22 '25 01:10 dzr171712