For some reason instead of using g++ specified in Netbeans toolchain for C++ qmake-qt5 uses clang and that breaks compilation if -lquadmath option is used for gcc. Qmake should always use the specified tools. Here is a build log under Fedora 19 Linux - notice use of g++ for linking <pre> cd '/home/user0/NetBeansProjects/MandelbrotQT' /usr/bin/gmake -f Makefile CONF=Debug QMAKE=/bin/qmake-qt5 "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE=/bin/qmake-qt5 SUBPROJECTS= .build-conf gmake[1]: Entering directory `/home/user0/NetBeansProjects/MandelbrotQT' /bin/qmake-qt5 VPATH=. -o qttmp-Debug.mk nbproject/qt-Debug.pro mv -f qttmp-Debug.mk nbproject/qt-Debug.mk "/usr/bin/gmake" -f nbproject/qt-Debug.mk dist/Debug/GNU-Linux/MandelbrotQT gmake[2]: Entering directory `/home/user0/NetBeansProjects/MandelbrotQT' /usr/lib64/qt5/bin/uic newForm.ui -o ui_newForm.h g++ -c -pipe -O3 -lquadmath -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_CONCURRENT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++ -Inbproject -isystem /usr/local/include/qt5/QtConcurrent -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I. -I. -o build/Debug/GNU-Linux/main.o main.cpp g++ -c -pipe -O3 -lquadmath -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_CONCURRENT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++ -Inbproject -isystem /usr/local/include/qt5/QtConcurrent -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I. -I. -o build/Debug/GNU-Linux/newForm.cpp.o newForm.cpp.cc newForm.cpp.cc:179:6: warning: unused parameter ‘pA’ [-Wunused-parameter] void newForm::handleRubberBandChanged(QRect r, QPointF pA, QPointF pB){ ^ newForm.cpp.cc:179:6: warning: unused parameter ‘pB’ [-Wunused-parameter] /usr/lib64/qt5/bin/moc -DQT_WIDGETS_LIB -DQT_CONCURRENT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++ -I/home/user0/NetBeansProjects/MandelbrotQT/nbproject -I/usr/local/include/qt5/QtConcurrent -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtConcurrent -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I/usr/include/c++/4.8.3 -I/usr/include/c++/4.8.3/x86_64-redhat-linux -I/usr/include/c++/4.8.3/backward -I/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include -I/usr/local/include -I/usr/include newForm.h -o moc_newForm.cpp g++ -c -pipe -O3 -lquadmath -g -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_CONCURRENT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++ -Inbproject -isystem /usr/local/include/qt5/QtConcurrent -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I. -I. -o build/Debug/GNU-Linux/moc_newForm.o moc_newForm.cpp g++ -o dist/Debug/GNU-Linux/MandelbrotQT build/Debug/GNU-Linux/main.o build/Debug/GNU-Linux/newForm.cpp.o build/Debug/GNU-Linux/moc_newForm.o -lQt5Widgets -lQt5Concurrent -lQt5Gui -lQt5Core -lGL -lpthread gmake[2]: Leaving directory `/home/user0/NetBeansProjects/MandelbrotQT' gmake[1]: Leaving directory `/home/user0/NetBeansProjects/MandelbrotQT' BUILD SUCCESSFUL (total time: 957ms) And here is the log from PCBSD - notice the use of clang for linking: cd '/usr/home/leo/NetBeansProjects/QtApplication_1' /usr/local/bin/gmake -f Makefile CONF=Debug QMAKE=/usr/local/lib/qt5/bin/qmake "/usr/local/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE=/usr/local/lib/qt5/bin/qmake SUBPROJECTS= .build-conf gmake[1]: Entering directory '/usr/home/leo/NetBeansProjects/QtApplication_1' /usr/local/lib/qt5/bin/qmake VPATH=. -o qttmp-Debug.mk nbproject/qt-Debug.pro mv -f qttmp-Debug.mk nbproject/qt-Debug.mk "/usr/local/bin/gmake" -f nbproject/qt-Debug.mk dist/Debug/GNU-Generic/QtApplication_1 gmake[2]: Entering directory '/usr/home/leo/NetBeansProjects/QtApplication_1' /usr/local/lib/qt5/bin/uic newForm.ui -o ui_newForm.h g++ -c -pipe -O3 -lquadmath -g -std=c++11 -Wall -W -pthread -D_THREAD_SAFE -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -Inbproject -I. -I../../../../local/include/qt5/QtConcurrent -I../../../../local/include/qt5 -I../../../../local/include/qt5/QtWidgets -I../../../../local/include/qt5/QtGui -I../../../../local/include/qt5/QtCore -I. -I../../../../local/include -I. -I../../../../local/include -I../../../../local/lib/qt5/mkspecs/freebsd-clang -o build/Debug/GNU-Generic/main.o main.cpp g++ -c -pipe -O3 -lquadmath -g -std=c++11 -Wall -W -pthread -D_THREAD_SAFE -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -Inbproject -I. -I../../../../local/include/qt5/QtConcurrent -I../../../../local/include/qt5 -I../../../../local/include/qt5/QtWidgets -I../../../../local/include/qt5/QtGui -I../../../../local/include/qt5/QtCore -I. -I../../../../local/include -I. -I../../../../local/include -I../../../../local/lib/qt5/mkspecs/freebsd-clang -o build/Debug/GNU-Generic/newForm.cpp.o newForm.cpp.cc newForm.cpp.cc:191:6: warning: unused parameter 'pA' [-Wunused-parameter] void newForm::handleRubberBandChanged(QRect r, QPointF pA, QPointF pB){ ^ newForm.cpp.cc:191:6: warning: unused parameter 'pB' [-Wunused-parameter] /usr/local/lib/qt5/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I/usr/local/lib/qt5/mkspecs/freebsd-clang -I/usr/home/leo/NetBeansProjects/QtApplication_1/nbproject -I/usr/local/include/qt5/QtConcurrent -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtWidgets -I/usr/local/include/qt5/QtGui -I/usr/local/include/qt5/QtCore -I. -I/usr/include/c++/v1 -I/usr/include/clang/3.4.1 -I/usr/include newForm.h -o moc_newForm.cpp g++ -c -pipe -O3 -lquadmath -g -std=c++11 -Wall -W -pthread -D_THREAD_SAFE -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -Inbproject -I. -I../../../../local/include/qt5/QtConcurrent -I../../../../local/include/qt5 -I../../../../local/include/qt5/QtWidgets -I../../../../local/include/qt5/QtGui -I../../../../local/include/qt5/QtCore -I. -I../../../../local/include -I. -I../../../../local/include -I../../../../local/lib/qt5/mkspecs/freebsd-clang -o build/Debug/GNU-Generic/moc_newForm.o moc_newForm.cpp clang++ -pthread -Wl,-rpath,/usr/local/lib -o dist/Debug/GNU-Generic/QtApplication_1 build/Debug/GNU-Generic/main.o build/Debug/GNU-Generic/newForm.cpp.o build/Debug/GNU-Generic/moc_newForm.o -L/usr/local/lib -lQt5Widgets -lQt5Gui -lQt5Concurrent -lQt5Core -lGL /usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information. build/Debug/GNU-Generic/newForm.cpp.o: In function `_ZN12QtConcurrent9MapKernelIPiZN7newForm18handleBtnCalculateEvEUlRiE_E12runIterationES1_iPv': newForm.cpp.cc:(.text+0x157): undefined reference to `__extenddftf2' newForm.cpp.cc:(.text+0x175): undefined reference to `__extenddftf2' newForm.cpp.cc:(.text+0x1a9): undefined reference to `__gttf2' newForm.cpp.cc:(.text+0x1c5): undefined reference to `__gttf2' newForm.cpp.cc:(.text+0x1e7): undefined reference to `__multf3' newForm.cpp.cc:(.text+0x202): undefined reference to `__multf3' newForm.cpp.cc:(.text+0x211): undefined reference to `__subtf3' newForm.cpp.cc:(.text+0x220): undefined reference to `__addtf3' newForm.cpp.cc:(.text+0x239): undefined reference to `__addtf3' newForm.cpp.cc:(.text+0x247): undefined reference to `__multf3' newForm.cpp.cc:(.text+0x256): undefined reference to `__addtf3' clang++: error: linker command failed with exit code 1 (use -v to see invocation) nbproject/qt-Debug.mk:224: recipe for target 'dist/Debug/GNU-Generic/QtApplication_1' failed gmake[2]: *** [dist/Debug/GNU-Generic/QtApplication_1] Error 1 gmake[2]: Leaving directory '/usr/home/leo/NetBeansProjects/QtApplication_1' nbproject/Makefile-Debug.mk:65: recipe for target '.build-conf' failed gmake[1]: *** [.build-conf] Error 2 gmake[1]: Leaving directory '/usr/home/leo/NetBeansProjects/QtApplication_1' nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed gmake: *** [.build-impl] Error 2 </pre>
Created attachment 169326 [details] qt-Debug.mk Apparently the attached file, generated by qmake-qt5, contains link command that uses clang instead of gcc/g++ specified in Netbeans C++ tool chain: LINK = clang++ LFLAGS = -pthread -Wl,-rpath,/usr/local/lib For some reason FreeBSD port of Qt5 has qmake that wants to use a different tool.
Additional info: After blowing away PCBSD 10.3 and installing FreeBSD 10.1 instead the bug is still there.
This will always be the case as long as you use a qt build on 10.x which uses clang by default, so qmake will be using the mkspecs for clang in any qt-related builds on 10.3. Can you specify your netbeans build environment setup how to reproduce the process until you use Qt5 ?
Feedback timeout?
Feedback timeout; if there's an underlying issue it is that Qt (qmake) uses the mkspecs to set up the toolchain, and the default toolchain is set when Qt is compiled. You can change toolchains for Qt by changing QMAKESPEC or passing -spec to qmake when it generates the makefile. However, that's independent of things like CC and CXX in the environment: right now, Qt5 knows about "clang" and "gcc" and none of the suffixed versions.
For GCC using architectures Qt/Qmake will now chose gcc${GCC_DEFAULT} -- if you need/want to use the same work around on a clang-architecture, you could fiddle a bit in qt-dist.mk to get the same fix. Please reopen if this is still important. mfg Tobias