davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++
http://dlib.net
Boost Software License 1.0
13.46k stars 3.37k forks source link

dlib_build/libdlib.a(thread_pool_extension.cpp.o): In function `dlib::thread_pool_implementation::thread() [clone .constprop.81]': thread_pool_extension.cpp:(.text+0x16d7): undefined reference to `vtable for dlib::mfp_kernel_1_base_class<0ul>::mp_impl_T<dlib::mfp_kernel_1_base_class<0ul>::mp_null<dlib::mfp_kernel_1_base_class<0ul>::dummy> >'[Bug]: #2848

Closed lucasjinreal closed 12 months ago

lucasjinreal commented 1 year ago

What Operating System(s) are you seeing this problem on?

Linux (aarch64)

dlib version

master

Python version

3.10

Compiler

7

Expected Behavior

dlib_build/libdlib.a(thread_pool_extension.cpp.o): In function dlib::thread_pool_implementation::thread() [clone .constprop.81]': thread_pool_extension.cpp:(.text+0x16d7): undefined reference tovtable for dlib::mfp_kernel_1_base_class<0ul>::mp_impl_T<dlib::mfp_kernel_1_base_class<0ul>::mp_null<dlib::mfp_kernel_1_base_class<0ul>::dummy> >'

Current Behavior

dlib_build/libdlib.a(thread_pool_extension.cpp.o): In function dlib::thread_pool_implementation::thread() [clone .constprop.81]': thread_pool_extension.cpp:(.text+0x16d7): undefined reference tovtable for dlib::mfp_kernel_1_base_class<0ul>::mp_impl_T<dlib::mfp_kernel_1_base_class<0ul>::mp_null<dlib::mfp_kernel_1_base_class<0ul>::dummy> >'

Steps to Reproduce

dlib_build/libdlib.a(thread_pool_extension.cpp.o): In function dlib::thread_pool_implementation::thread() [clone .constprop.81]': thread_pool_extension.cpp:(.text+0x16d7): undefined reference tovtable for dlib::mfp_kernel_1_base_class<0ul>::mp_impl_T<dlib::mfp_kernel_1_base_class<0ul>::mp_null<dlib::mfp_kernel_1_base_class<0ul>::dummy> >'

Anything else?

dlib_build/libdlib.a(thread_pool_extension.cpp.o): In function dlib::thread_pool_implementation::thread() [clone .constprop.81]': thread_pool_extension.cpp:(.text+0x16d7): undefined reference tovtable for dlib::mfp_kernel_1_base_class<0ul>::mp_impl_T<dlib::mfp_kernel_1_base_class<0ul>::mp_null<dlib::mfp_kernel_1_base_class<0ul>::dummy> >'

dlib-issue-bot commented 1 year ago

Warning: this issue has been inactive for 35 days and will be automatically closed on 2023-10-02 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

dlib-issue-bot commented 1 year ago

Warning: this issue has been inactive for 42 days and will be automatically closed on 2023-10-02 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

dlib-issue-bot commented 12 months ago

Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.

jercylew commented 11 months ago

I encountered the same error in CentOS 7, I resolve it by upgrading the gcc to 10

sudo yum install centos-release-scl
sudo yum install devtoolset-10-gcc*
scl enable devtoolset-10 bash

Now verify its version

which gcc
gcc --version

But I strongly suggest use the latest OS distribute, since CentOS 7 will retire soon