- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用这个 GitHub 存储库 https://github.com/davidstutz/mesh-fusion我正在遵循它的指示。我在 cmake ..
之后得到的错误如下。我应该如何解决它?
Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
CMakeError.log
中的错误是:
/usr/bin/ld: cannot find -lpthreads
我遵循了这个答案:
https://stackoverflow.com/a/31948969/2414957
$ ls /usr/lib/x86_64-linux-gnu/libpthread.so
lrwxrwxrwx 1 root root 37 Aug 17 16:02 /usr/lib/x86_64-linux-gnu/libpthread.so -> /lib/x86_64-linux-gnu/libpthread.so.0
$ nm /lib/x86_64-linux-gnu/libpthread.so.0 | grep "pthread_create"
00000000000098d0 t __pthread_create_2_1
0000000000007af7 t __pthread_create_2_1.cold
00000000000098d0 T pthread_create@@GLIBC_2.2.5
我有:
[3645:3637 0:2047] 10:00:46 Tue Jan 12 [mona@goku:pts/0 +1] ~/mesh-fusion/libfusiongpu/build
$ cmake ..
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-11.2 (found suitable version "11.2", minimum required is "6.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mona/mesh-fusion/libfusiongpu/build
CMakeError.log
是:
[3645:3637 0:2051] 10:03:13 Tue Jan 12 [mona@goku:pts/0 +1] ~/mesh-fusion/libfusiongpu/build/CMakeFiles
$ cat CMakeError.log
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_d8db1/fast && /usr/bin/make -f CMakeFiles/cmTC_d8db1.dir/build.make CMakeFiles/cmTC_d8db1.dir/build
make[1]: Entering directory '/home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d8db1.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_d8db1.dir/src.c.o -c /home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_d8db1
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d8db1.dir/link.txt --verbose=1
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_d8db1.dir/src.c.o -o cmTC_d8db1
/usr/bin/ld: CMakeFiles/cmTC_d8db1.dir/src.c.o: in function `main':
src.c:(.text+0x46): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x52): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x63): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_d8db1.dir/build.make:87: cmTC_d8db1] Error 1
make[1]: Leaving directory '/home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_d8db1/fast] Error 2
Source file was:
#include <pthread.h>
void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_4d856/fast && /usr/bin/make -f CMakeFiles/cmTC_4d856.dir/build.make CMakeFiles/cmTC_4d856.dir/build
make[1]: Entering directory '/home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4d856.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_4d856.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
Linking C executable cmTC_4d856
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4d856.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_4d856.dir/CheckFunctionExists.c.o -o cmTC_4d856 -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_4d856.dir/build.make:87: cmTC_4d856] Error 1
make[1]: Leaving directory '/home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_4d856/fast] Error 2
我有:
$ lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
这是
CMakeLists.txt
文件(我添加了前两行):
cmake_minimum_required (VERSION 2.8.7) ## added by mona
find_package(Threads) ## added by mona
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_STANDARD 11)
# set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -msse4.2 -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2 -msse3 -msse4.2 -fPIC")
find_package(CUDA 6.5 REQUIRED)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES -Wall")
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}; -gencode=arch=compute_30,code=sm_30")
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}; -gencode=arch=compute_30,code=compute_30")
set(FUSION_GPU_SRC
fusion.cu
fusion_zach_tvl1.cu
)
cuda_add_library(fusion_gpu SHARED ${FUSION_GPU_SRC})
target_link_libraries(fusion_gpu ${CUDA_LIBRARIES})
稍后,如果我运行
make
命令我会得到这个错误:
[3645:3637 0:2070] 10:33:37 Tue Jan 12 [mona@goku:pts/0 +1] ~/mesh-fusion/libfusiongpu/build
$ make
[ 33%] Building NVCC (Device) object CMakeFiles/fusion_gpu.dir/fusion_gpu_generated_fusion_zach_tvl1.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_30'
CMake Error at fusion_gpu_generated_fusion_zach_tvl1.cu.o.Release.cmake:220 (message):
Error generating
/home/mona/mesh-fusion/libfusiongpu/build/CMakeFiles/fusion_gpu.dir//./fusion_gpu_generated_fusion_zach_tvl1.cu.o
make[2]: *** [CMakeFiles/fusion_gpu.dir/build.make:72: CMakeFiles/fusion_gpu.dir/fusion_gpu_generated_fusion_zach_tvl1.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:75: CMakeFiles/fusion_gpu.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
最佳答案
我使用了这段代码的第 77-83 行:https://github.com/baidu-research/warp-ctc/blob/master/CMakeLists.txt
在我的CMakeLists.txt
文件:
##set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}; -gencode=arch=compute_30,code=sm_30")
##set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}; -gencode=arch=compute_30,code=compute_30")
IF ((CUDA_VERSION VERSION_GREATER "10.0") OR (CUDA_VERSION VERSION_EQUAL "10.0"))
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_75,code=sm_75")
ENDIF()
IF ((CUDA_VERSION VERSION_GREATER "11.0") OR (CUDA_VERSION VERSION_EQUAL "11.0"))
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_80,code=sm_80")
ENDIF()
和
make
那是成功的。显然,可以忽略您在
cmake ..
看到的错误。
关于ubuntu - nvcc 致命 : Unsupported gpu architecture 'compute_30' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65695117/
如果您设计分布式应用程序以实现轻松扩展,或者您只想使用 Amazon、Google 或 Microsoft 提供的任何新的“云计算”产品,那么您通常最终会使用一些典型的概念或组件: 分布式 blob
根据uncle Bob's Clean Architecture 、企业和应用程序业务规则(概念上由命令组成)位于外部接口(interface)层之下的层中。因此,无论何时调用接口(interface
我在网上找不到它的任何实现实际上为您提供了一种与框架无关且实用的实现方式。 我已经看到了几个解决它的低于标准的建议: 使存储库方法成为原子 使用例原子化 它们都不是理想的。 案例#1 :大多数用例依赖
我正在查看 Sparkle 项目的配置并注意到它们设置: 架构 = ppc i386 x86_64 有效架构 = i386 x86_64 来自苹果的有效架构描述: Space-separated li
只听本周的podcast并认为将您的一些经验组合在一起会很好,在这些经验中,您已经看到设计的“架构”方面比应有的支配更多东西。 Java 在这方面经常受到负面报道,而且随着 Java EE 的复杂性增
我正在阅读 Bob Martin (https://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html) 的清洁架构
OSGi是模块化架构,JavaBeans是组件架构。有什么区别? 最佳答案 OSGi 和 Java Beans 之间的主要区别在于类加载器的工作方式。在标准 .jar 文件或 EJB 中,rt.jar
我对 Clean Architecture 中的 Gateway to Entity 依赖有疑问。我认为以下同心圆图形经常被介绍为整洁的架构。 在上图中,Gateway并没有直视Entity。但是,还
我试图理解 TOGAF 9 的核心概念。 无论我多长时间阅读 TOGAF 手册中的解释,我都无法理解 Enterprise Continuum 和 Architecture Repository 之间
如果 Kappa 架构直接对流进行分析,而不是将数据拆分为两个流,那么在像 Kafka 这样的消息系统中,数据存储在哪里?或者它可以在数据库中进行重新计算? 单独的批处理层是否比使用流处理引擎重新计算
它们的含义是什么,我可以将它们设置为不同的值吗? 最佳答案 架构是您想要构建的架构,有效的架构是您可以设想使用您的代码库构建的架构。 所以也许您只想为 armv7 构建二进制文件,但相同的源代码可以为
我现在正在尝试在 Xcode 4.0 中构建的项目遇到问题,希望有人可以为我解释一下。 我正在尝试使用 ZBar SDK 并遵循此处概述的指南中概述的说明: http://zbar.sourcefor
在基于 Apple Silicon 的机器上使用 Interface builder 时,我当前的项目会引发 IBDesignable 错误。 我尝试排除用于调试的 arm64 架构,以及我在互联网上
Xcode 项目中出现警告: crypto was rejected as an implicit dependency for 'libcrypto.a' because its architect
我正在 Xcode 5 中开始新项目。我想使用 iOS SDK 7 开发应用程序,但部署目标为 iOS 5.0。当我在 Xcode 中创建新项目并尝试将部署目标更改为 5.0 时,我收到了这条消息:
编辑 :这个问题可能是旧的,它与 xcode 3 有关。 我正在开发一个需要 voip 支持的 iPhone 应用程序,所以我添加了 pjsip 的 ARM 版本图书馆。但如果我使用 iPhone 模
我们最近将最低 iOS 支持设置为 4.0,并开始使用 LLVM 编译器对当前可用的应用程序进行新更新。 将“架构”和“有效架构”设置为仅 armv7 是否会排除 iPhone 3G 等 armv6
我想在我的 64 位机器上启用额外的架构(32 位)。我做了 dpkg --print-architecture 来了解已知的架构,即 amd64 。之后我做了 dpkg --print--forei
操作系统:OS X Yosemite 版本 10.10.1 XCode:未安装 应用程序加载器3.0 (620) PhoneGap:3.7.0 PhoneGap 构建:在线 (build.phoneg
我们已经构建了一个具有多个 native 绑定(bind)的 Xamarin 应用程序(iOS、Android)。该应用程序在设备和模拟器上运行良好,我们能够毫无问题地构建存档(显然)。 问题是当我们
我是一名优秀的程序员,十分优秀!