English 中文(简体)
在开展项目时,Pytorch/Libtorch可以在Fedora找到GLIBC。
原标题:Pytorch/Libtorch can t find GLIBC on Fedora when Making project

• Im试图建造一个C++项目,利用新的膝上型计算机进行录音,并在我操作马克时留下以下错误:

/home/labuser/anaconda3/envs/Research/bin/../lib/gcc/x86_64-conda-linux-gnu/13.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/labuser/anaconda3/envs/Research/lib/python3.11/site-packages/torch/lib/libc10.so: undefined reference to `memcpy@GLIBC_2.14 
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/learn.dir/build.make:101: learn] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/learn.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

作为参考,我的业务系统是Fedora 38,我使用Conda安装了Pytorch/Libtorch和GXX。 该项目本身是利用CMake进行的,然后运行显示上述错误。

Things I ve tried:

  • Updated glibc using dnf update glibc
  • Updated my Pytorch installation etc in conda

我很想知道如何从这里着手。

另有一件事:管理CMakeList确实向我的其他Fedora电脑发出警告。

-- Caffe2: Protobuf version 3.20.3
CMake Warning at /home/labuser/anaconda3/envs/Research/lib/python3.11/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /home/labuser/anaconda3/envs/Research/lib/python3.11/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:8 (find_package)

就如何开展工作提出任何建议? 在撰写自己的法典时,我发现了一些关于交换校准的建议,没有确定如何围绕Pytorch/Libtorch开展工作。

Updated Pytorch and GXX in my conda install, updated glibc using dnf.

问题回答

It seems that the issue you re facing is due to the mismatch between the GLIBC version used by Libtorch and the GLIBC version available on your Fedora system. The error message "undefined reference to `memcpy@GLIBC_2.14 " suggests that Libtorch is looking for GLIBC version 2.14, but the version available on your system might be different.

One approach you can try is to build and link against a version of Libtorch that is compatible with the GLIBC version available on your Fedora system. You might need to use a different version of Libtorch or set up a virtual environment with the required GLIBC version.

Additionally, the warning about the missing kineto_LIBRARY indicates that there might be a missing or misconfigured library in your Libtorch installation. Make sure your Libtorch installation is complete and properly set up.

If the issue persists, you could consider reaching out to the PyTorch community or the developers of the project you re working on for further assistance. They might have more specific guidance on resolving GLIBC compatibility issues with Libtorch on Fedora.





相关问题
pthread functions "_np" suffix

What does "_np" suffix mean here: pthread_mutex_timedlock_np or in macros PTHREAD_MUTEX_TIMED_NP Upd: From glibc2.2 enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, ...

using glibc malloc hooks in a thread safe manner

I would like to monitor the use of mallocs and frees in an application by using the malloc and free hooks. Here s the documentation http://www.gnu.org/s/libc/manual/html_node/Hooks-for-Malloc.html ...

GLIBCXX_3.4.9 not found

I have a problem concerning libstdc++.so. I installed a new version of gcc and tried to compile C++ code. The compiling worked, but when I try to execute the binary (m5.opt is its name) I ve got the ...

Issue with C function returning a gchar**

I have a function defined as the following (in C): gchar **Scan_Return_File_Tag_Field_From_Mask_Code (File_Tag *FileTag, gchar code) { switch (code) { case t : /* Title */ ...

Where is the implementation of strlen() in GCC?

Can anyone point me to the definition of strlen() in GCC? I ve been grepping release 4.4.2 for about a half hour now (while Googling like crazy) and I can t seem to find where strlen() is actually ...

Why inet_ntoa is designed to be a non-reentrant function?

Glancing at the source code of GNU C Library,I found the inet_ntoa is implementated with static __thread char buffer[18] My question is, since there is a need to use reeentrant inet_ntoa,why do not ...

热门标签