Skip to content

About libatomic requirement for 32-bit amule build #171

Description

@gcomes

I'm the maintainer of amule in the packman repository for openSUSE.
After the release of amule 3.0.0, I'm trying to build amule for i586 on openSUSE tumbleweed.
The normal build fails with the following message:

 CMake Error at CMakeLists.txt:293 (message):
   32-bit target detected (sizeof(void*) == 4).  aMule's download bandwidth
   throttler holds the byte budget as std::atomic<int64_t>; 32-bit CPUs lack a
   native 8-byte atomic and the operations expand to library calls
   (__atomic_*_8) that live in libatomic.  libatomic was not found on this
   system.  Install it and re-run cmake:
     Debian/Ubuntu/Mint: libatomic1-dev
     Fedora/RHEL/Rocky/Arch: libatomic
     macOS/MacPorts: bundled with gcc; install gcc14+ 
 -- Configuring incomplete, errors occurred

Unfortunately there is no package libatomic-devel on openSUSE. However I managed to successfully build amule 32-bit with a trick by manually creating the missing libatomic.so link.
The binaries amule and amuled are linked with the option -latomic, but when I run ldd on such binaries, there is no libatomic dependency.
My question is then: is it necessary to link against libatomic if apparently such library is not used at runtime?

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency filepackaging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions