Fedora 22 - 编译 - __atomic_is_lock_free [英] Fedora 22 - compile - __atomic_is_lock_free

查看:565
本文介绍了Fedora 22 - 编译 - __atomic_is_lock_free的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在Fedora 22上编译软件(SuperCollider),但遇到了一个问题:

  libsupernova.a(server.cpp.o):函数`std :: atomic< boost :: lockfree :: detail :: tagged_index> :: is_lock_free()const':
/ usr / include /c++/5.1.1/atomic:212:对`__atomic_is_lock_free'的未定义引用
collect2:error:ld返回1退出状态
服务器/超新星/ CMakeFiles / supernova.dir / build.make:96:目标'服务器/超新星/超新星'失败
make [2]:*** [服务器/超新星/超新星]错误1
CMakeFiles / Makefile2:3383: CMakeFiles / supernova.dir / all'failed
make [1]:*** [server / supernova / CMakeFiles / supernova.dir / all] Error 2
Makefile:146:recipe for all'all'失败
make:*** [all]错误2

在我看来,这个是libatomic的问题。是否有可能gcc不链接到libatomic?



有人对如何解决这个问题有任何想法吗?

另一个想法是尝试安装-latomic,但我无法找到有关的信息。
相反,我已经安装了libatomic。我不知道它们是否相同。

解决方案

我遇到了同样的问题,是的,您需要链接libatomic。这样做的方法是在运行cmake之前将以下行添加到顶层CMakeLists.txt文件中: set(CMAKE_CXX_LINK_FLAGS$ {CMAKE_CXX_LINK_FLAGS} -latomic)



完整流程可能如下所示:


  • git clone https://github.com/supercollider/supercollider.git

  • cd supercollider

  • 添加设置(CMAKE_CXX_LINK_FLAGS$ {CMAKE_CXX_LINK_FLAGS} -latomic)到顶层CMakeLists.txt
  • 运行 ccmake。来配置安装
  • mkdir _build; cd _build

  • cmake ..

  • make&& <须藤> make install



根据您决定安装supercollider的位置,您可能需要也可能不需要sudo。 / p>

I am try to compile a software (SuperCollider) on Fedora 22 but I run into a problem:

libsupernova.a(server.cpp.o): In function `std::atomic<boost::lockfree::detail::tagged_index>::is_lock_free() const':
/usr/include/c++/5.1.1/atomic:212: undefined reference to `__atomic_is_lock_free'
collect2: error: ld returned 1 exit status
server/supernova/CMakeFiles/supernova.dir/build.make:96: recipe for target 'server/supernova/supernova' failed
make[2]: *** [server/supernova/supernova] Error 1
CMakeFiles/Makefile2:3383: recipe for target 'server/supernova/CMakeFiles/supernova.dir/all' failed
make[1]: *** [server/supernova/CMakeFiles/supernova.dir/all] Error 2
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2

It seems to me that this is a problem with libatomic. Is it possible that gcc does not link to libatomic?

Does someone have any idea on how to solve this problem?

Another idea would be to try to install -latomic, but I cannot find information about. Instead I already installed libatomic. I don't know if they are the same.

解决方案

i ran into the same issue, and yes you do need to link libatomic. the way to do this is to add to the line: set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic") to the top level CMakeLists.txt file before running cmake.

the full flow might look like this:

  • git clone https://github.com/supercollider/supercollider.git
  • cd supercollider
  • add set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic") to top level CMakeLists.txt
  • run ccmake . to configure the install
  • mkdir _build ; cd _build
  • cmake ..
  • make && <sudo> make install

you may or may not need sudo depending on where you have decided to install supercollider.

这篇关于Fedora 22 - 编译 - __atomic_is_lock_free的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