Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. no such file or directory 'atomic' on linux bullseye

no such file or directory 'atomic' on linux bullseye

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 4 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D drakejest

    Im having problem when i build a fresh project , nothing was added/ remove; i get an error

    no such file or directory 'atomic'
    

    https://i.stack.imgur.com/D63Nk.png

    So i investigate a bit and i kind of found the culprit on the makefile. on line 43

    line 43: LIBS          = $(SUBLIBS) /opt/Qt/6.2.3-armv7l/lib/libQt6Quick.so /opt/Qt/6.2.3-armv7l/lib/libQt6OpenGL.so /opt/Qt/6.2.3-armv7l/lib/libQt6Gui.so -lEGL /opt/Qt/6.2.3-armv7l/lib/libQt6QmlModels.so /opt/Qt/6.2.3-armv7l/lib/libQt6Qml.so -pthread /opt/Qt/6.2.3-armv7l/lib/libQt6Network.so /opt/Qt/6.2.3-armv7l/lib/libQt6Core.so -latomic -lpthread -lGLESv2 atomic
    

    removing word "atomic" at the end removes the error but im not sure if this is the right thing to do as it might cause some weird bugs under the hood. Qt says the line causing the error is line 228

    line 227: untitled:  $(OBJECTS)  
    line 228:   $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
    

    How do i properly solve this issue?

    JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by
    #6

    @drakejest said in no such file or directory 'atomic' on linux bullseye:

    line 43: LIBS = $(SUBLIBS) /opt/Qt/6.2.3-armv7l/lib/libQt6Quick.so /opt/Qt/6.2.3-armv7l/lib/libQt6OpenGL.so /opt/Qt/6.2.3-armv7l/lib/libQt6Gui.so -lEGL /opt/Qt/6.2.3-armv7l/lib/libQt6QmlModels.so /opt/Qt/6.2.3-armv7l/lib/libQt6Qml.so -pthread /opt/Qt/6.2.3-armv7l/lib/libQt6Network.so /opt/Qt/6.2.3-armv7l/lib/libQt6Core.so -latomic -lpthread -lGLESv2 atomic

    You showed this earlier. The very last word on that line is plain atomic. That is not right for a LIBS/linker line. The earlier -latomic near the end of that link line is fine, but not the bare atomic at the end.

    I'm afraid I know nothing about your situation/environment, but that is the cause of the error. Can you track down where that word atomic at the end of that line actually emanates from?

    This is what @ChrisW67 was saying in his post above from a few days ago.

    D 1 Reply Last reply
    0
    • JonBJ JonB

      @drakejest said in no such file or directory 'atomic' on linux bullseye:

      line 43: LIBS = $(SUBLIBS) /opt/Qt/6.2.3-armv7l/lib/libQt6Quick.so /opt/Qt/6.2.3-armv7l/lib/libQt6OpenGL.so /opt/Qt/6.2.3-armv7l/lib/libQt6Gui.so -lEGL /opt/Qt/6.2.3-armv7l/lib/libQt6QmlModels.so /opt/Qt/6.2.3-armv7l/lib/libQt6Qml.so -pthread /opt/Qt/6.2.3-armv7l/lib/libQt6Network.so /opt/Qt/6.2.3-armv7l/lib/libQt6Core.so -latomic -lpthread -lGLESv2 atomic

      You showed this earlier. The very last word on that line is plain atomic. That is not right for a LIBS/linker line. The earlier -latomic near the end of that link line is fine, but not the bare atomic at the end.

      I'm afraid I know nothing about your situation/environment, but that is the cause of the error. Can you track down where that word atomic at the end of that line actually emanates from?

      This is what @ChrisW67 was saying in his post above from a few days ago.

      D Offline
      D Offline
      drakejest
      wrote on last edited by
      #7

      @JonB said in no such file or directory 'atomic' on linux bullseye:

      Can you track down where that word atomic at the end of that line actually emanates from?

      I dont know about a single thing of how makefiles work, my apologies. Im going to need some help in order to do that.

      Where should i start and what exactly am i looking for?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #8

        Hi,

        Can you show your .pro file ?

        By the way, are you cross-compiling ?
        The path to your Qt 6 build contains an armv7 that hints to that.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        D 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Can you show your .pro file ?

          By the way, are you cross-compiling ?
          The path to your Qt 6 build contains an armv7 that hints to that.

          D Offline
          D Offline
          drakejest
          wrote on last edited by
          #9

          @SGaist said in no such file or directory 'atomic' on linux bullseye:

          Can you show your .pro file ?

          Here it is, it is unmodified

          QT += quick
          
          CONFIG += c++11
          
          # You can make your code fail to compile if it uses deprecated APIs.
          # In order to do so, uncomment the following line.
          #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
          
          SOURCES += \
                  main.cpp
          
          RESOURCES += qml.qrc
          
          # Additional import path used to resolve QML modules in Qt Creator's code model
          QML_IMPORT_PATH =
          
          # Additional import path used to resolve QML modules just for Qt Quick Designer
          QML_DESIGNER_IMPORT_PATH =
          
          # Default rules for deployment.
          qnx: target.path = /tmp/$${TARGET}/bin
          else: unix:!android: target.path = /opt/$${TARGET}/bin
          !isEmpty(target.path): INSTALLS += target
          

          @SGaist said in no such file or directory 'atomic' on linux bullseye:

          By the way, are you cross-compiling ?
          The path to your Qt 6 build contains an armv7 that hints to that.

          No the program is running on an armv7 machine (raspberry pi 4).

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #10

            How did you install that version of Qt ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            0
            • SGaistS SGaist

              How did you install that version of Qt ?

              D Offline
              D Offline
              drakejest
              wrote on last edited by
              #11

              @SGaist said in no such file or directory 'atomic' on linux bullseye:

              How did you install that version of Qt ?

              I used this guide
              https://www.tal.org/tutorials/building-qt-62-raspberry-pi

              Out of curiosity, Qt has a installer for 64 bit linux right? would it work with 64 bit bullseye ?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #12

                x86_64, not aarch64.

                Since you are using a .pro file, I am wondering whether the mkspec file you are using is faulty. Can you check that ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                D 1 Reply Last reply
                0
                • SGaistS SGaist

                  x86_64, not aarch64.

                  Since you are using a .pro file, I am wondering whether the mkspec file you are using is faulty. Can you check that ?

                  D Offline
                  D Offline
                  drakejest
                  wrote on last edited by
                  #13

                  @SGaist said in no such file or directory 'atomic' on linux bullseye:

                  x86_64, not aarch64.

                  ahh glad you have told me, i would have go through the laborious process of formatting a new OS

                  @SGaist said in no such file or directory 'atomic' on linux bullseye:

                  Since you are using a .pro file, I am wondering whether the mkspec file you are using is faulty. Can you check that ?

                  where can i find this mkspec file? Is the one in /opt/Qt/6.2.3-armv7l/mkspecs folder you mean ? there are so many folder inside though, how do i know which one im using?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #14

                    I think it should be the one for g++. In any case, I would check for stray "atomic" in these files.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    D 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      I think it should be the one for g++. In any case, I would check for stray "atomic" in these files.

                      D Offline
                      D Offline
                      drakejest
                      wrote on last edited by
                      #15

                      @SGaist there are so many files so i use this terminal command to do the searching.

                      pi@raspberrypi:/opt/Qt/6.2.3-armv7l/mkspecs $ grep -iRl "atomic" ./
                      ./modules/qt_lib_core.pri       
                      ./modules/qt_lib_core_private.pri    //
                      ./modules/qt_lib_gui_private.pri
                      

                      qt_lib_core.pri

                      QT.core.VERSION = 6.2.3
                      QT.core.name = QtCore
                      QT.core.module = Qt6Core
                      QT.core.libs = $$QT_MODULE_LIB_BASE
                      QT.core.ldflags = 
                      QT.core.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtCore
                      QT.core.frameworks = 
                      QT.core.bins = $$QT_MODULE_BIN_BASE
                      QT.core.depends =  
                      QT.core.uses = libatomic
                      QT.core.module_config = v2
                      QT.core.CONFIG = moc resources
                      QT.core.DEFINES = QT_CORE_LIB
                      QT.core.enabled_features = clock-monotonic doubleconversion cxx11_future cxx17_filesystem eventfd glib inotify std-atomic64 mimetype properties regularexpression sharedmemory shortcut systemsemaphore xmlstream xmlstreamreader xmlstreamwriter textdate datestring process processenvironment temporaryfile library settings filesystemwatcher filesystemiterator itemmodel proxymodel sortfilterproxymodel identityproxymodel transposeproxymodel concatenatetablesproxymodel stringlistmodel translation easingcurve animation gestures jalalicalendar islamiccivilcalendar timezone commandlineparser cborstreamreader cborstreamwriter threadsafe-cloexec shared pkg-config rpath c++11 c++14 c++17 c++1z c99 c11 signaling_nan thread future concurrent dbus shared shared rpath c++11 c++14 c++17 c++1z reduce_exports
                      QT.core.disabled_features = static cross_compile debug_and_release separate_debug_info appstore-compliant simulator_and_device force_asserts framework c++20 c++2a
                      QT_CONFIG += clock-monotonic doubleconversion cxx11_future cxx17_filesystem eventfd glib inotify std-atomic64 mimetype properties regularexpression sharedmemory shortcut systemsemaphore xmlstream xmlstreamreader xmlstreamwriter textdate datestring process processenvironment temporaryfile library settings filesystemwatcher filesystemiterator itemmodel proxymodel sortfilterproxymodel identityproxymodel transposeproxymodel concatenatetablesproxymodel stringlistmodel translation easingcurve animation gestures jalalicalendar islamiccivilcalendar timezone commandlineparser cborstreamreader cborstreamwriter threadsafe-cloexec shared pkg-config rpath c++11 c++14 c++17 c++1z c99 c11 signaling_nan thread future concurrent dbus shared shared rpath c++11 c++14 c++17 c++1z reduce_exports
                      QT_MODULES += core
                      

                      qt_lib_core_private.pri

                      QT.core_private.VERSION = 6.2.3
                      QT.core_private.name = QtCore
                      QT.core_private.module =
                      QT.core_private.libs = $$QT_MODULE_LIB_BASE
                      QT.core_private.includes = $$QT_MODULE_INCLUDE_BASE/QtCore/6.2.3 $$QT_MODULE_INCLUDE_BASE/QtCore/6.2.3/QtCore
                      QT.core_private.frameworks = 
                      QT.core_private.depends = core
                      QT.core_private.uses = 
                      QT.core_private.module_config = v2 internal_module
                      QT.core_private.enabled_features = clock-gettime doubleconversion futimens getauxval getentropy glib glibc icu inotify linkat mimetype-database system-pcre2 poll_ppoll statx backtrace sha3-fast hijricalendar datetimeparser forkfd_pidfd pcre2 reduce_exports posix_fallocate alloca_h alloca system-zlib dbus dbus-linked gui network printsupport sql testlib widgets xml libudev dlopen relocatable largefile precompile_header enable_new_dtags
                      QT.core_private.disabled_features = system-doubleconversion futimes journald system-libb2 poll_pollts poll_poll poll_select qqnx_pps renameat2 slog2 syslog lttng etw android-style-assets gc_binaries use_bfd_linker use_gold_linker use_lld_linker private_tests debug reduce_relocations sse2 sse3 ssse3 sse4_1 sse4_2 avx f16c avx2 avx512f avx512er avx512cd avx512pf avx512dq avx512bw avx512vl avx512ifma avx512vbmi aesni rdrnd rdseed shani mips_dsp mips_dspr2 neon arm_crc32 arm_crypto alloca_malloc_h stack-protector-strong zstd intelcet
                      QMAKE_LIBS_BACKTRACE = 
                      QMAKE_INCDIR_GLIB = /usr/lib/arm-linux-gnueabihf/glib-2.0/include
                      QMAKE_LIBS_GLIB = -lglib-2.0
                      QMAKE_LIBS_ICU = -licudata -licuuc -licui18n
                      QMAKE_LIBS_LIBATOMIC = atomic
                      QMAKE_LIBS_LIBRT = -lrt
                      QMAKE_LIBS_PCRE2 = -lpcre2-16
                      

                      ./modules/qt_lib_gui_private.pri

                      QT.gui_private.VERSION = 6.2.3
                      QT.gui_private.name = QtGui
                      QT.gui_private.module =
                      QT.gui_private.libs = $$QT_MODULE_LIB_BASE
                      QT.gui_private.includes = $$QT_MODULE_INCLUDE_BASE/QtGui/6.2.3 $$QT_MODULE_INCLUDE_BASE/QtGui/6.2.3/QtGui
                      QT.gui_private.frameworks = 
                      QT.gui_private.depends = core_private gui
                      QT.gui_private.uses = xkbcommon
                      QT.gui_private.module_config = v2 internal_module
                      QT.gui_private.enabled_features = evdev freetype system-freetype fontconfig harfbuzz kms drm_atomic libinput libinput-axis-api linuxfb vnc mtdev vkgen vkkhrdisplay egl_x11 eglfs eglfs_egldevice eglfs_gbm eglfs_x11 gif ico jpeg system-jpeg png system-png imageio-text-loading tuiotouch xcb-egl-plugin xcb-xlib system-xcb-xinput xkbcommon xkbcommon-x11 xlib multiprocess raster-64bit raster-fp
                      QT.gui_private.disabled_features = accessibility-atspi-bridge directfb directwrite directwrite3 direct2d direct2d1_1 system-harfbuzz qqnx_imf integrityfb integrityhid vsp2 eglfs_brcm eglfs_vsp2 eglfs_mali eglfs_viv eglfs_rcar eglfs_viv_wl eglfs_openwfd tslib xcb-glx xcb-native-painting xrender xcb-sm
                      QMAKE_LIBS_DRM = -ldrm
                      QMAKE_LIBS_EGL = -lEGL
                      QMAKE_LIBS_FREETYPE = -lfreetype
                      QMAKE_LIBS_FONTCONFIG = -lfontconfig
                      QMAKE_LIBS_GBM = -lgbm
                      QMAKE_LIBS_LIBINPUT = -linput
                      QMAKE_LIBS_LIBJPEG = -ljpeg
                      QMAKE_LIBS_LIBPNG = -lpng
                      QMAKE_LIBS_MTDEV = -lmtdev
                      QMAKE_LIBS_OPENGL = -lGLX -lOpenGL
                      QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
                      QMAKE_LIBS_VULKAN = 
                      QMAKE_LIBS_XLIB = -lX11
                      QMAKE_LIBS_XCB = -lxcb
                      QMAKE_LIBS_XCB_ICCCM = -lxcb-icccm
                      QMAKE_LIBS_XCB_IMAGE = -lxcb-image
                      QMAKE_LIBS_XCB_KEYSYMS = -lxcb-keysyms
                      QMAKE_LIBS_XCB_RENDERUTIL = -lxcb-render-util
                      QMAKE_LIBS_XCB_RANDR = -lxcb-randr
                      QMAKE_LIBS_XCB_SHAPE = -lxcb-shape
                      QMAKE_LIBS_XCB_SHM = -lxcb-shm
                      QMAKE_LIBS_XCB_SYNC = -lxcb-sync
                      QMAKE_LIBS_XCB_XFIXES = -lxcb-xfixes
                      QMAKE_LIBS_XCB_XLIB = -lX11-xcb
                      QMAKE_LIBS_XCB_XKB = -lxcb-xkb
                      QMAKE_LIBS_XCB_RENDER = -lxcb-render
                      QMAKE_LIBS_XCB_GLX = -lxcb-glx
                      QMAKE_LIBS_XCB_XINPUT = -lxcb-xinput
                      QMAKE_LIBS_XKBCOMMON = -lxkbcommon
                      QMAKE_LIBS_XKBCOMMON_X11 = -lxkbcommon -lxkbcommon-x11
                      QMAKE_LIBS_XRENDER = -lX11 -lXrender
                      

                      Im not really knowledgable enough to know if the atomic under these files are stray, maybe you can tell :)

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #16

                        Change qt_lib_core_private.pri

                        QMAKE_LIBS_LIBATOMIC = -latomic
                        

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        D 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Change qt_lib_core_private.pri

                          QMAKE_LIBS_LIBATOMIC = -latomic
                          
                          D Offline
                          D Offline
                          drakejest
                          wrote on last edited by
                          #17

                          @SGaist said in no such file or directory 'atomic' on linux bullseye:

                          Change qt_lib_core_private.pri

                          QMAKE_LIBS_LIBATOMIC = -latomic
                          

                          That is indeed the solution! it does not appear anymore ! Thank you very much for you help. It was very annoying to keep removing it at the makefile everytime i build.

                          why does this happen though>?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #18

                            Likely a glitch in the file generation process.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved