Slow building of a Symbian Qt Project in Qt Creator. Takes over 20 minutes - c++

I'm trying to build a moderately sized Symbian Qt project (around 100 files) using the latest released Nokia Qt SDK (Qt 4.6.3 and Qt Mobility 1.0.2).
The build for the simulator finishes in under 3 minutes, but when I build for the device, the build takes well over 20 minutes! I can forget trying to debug on the device. It is very frustrating!
My machine specs are the following:
Windows 7 32-bit
3.24GB RAM
Intel Core 2 Duo 1.86GHz
The compiler has been stuck here for over 10 minutes:
Running build steps for project AppName...
Starting: "c:/nokiaqtsdk/symbian/sdk/bin/qmake.exe" C:/QtProjects/AppName/AppName.pro -r -spec symbian-abld -after OBJECTS_DIR=obj MOC_DIR=moc UI_DIR=ui RCC_DIR=rcc CONFIG+=release
The process "c:/nokiaqtsdk/symbian/sdk/bin/qmake.exe" exited normally.
Starting: "C:/NokiaQtSDK/Symbian/SDK/epoc32/tools/make.exe" release-gcce -w
C:\NokiaQtSDK\Symbian\SDK\epoc32\tools\make.exe: Entering directory `C:/QtProjects/AppName'
bldmake bldfiles
ABLD.BAT build gcce urel
make -r -f "\NokiaQtSDK\Symbian\SDK\EPOC32\BUILD\QtProjects\AppName\EXPORT.make" EXPORT VERBOSE=-s
make[1]: Entering directory `C:/QtProjects/AppName'
Nothing to do
make[1]: Leaving directory `C:/QtProjects/AppName'
make -r -f "\NokiaQtSDK\Symbian\SDK\EPOC32\BUILD\QtProjects\AppName\GCCE.make" MAKEFILE VERBOSE=-s
make[1]: Entering directory `C:/QtProjects/AppName'
make -s -C \QtProjects\AppName-f "MAKEFILE_0Xe001827C.MK" TO_ROOT=..\.. EPOCBLD=\NokiaQtSDK\Symbian\SDK\EPOC32\BUILD\MAKEFILE_0Xe001827C\GCCE TO_BLDINF=..\..\QtProjects\AppNamePLATFORM=GCCE MAKMAKE
perl -S makmake.pl -D \QtProjects\AppName\APPNAME_0Xe001827C GCCE
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(65) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\stdapis\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(66) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\stdapis\sys\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(69) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\oem\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(72) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(73) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\osextensions\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(74) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\osextensions\loc\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(76) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\osextensions\loc\sc\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(77) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\middleware\loc\sc\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(82) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\stdapis\stlport\" not found
MMPFILE "\QtProjects\AppName\APPNAME_0Xe001827C .MMP"

I solved the slow compilation problem as indicated by this thread
http://discussion.forum.nokia.com/forum/showthread.php?196650-Selective-compiling&p=720040&viewfull=1#post720040
I added
SYMBIANBUILD_DEPENDENCYOFF = 1
to the project environment variables (or it could be added to Windows environment variables), and the project compilation was back to speed again.

The solution to set the environment variable 'SYMBIANBUILD_DEPENDENCYOFF = 1' as mentioned above also works for us and can result in much quicker Target (GCCE) build times.
However, be aware that you may often need to perform a full (cleaned) re-build of the source if you have modified header files, and specifically added/removed functions for classes and therefore amended the class interface. This is because using this environment variable prevents the Symbian build tools from scanning your include files for changes.
Manually deleting the relevant *.o object files from your QTSDK\Symbian\SDK\epoc32\BUILD_yourfolder_ is a way to prevent the need for a full rebuild but also ensure that affected code is rebuilt.
I believe the slow speed of the Symbian GCCE builds is due to the legacy ABLD build tools, which should be replaced by the Symbian Build System (SBS v2) soon.

I've had trouble with very slow builds due to ZoneAlarm - switching it off resulting in builds 10x quicker... Worth a try if you have an OS firewall installed.

