Fedora 22 - compilation - __atomic_is_lock_free

I am trying to compile software (SuperCollider) on Fedora 22, but I ran 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 reference libatomic?

Does anyone have any ideas on how to solve this problem?

Another idea is to try installing -latomic, but I cannot find information about it. Instead, I already installed libatomic. I do not know if they match.

+4
source share
2 answers

I ran into the same problem, and yes, you 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 stream may look like this:

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

sudo , .

+3

, libatomic. , gcc libatomic?

libatomic, .

- , ?

libatomic.

- -latomic, . libatomic. , .

" -latomic", -latomic - /, libatomic, " ", , .

libatomic, -latomic

( : GCC, -latomic , , . https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65913)

+2