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. File Locking with Resource Compiler. Why?

File Locking with Resource Compiler. Why?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 528 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.
  • A.v.OA Offline
    A.v.OA Offline
    A.v.O
    wrote on last edited by
    #1

    Why does the resource compiler lock files?

    My Setup

    I have:

    • Linux Kubuntu 20.04 LTS
    • NFS mount to my sources
    • CMake project file
    • CLion

    Problem

    For some reason when building a Qt demo project I get file locking failures.

    Excerpt 'CMakeLists.txt'

    set(CMAKE_AUTOUIC ON)
    set(CMAKE_AUTOMOC ON)
    set(CMAKE_AUTORCC ON)
    
    set(SOURCES
    	main.cpp
    	mainwindow.cpp
    	mainwindow.h
    	myform.ui
    	demo1.qrc
    	)
    
    AutoRcc error
    -------------
    Locking of the lock file "SRC:/cmake-build-debug/CMakeFiles/demo1_autogen.dir/AutoRcc_demo1_EWIEGA46WW_Lock.lock" failed.
    No locks available
    

    When setting up the CMakeLists.txt as presented next there is no problem.

    set(SOURCES
    	main.cpp
    	mainwindow.cpp
    	mainwindow.h
    	myform.ui
    	)
    
    qt5_add_resources(SOURCES demo1.qrc)
    

    Enabling file locking on my Linux server with systemctl enable rpc-statd and systemctl start rpc-statd also fixed the problem for me since there is no qt6_add_resources(...) function anymore.

    Questions

    File locking is possible on NFS but for other types of mounts it is not.
    Is there a possibility to disable file locking?
    Why is there a need for file locking anyway?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      I don't see what Qt can do against this - when the OS says that there are no resources available (No locks available) the app can't do anything against it.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      A.v.OA 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        I don't see what Qt can do against this - when the OS says that there are no resources available (No locks available) the app can't do anything against it.

        A.v.OA Offline
        A.v.OA Offline
        A.v.O
        wrote on last edited by
        #3

        @Christian-Ehrlicher said in File Locking with Resource Compiler. Why?:

        I don't see what Qt can do against this - when the OS says that there are no resources available (No locks available) the app can't do anything against it.

        It is Qt's resource compiler that is doing the locking.

        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