Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.1.1
-
None
-
Fedora 19 x86_64
-
119cb65017680fcf5b480fedd516256196b7d78e
Description
If I use CONFIG += compile_libtool, libtool --silent --mode=link gets added to the final command twice.
Here's a simple .pro file:
TEMPLATE = lib TARGET = QMakeTest CONFIG += compile_libtool SOURCES += Test.cpp
With example Test.cpp file:
#include <iostream> int main() { std::cout << "Test" << std::endl; return 0; }
And I get output like this:
$ qmake . $ make libtool --silent --mode=compile g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_GUI_LIB -DQT_CORE_LIB -I../qt5/qtbase/mkspecs/linux-g++ -I. -I../qt5/qtbase/include -I../qt5/qtbase/include/QtGui -I../qt5/qtbase/include/QtCore -I. -o Test.lo Test.cpp libtool --silent --mode=link libtool --silent --mode=link g++ -version-info 10:0:0 -rpath /home/blong/workspace/qmaketest -Wl,-rpath,/home/blong/workspace/qt5/qtbase/lib -shared -o libQMakeTest.la Test.lo -L/home/blong/workspace/qt5/qtbase/lib -lQt5Gui -lQt5Core -lGL -lpthread -version-info 10:0:0 -rpath /home/blong/workspace/qmaketest libtool: link: unable to infer tagged configuration libtool: link: specify a tag with `--tag' make: *** [libQMakeTest.la] Error 1
I tried looking through unixmake.cpp and unixmake2.cpp, but I can't figure out why it's doing this. The Makefile is pretty obvious though:
LINK = $(LIBTOOL) --mode=link g++ -version-info 10:0:0 -rpath /home/blong/workspace/qmaketest # snip $(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) $(LIBTOOL) --mode=link $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) -version-info 10:0:0 -rpath /home/blong/workspace/qmaketest
So $(LIBTOOL) is added to $(LINK) and then we run $(LIBTOOL) $(LINK)..
I tried this with a git checkout (dd9853b3cb6c7f8d1f015b82a06283b3942bf9bf from August 7th) and the version that comes with Fedora (QMake version 3.0 Using Qt version 5.1.1 in /usr/lib64 ; yum says Version 5.1.1).