Hello Everyone,
I'm building & packaging the newest TIP Gqrx from git but I noticed that the Qmake build approach (not Cmake) seems to be including -g debugging objects as well as only -O2 optimizations. Any ideas where it's getting this from? As you can see below, I also manually delete the Makefile, re-create it and it's re-creating these settings into the Makefile.
There is nothing else that I can see in the gqrx.pro file that seems to be invoking this. I also see the build is only using a single core. What's the best way to pass on say "-j 4" via Qmake?
If I do the build manually, it comes up: -- $ rm Makefile
$ qmake-qt4 gqrx.pro Project MESSAGE: Gqrx configured with pulseaudio backend Project MESSAGE: No prefix given. Using /usr/local fatal: Not a git repository (or any of the parent directories): .git WARNING: /usr/src/redhat/BUILD/gqrx-2.5.3/gqrx.pro:241: Variable INCPATH is deprecated; use INCLUDEPATH instead. $ grep -r "\-g \-O2" * Makefile:CFLAGS = -pipe -O3 -march=native -m64 -g -O2 -Wall -W -D_REENTRANT $(DEFINES) Makefile:CXXFLAGS = -pipe -O3 -march=native -m64 -g -O2 -Wall -W -D_REENTRANT $(DEFINES) -- Here is the output when building and packaging into an RPM:
--
$ time rpmbuild -bb --target=x86_64 gqrx.spec Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.CA7npm + umask 022 + cd /home/dranch/rpmbuild/BUILD + LANG=C + export LANG + unset DISPLAY + cd /home/dranch/rpmbuild/BUILD + rm -rf gqrx-2.5.3 + /bin/tar -xf /home/dranch/rpmbuild/SOURCES/gqrx-2.5.3-20160811git31a2289f.tar.bz2 + cd gqrx-2.5.3 + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + mv gqrx.pro gqrx.pro_in + sed 's/VER = 0.0/VER = 2.5.3/g' gqrx.pro_in + rm gqrx.pro_in + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.gdn9Of + umask 022 + cd /home/dranch/rpmbuild/BUILD + cd gqrx-2.5.3 + LANG=C + export LANG + unset DISPLAY + export QTDIR=/usr/lib64/qt4 + QTDIR=/usr/lib64/qt4 + qmake-qt4 gqrx.pro Project MESSAGE: Gqrx configured with pulseaudio backend Project MESSAGE: No prefix given. Using /usr/local fatal: Not a git repository (or any of the parent directories): .git WARNING: /usr/src/redhat/BUILD/gqrx-2.5.3/gqrx.pro:241: Variable INCPATH is deprecated; use INCLUDEPATH instead. + make /usr/lib64/qt4/bin/uic src/applications/gqrx/mainwindow.ui -o ui_mainwindow.h /usr/lib64/qt4/bin/uic src/applications/gqrx/remote_control_settings.ui -o ui_remote_control_settings.h /usr/lib64/qt4/bin/uic src/qtgui/afsk1200win.ui -o ui_afsk1200win.h /usr/lib64/qt4/bin/uic src/qtgui/agc_options.ui -o ui_agc_options.h /usr/lib64/qt4/bin/uic src/qtgui/audio_options.ui -o ui_audio_options.h /usr/lib64/qt4/bin/uic src/qtgui/demod_options.ui -o ui_demod_options.h /usr/lib64/qt4/bin/uic src/qtgui/dockaudio.ui -o ui_dockaudio.h /usr/lib64/qt4/bin/uic src/qtgui/dockbookmarks.ui -o ui_dockbookmarks.h /usr/lib64/qt4/bin/uic src/qtgui/dockfft.ui -o ui_dockfft.h /usr/lib64/qt4/bin/uic src/qtgui/dockinputctl.ui -o ui_dockinputctl.h /usr/lib64/qt4/bin/uic src/qtgui/dockrds.ui -o ui_dockrds.h /usr/lib64/qt4/bin/uic src/qtgui/iq_tool.ui -o ui_iq_tool.h /usr/lib64/qt4/bin/uic src/qtgui/dockrxopt.ui -o ui_dockrxopt.h /usr/lib64/qt4/bin/uic src/qtgui/ioconfig.ui -o ui_ioconfig.h /usr/lib64/qt4/bin/uic src/qtgui/nb_options.ui -o ui_nb_options.h g++ -c -pipe -O3 -march=native -m64 -g -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DVERSION="\"\"" -DWITH_PULSEAUDIO -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../lib64/qt4/mkspecs/linux-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -Isrc -I. -I. -o main.o src/applications/gqrx/main.cpp g++ -c -pipe -O3 -march=native -m64 -g -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DVERSION="\"\"" -DWITH_PULSEAUDIO -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../lib64/qt4/mkspecs/linux-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -Isrc -I. -I. -o mainwindow.o src/applications/gqrx/mainwindow.cpp g++ -c -pipe -O3 -march=native -m64 -g -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DVERSION="\"\"" -DWITH_PULSEAUDIO -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../lib64/qt4/mkspecs/linux-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -Isrc -I. -I. -o receiver.o src/applications/gqrx/receiver.cpp g++ -c -pipe -O3 -march=native -m64 -g -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DVERSION="\"\"" -DWITH_PULSEAUDIO -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../lib64/qt4/mkspecs/linux-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -Isrc -I. -I. -o file_resources.o src/applications/gqrx/file_resources.cpp g++ -c -pipe -O3 -march=native -m64 -g -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DVERSION="\"\"" -DWITH_PULSEAUDIO -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../lib64/qt4/mkspecs/linux-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -Isrc -I. -I. -o remote_control.o src/applications/gqrx/remote_control.cpp . . .
[output truncated]
--
Qmake only generates the makefile, it does not invoke it. It is
somewhere in you packaging script that you have to override the
default with -j4.