[Bug]: make some programs raise error: undefined symbol: pthread_cancel #2639
-
Problem descriptionI'm not good at English, if you can't understand what I am saying, I'm sorry ~/sysbench $ make
Making all in doc
make[1]: Entering directory '/data/data/com.termux/files/home/sysbench/doc'
Making all in xsl
make[2]: Entering directory '/data/data/com.termux/files/home/sysbench/doc/xsl'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/data/data/com.termux/files/home/sysbench/doc/xsl'
make[2]: Entering directory '/data/data/com.termux/files/home/sysbench/doc'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/data/data/com.termux/files/home/sysbench/doc'
make[1]: Leaving directory '/data/data/com.termux/files/home/sysbench/doc'
Making all in third_party/luajit
make[1]: Entering directory '/data/data/com.termux/files/home/sysbench/third_party/luajit'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/data/data/com.termux/files/home/sysbench/third_party/luajit'
Making all in third_party/concurrency_kit
make[1]: Entering directory '/data/data/com.termux/files/home/sysbench/third_party/concurrency_kit'
make[1]: Nothing to be done for 'all'
......
make[3]: Leaving directory '/data/data/com.termux/files/home/sysbench/src/lua'
make[2]: Leaving directory '/data/data/com.termux/files/home/sysbench/src/lua'
Making all in .
make[2]: Entering directory '/data/data/com.termux/files/home/sysbench/src'
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -Wvla -O2 -funroll-loops -ggdb3 -rdynamic -L/data/data/com.termux/files/usr/lib -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o sb_histogram.o sb_rand.o sb_thread.o sb_barrier.o sb_lua.o sb_util.o sb_counter.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/data/data/com.termux/files/usr/lib// -lmariadb /data/data/com.termux/files/home/sysbench/third_party/luajit/lib/libluajit-5.1.a -ldl /data/data/com.termux/files/home/sysbench/third_party/concurrency_kit/lib/libck.a -lm
libtool: link: gcc -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -Wvla -O2 -funroll-loops -ggdb3 -rdynamic -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o sb_histogram.o sb_rand.o sb_thread.o sb_barrier.o sb_lua.o sb_util.o sb_counter.o -L/data/data/com.termux/files/usr/lib tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/data/data/com.termux/files/usr/lib// -lmariadb /data/data/com.termux/files/home/sysbench/third_party/luajit/lib/libluajit-5.1.a -ldl /data/data/com.termux/files/home/sysbench/third_party/concurrency_kit/lib/libck.a -lm
ld.lld: error: undefined symbol: pthread_cancel
>>> referenced by sb_thread.c:100
>>> sb_thread.o:(sb_thread_cancel)
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:560: sysbench] Error 1
make[2]: Leaving directory '/data/data/com.termux/files/home/sysbench/src'
make[1]: *** [Makefile:621: all-recursive] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/sysbench/src'
make: *** [Makefile:500: all-recursive] Error 1
~/sysbench $ and there are corresponding errors in other similar programs. Steps to reproduce the behavior.
What is the expected behavior?build can successful finish and can runningable System information
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Its missing the pthread library. On line 288 of Makefile:
to
Then run: make -j |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Its missing the pthread library. On line 288 of Makefile:
Change
to
Then run: make -j