FLAC file as resource causes compilation to fail
-
Hello,
I added a 40 MB FLAC file as a resource in QTCreator to a new QtQuick project. Unfortunately that causes complation to fail with the following message:
virtual memory exhausted: Cannot allocate memory
Makefile:630: recipe for target 'qrc_qml.o' failedWhen trying to compile a new project with a FLAC file, the cc1plus process will start eating up memory immediately - it fails even with 8 GB physical memory + 8 GB swapfile.
When I compile another project with many PNG images (~20 MB), this does not cause any problems, and it barely registers in memory.Is this a bug or are there limitations in file types or sizes when it comes to the QT resource files?
(System specs: Qt 5.6.0 ; Qt Creator 3.6.1; GCC 4.9.1 20140922 64 bits; Debian GNU/Linux 64 bits; downloaded from QT website (not repo); compiling for Android ARM7 and x86 desktop - same problem )
(Edit: the version from the Debian repositories has the same problem. It uses the system's GCC instead, which is GCC 5.3.1 )
-
hi
Just tried on windows with 2x files from here
http://www.eclassical.com/pages/24-bit-faq.html
so ca 60 MB and it takes a moment but works fine.There should be no limit of type but all files are converted into array to compile into
the code so it can get too big for compiler.Could it be the flag file itself somehow ?
-
@trollkatt
hi
Did check mem usage. its almost stay at same.
very little change. not anything like u see.Perhaps for good measure u can run my sample in linux?
https://www.dropbox.com/s/6pwirw3jfl0h1ns/QRES_TEST.zip?dl=0
(50 MB) -
@trollkatt
You shouldn't compile a resource this big into the binary to begin with! Load it at runtime instead. For example look at this thread.