Results 1 to 5 of 5

Thread: qmake fails processing many many sources in one .pri

  1. #1
    Join Date
    Jan 2006
    Location
    Genk, Belgium
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Unhappy qmake fails processing many many sources in one .pri

    On Fedora 9, Qt 4.5.2's qmake seems not to like including a very large .pri file with very many SOURCES/HEADERS. After including it, stange behaviour appears. In particular the system() calls no longer get executed.

    Contents of files.pri (cut):

    Qt Code:
    1. # ==================================================
    2. # This file has been automatically generated.
    3. # Please do not edit.
    4. # ==================================================
    5. GEN_HEADERS += path_to\src\generated\headerx.h
    6. GEN_SOURCES += path_to\src\generated\sourcex.cpp
    7. ...
    8. [620 headers + 620 sources]
    9.  
    10. HEADERS += $$GEN_HEADERS
    11. SOURCES += $$GEN_SOURCES
    12. QMAKE_CLEAN += $$GEN_HEADERS
    13. QMAKE_CLEAN += $$GEN_SOURCES
    14. QMAKE_DISTCLEAN +=path_to\src\generated\files.pri
    To copy to clipboard, switch view to plain text mode 

    On Windows, and on Fedora 10 and 11, this still works.

    However, I wonder whether they just have a larger limit, or if they have no (practical) limit?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qmake fails processing many many sources in one .pri

    Are you sure this is caused by QMake?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2006
    Location
    Genk, Belgium
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake fails processing many many sources in one .pri

    Yes, I am quite convinced.

    The other .pro files are more or less as follows.

    Main .pro file:
    Qt Code:
    1. # set some variables configuring the file format for which an API must be generated
    2. include(../format.pri)
    To copy to clipboard, switch view to plain text mode 

    Generic format.pri file:
    Qt Code:
    1. # among others, call code generation python script,
    2. # generating a zillion of classes, and a files.pri file listing those classes
    3. # as indicated in original post
    4.  
    5. include ($${CGOUTPUTDIR}/files.pri)
    6.  
    7. # system(...) calls below fail if files.pri too large
    8.  
    9. system(...)
    To copy to clipboard, switch view to plain text mode 

    Further experiments showed that it seems to be the size of the file or of the variable contents that causes this problem. Reducing the path length (but keeping the same number of sources) resolves the issue.

    However, the number of files generated will still increase in near future, so it is important for me to known whether there is a (practical) limit in later Fedora versions/other versions of Qt.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qmake fails processing many many sources in one .pri

    But how do you know it is not somehow related to Fedora and not QMake? You said yourself later versions of Fedora do not suffer from this issue.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2006
    Location
    Genk, Belgium
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake fails processing many many sources in one .pri

    Correction, let's say that it is an issue with qmake running on Fedora 9. It may thus indeed be Fedora. I currently have no clue where it lies.

    Let me rephrase my question:

    Is the failure I observe specific for qmake on Fedora 9, or is there inherently a limit (though larger on other platforms) in the number of sources I can use in this setup.

    Of course, there always is a limit, but I am wondering if this limit is significant, or extremely large...

    If the limit is significant, I will probably run onto it also when migrating to a later Fedora, and would have to refactor my code generation.

Similar Threads

  1. Qmake fails to set shared library dependency
    By jkv in forum Qt Programming
    Replies: 5
    Last Post: 3rd September 2009, 13:44
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  3. 4.1.4 built from source, qmake fails with Hello World
    By Mookie in forum Installation and Deployment
    Replies: 6
    Last Post: 27th June 2006, 23:13

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.