So cool page, the slow building speed in qt creator make me very very very frustrating, I nearly give up the Qt 4.6.3 and 4.7.3, after add the system variable 'SYMBIANBUILD_DEPENDENCYOFF = 1', it is really amazing, speed back, So thanks!
By the way, there is no speed problem in qt 4.7.4 and the compiler use the sbs not the perl any more.

Related

Building VirtualBox without GUI or Guest Additions

I'm trying to build VirtualBox 5.2.18 on Ubuntu Server LTS 18.04 64-bit. I want to build it without any GUI components and without Guest Additions, as I want to avoid installing any unnecessary dependencies. I am using the following options when configuring:
./configure --build-headless --disable-qt --disable-alsa --disable-pulse --disable-opengl --disable-sdl-ttf --disable-libvpx --disable-docs
Although there is an option to only build the Guest Additions (--only-additions), there doesn't seem to be an option passable to configure to skip building Guest Additions. Is there a way to skip building Guest Additions, or perhaps to ignore any build-time errors related to building Guest Additions?
I found a solution in https://forums.virtualbox.org/viewtopic.php?t=33090&start=0, which contains more useful details. One can build VirtualBox without GUI or Guest Additions by adding the following lines to LocalConfig.kmk in the root of the development tree:
VBOX_WITHOUT_ADDITIONS = 1
VBOX_WITH_HEADLESS = 1
VBOX_WITH_VRDP=
VBOX_WITH_VRDP_VIDEO_CHANNEL=
VBOX_WITH_VRDP_AUTHMOD=
VBOX_WITH_VRDP_RDESKTOP=
VBOX_WITH_VBOXFB=
VBOX_WITH_KCHMVIEWER=
VBOX_WITH_TESTSUITE=
VBOX_WITH_TESTCASES=
VBOX_WITH_SHARED_FOLDERS=
VBOX_WITH_SHARED_CLIPBOARD=
VBOX_WITH_VNC =
VBOX_X11_SEAMLESS_GUEST=
VirtualBox can then be built by executing the following in the root folder:
./configure --build-headless --disable-qt --disable-alsa --disable-pulse --disable-opengl --disable-sdl-ttf --disable-libvpx --disable-docs
source env.sh
kmk
It is unclear which of the options is necessary for skipping the building of the guest additions (in either LocalConfig.kmk or those passed to ./configure).
When kmk packing is executed, the following error message might appear:
kmk: *** No rule to make target `.../out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso',
needed by `.../out/linux.amd64/release/obj/Installer/linux/archive/additions/VBoxGuestAdditions.iso'.
Stop.
This error can be avoided by executing a touch command before kmk packing (this fix was obtained from https://forums.virtualbox.org/viewtopic.php?f=10&t=41598&p=187420&hilit=VBoxGuestAdditions#p187420):
kmk
mkdir -p out/linux.amd64/release/bin/additions/
touch out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso
kmk packing
The mkdir command was added before touch because touch might fail if the directory out/linux.amd64/release/bin/additions/ did not exist.
Some errors might come up during installation of VirtualBox-*.run, but it should successfully completely. However, if you try to execute VBoxManage, you might get the following error:
Could not find VirtualBox installation. Please reinstall.
This arises most probably because the executable file VirtualBox was not found in the installation folder (usually /opt/VirtualBox). The file VirtualBox is the GUI component which was not built. We can bypass the error by editing VBox.sh in the installation folder, and changing the line
elif test -f "${MY_DIR}/VirtualBox" && test -x "${MY_DIR}/VirtualBox"; then
to
elif test -f "${MY_DIR}/VBoxHeadless" && test -x "${MY_DIR}/VBoxHeadless"; then
VirtualBox should now run without any problems.

*** internal error: unable to open jobserver semaphore '3,4': (Error 2: The system cannot find the file specified. ). Stop

I am trying to compile an existing qt application's code using mingw compiler.
During compilation I am getting an error "*** internal error: unable to open jobserver semaphore '3,4': (Error 2: The system cannot find the file specified. ). Stop".
My current project is a makefile based project. Here I have one make file (parent.mk) that compiles all primary modules and then
parent.mk
compilation steps
.
.
.
make $QT_CODE_DIR
Here in this QT code directory I have another makefile (child.mk) which has following content:
child.mk
cd "qtcode_compilation_out_dir"
qmake.exe "product.pro" -r -spec win32-g++
CONFIG+=release
mingw32-make -w
If I try to run the make command manually for QT code then it works fine.
#Alexander: Thanks for the suggestion.
Please suggest if anyone has any idea about it.
Thanks.
Finally, I found out the exact reason of the problem and solution as well.
Reason for failure:
The compilation command that I am using is "make" which is been aliased to "make -j2"and along with "mingw32-make -w" it was producing the error because mingw32-make is an obsolete make command and it doesn't support multi threaded compilation.
Solution:
I just replaced the mingw32-make with make.

Qt Creator project using CMake : Issues removing files

So here's a quick (and probably inane) question from someone new to CMake and Qt.
I'm currently using Qt Creator, alongside of CMake, to create some project. I have 2 C++ files that I have to remove that are no longer used anywhere within the codebase. I have removed them from the project, the CMakeLists.txt file, nuked the build and qt_build directories, and proceeded to try to rebuild. However, I seem to be getting an warning when running qmake which looks like this...
15:03:03: Running steps for project Traveler...
15:03:03: Starting: "C:\Qt\5.9.2\msvc2017_64\bin\qmake.exe" C:\Users\someone\Traveler\Traveler.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug"**
Info: creating stash file C:\...\build-traveler-Desktop_Qt_5_9_2_MSVC2017_64bit-Debug\.qmake.stash
WARNING: Failure to find: src\XX_Exceptions.cpp
WARNING: Failure to find: include\XX_Exceptions.hpp
WARNING: Failure to find: src\XX_Exceptions.cpp
WARNING: Failure to find: include\XX_Exceptions.hpp
15:03:07: The process "C:\Qt\5.9.2\msvc2017_64\bin\qmake.exe" exited normally.
15:03:07: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe" qmake_all
It seems as if qmake exits without error, but I really don't like seeing these compiler warnings (especially duplicated, so its showing up in two places).
Then, when I proceed to try to build...
15:16:27: Running steps for project Traveler...
15:16:27: Configuration unchanged, skipping qmake step.
15:16:27: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe"
C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
Error: dependent 'src\XX_Exceptions.cpp' does not exist.
jom: C:\Users\someone\build-Traveler-Desktop_Qt_5_9_2_MSVC2017_64bit-Debug\Makefile [debug] Error 2
15:16:28: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project Traveler (kit: Desktop Qt 5.9.2 MSVC2017 64bit)
The kit Desktop Qt 5.9.2 MSVC2017 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"
Question :: Is there any location where the specific files in the project are referenced besides the CMakeLists after I nuke the build directories?

wxWidgets-2.9.4\include and \lib\gcc_lib\mswu No such file or directory error on CodeBlocks

I'm trying to learn C++ programming with wxWidgets and CodeBlocks (with MinGW) and earlier today I succeeded in installing the software (after some trouble) to my Windows 7 computer with the guidance given to me in this post:
wxWidget 2.8.12 not working in Codeblocks
Later on the same day, I did the exact same steps on another Windows 7 machine and after creating a wxWidgets project and trying to compile and run it I got the following errors:
\wxWidgets-2.9.4\include: No such file or directory
\wxWidgets-2.9.4\lib\gcc_lib\mswu: No such file or directory
I have checked and these folders really do exist on those locations...so what seems to be the problem here again?...on the earlier post user asanth kumar guided me that if the steps given in the guide don't get the job done, then I'm missing an important compiler search path in my build options.
Ok, so what do I do? Where do I enter the search path? What is the search path, etc. I'm very new with wxWidgets and CodeBlocks so I don't know very much terminology. If anyone should know what to do, could you please give me like step by step instruction what to do e.g. like Click Project --> Build options --> ... and so on
I have used the latest CodeBlocks (12.11) and wxWidgets (2.9.4) installers
Thank you for any help :)
UPDATE:
here is the build log: (I'm using CodeBlocks 12.11 and wxWidgets 2.9.4)
-------------- Build: Debug in TEST (compiler: GNU GCC Compiler)---------------
windres.exe -I"C:\Users\Jonne\Omat ohjelmat\wxWidgets-2.9.4\include" -I"C:\Users\Jonne\Omat ohjelmat\wxWidgets-2.9.4\lib\gcc_lib\mswu" -J rc -O coff -i C:\Users\Jonne\DOCUME~1\CODEBL~1\TEST\resource.rc -o obj\Debug\resource.res
gcc: error: ohjelmat\wxWidgets-2.9.4\include: No such file or directory
gcc: error: ohjelmat\wxWidgets-2.9.4\lib\gcc_lib\mswu: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings (0 minutes, 0 seconds)
Here is also a picture where you can see Build options, global variables and build log on my CodeBlocks:
NOTICE FUTURE READERS: Install wxWidgets to a directory without whitespace in the path name. The problems in this post was because the directory path had spaces in it
When you create a wxWidgets project.Have you did this?
File->New->Project->wxWidgets Project->Click Go->Click on Next->click on the suitable wxWidgets 2...version->click Next->Give project Name->Click on Next->Click on Next
After that the Following below Screen comes in the Wizard. Give the wxWidgets Location(Path where You installed the wxWidgets 2.9.4)
After that click on Finish.
For Environment Variable Path Setting
Follow the Below Steps:
Right click on MyComputer->Click on Advanced Systems settings->click on Environment Variables->click on New->Give variable name=Path and variable value="C:\Program Files (x86)\CodeBlocks\MinGW\bin" -> click ok
`
Try The Following Steps.It will work.
Updates about Build settings:
I am having the same problem as this and I somehow solved my problem.
I transfer my wxWidget folder to another location path that don't have white space name on it's path. For example above, "C:\Users\Jonne*Omat ohjelmat*\wxWidgets-2.9.4\include"
the path has white space between Omat ohjelmat. Try transfering it where the path contains no white spaces. For me, I put it on C:\wxWidgets-3.1.2

Qt resource system bug in qt 4.8.3

I'm using Qt 4.8.3 Open Source with Qt Creator 2.6.0 on Windows 8 Pro x64. The compiler I'm using is MingW 4.4.
I've an old project that I built using Qt 4.8.0. The project has a resource file named Resource.qrc. The project compiled fine in Qt 4.8.0 and I could access everything that I mentioned in the resource file.
But in Qt 4.8.3 I can't compile the same project. Qt 4.8.3 doesn't seem to be able to compile resource file. Here is the part of the output that tried to compile Resource.qrc file:
bin\rcc.exe -name Resource ..\Source\Resource.qrc -o release\qrc_Resource.cpp
mingw32-make[1]: Leaving directory `E:/Programs/Version Control/Sources/Spadetrump/Release'
process_begin: CreateProcess(NULL, bin\rcc.exe -name Resource ..\Source\Resource.qrc -o release\qrc_Resource.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[1]: *** [release/qrc_Resource.cpp] Error 2
mingw32-make: *** [release] Error 2
00:08:10: The process "C:\MingW\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Spadetrump (target: Desktop)
When executing step 'Make'
It was a clean build. If I execute rcc.exe with the exact same arguments and with absolute path, qrc_Resource.cpp is generated.
I tried the above with a fresh new Qt GUI application and the result is same.
Any idea what's wrong with Qt 4.8.3?
Had the exact same issues as you with the same setup, expect for the windows version which is xp for me. The problem is that the rcc.exe cannot be found, because an incorrect path is used for that call.
There is a bugreport at qt-projects for this problem: https://bugreports.qt.io/browse/QTBUG-27237
The workarround proposed by Daniel Frömmel did the trick for me:
1) open the qmake.conf of your platform (for me its C:\Qt\4.8.3\mkspecs\win32-g++)
2) search for QMAKE_IDC
3) add the following line after the QMAKE_IDC line:
QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc.exe
4) save file and clsoe
5) restart all your dev tools and remove all auto generated Makefiles
6) recompile