Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-18230

qmake generates Makefile that puts nonexistent directories in INCPATH, LIBS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.2
    • Build tools: qmake
    • None
    • Ubuntu 10.04, 64-bit
      g++ 4.4.3

      The default QtGui application, "test" fails to compile (Makefile below). My home directory, into which Qt and QtCreator are installed, is /home/matt. QtCreator is in ~/qtcreator-2.1.0 and Qt is in ~/qt-everywhere-opensource-src-4.7.2. See INCPATH and LIBS; ~/include and ~/lib don't exist. There is ~/bin but moc and uic are not installed into it.

      Matt

      #############################################################################
      # Makefile for building: test
      # Generated by qmake (2.01a) (Qt 4.7.2) on: Sun Mar 20 00:35:18 2011
      # Project:  test.pro
      # Template: app
      # Command: /usr/local/Trolltech/Qt-4.7.2/bin/qmake -spec /usr/local/Trolltech/Qt-4.7.2/mkspecs/linux-g++-64 QMLJSDEBUGGER_PATH=/home/matt/qtcreator-2.1.0/share/qtcreator/qml/qmljsdebugger -o Makefile test.pro
      #############################################################################
      
      ####### Compiler, tools and options
      
      CC            = gcc
      CXX           = g++
      DEFINES       = -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX
      CFLAGS        = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
      CXXFLAGS      = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
      INCPATH       = -I/usr/local/Trolltech/Qt-4.7.2/mkspecs/linux-g++-64 -I. -I/home/matt/include/QtCore -I/home/matt/include/QtGui -I/home/matt/include -I.moc/release-shared -I.uic/release-shared
      LINK          = g++
      LFLAGS        = -Wl,-rpath-link,/home/matt/lib -m64 -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.7.1/lib
      LIBS          = $(SUBLIBS)  -L/home/matt/lib -lQtGui -lQtCore -lpthread 
      AR            = ar cqs
      RANLIB        = 
      QMAKE         = /usr/local/Trolltech/Qt-4.7.2/bin/qmake
      TAR           = tar -cf
      COMPRESS      = gzip -9f
      COPY          = cp -f
      SED           = sed
      COPY_FILE     = $(COPY)
      COPY_DIR      = $(COPY) -r
      STRIP         = strip
      INSTALL_FILE  = install -m 644 -p
      INSTALL_DIR   = $(COPY_DIR)
      INSTALL_PROGRAM = install -m 755 -p
      DEL_FILE      = rm -f
      SYMLINK       = ln -f -s
      DEL_DIR       = rmdir
      MOVE          = mv -f
      CHK_DIR_EXISTS= test -d
      MKDIR         = mkdir -p
      
      ####### Output directory
      
      OBJECTS_DIR   = .obj/release-shared/
      
      ####### Files
      
      SOURCES       = main.cpp \
      		mainwindow.cpp .moc/release-shared/moc_mainwindow.cpp
      OBJECTS       = .obj/release-shared/main.o \
      		.obj/release-shared/mainwindow.o \
      		.obj/release-shared/moc_mainwindow.o
      DIST          = /usr/local/Trolltech/Qt-4.7.2/mkspecs/common/g++.conf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/common/unix.conf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/common/linux.conf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/exclusive_builds.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/default_pre.prf \
      		../.qmake.cache \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt_functions.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt_config.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/release.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/default_post.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/dylib.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/largefile.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/dll.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/shared.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/warn_on.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/thread.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/moc.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/resources.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/uic.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/yacc.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/lex.prf \
      		test.pro
      QMAKE_TARGET  = test
      DESTDIR       = 
      TARGET        = test
      
      first: all
      ####### Implicit rules
      
      .SUFFIXES: .o .c .cpp .cc .cxx .C
      
      .cpp.o:
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
      
      .cc.o:
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
      
      .cxx.o:
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
      
      .C.o:
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
      
      .c.o:
      	$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
      
      ####### Build rules
      
      all: Makefile $(TARGET)
      
      $(TARGET): .uic/release-shared/ui_mainwindow.h $(OBJECTS)  
      	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
      
      Makefile: test.pro ../.qmake.cache /usr/local/Trolltech/Qt-4.7.2/mkspecs/linux-g++-64/qmake.conf /usr/local/Trolltech/Qt-4.7.2/mkspecs/common/g++.conf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/common/unix.conf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/common/linux.conf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/exclusive_builds.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/default_pre.prf \
      		../.qmake.cache \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt_functions.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt_config.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/release.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/default_post.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/dylib.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/largefile.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/dll.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/shared.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/warn_on.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/thread.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/moc.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/resources.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/uic.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/yacc.prf \
      		/usr/local/Trolltech/Qt-4.7.2/mkspecs/features/lex.prf
      	$(QMAKE) -spec /usr/local/Trolltech/Qt-4.7.2/mkspecs/linux-g++-64 QMLJSDEBUGGER_PATH=/home/matt/qtcreator-2.1.0/share/qtcreator/qml/qmljsdebugger -o Makefile test.pro
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/common/g++.conf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/common/unix.conf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/common/linux.conf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/exclusive_builds.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/default_pre.prf:
      ../.qmake.cache:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt_functions.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt_config.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/release.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/default_post.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/dylib.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/largefile.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/dll.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/shared.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/warn_on.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/qt.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/unix/thread.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/moc.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/resources.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/uic.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/yacc.prf:
      /usr/local/Trolltech/Qt-4.7.2/mkspecs/features/lex.prf:
      qmake:  FORCE
      	@$(QMAKE) -spec /usr/local/Trolltech/Qt-4.7.2/mkspecs/linux-g++-64 QMLJSDEBUGGER_PATH=/home/matt/qtcreator-2.1.0/share/qtcreator/qml/qmljsdebugger -o Makefile test.pro
      
      dist: 
      	@$(CHK_DIR_EXISTS) .obj/release-shared/test1.0.0 || $(MKDIR) .obj/release-shared/test1.0.0 
      	$(COPY_FILE) --parents $(SOURCES) $(DIST) .obj/release-shared/test1.0.0/ && $(COPY_FILE) --parents mainwindow.h .obj/release-shared/test1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp .obj/release-shared/test1.0.0/ && $(COPY_FILE) --parents mainwindow.ui .obj/release-shared/test1.0.0/ && (cd `dirname .obj/release-shared/test1.0.0` && $(TAR) test1.0.0.tar test1.0.0 && $(COMPRESS) test1.0.0.tar) && $(MOVE) `dirname .obj/release-shared/test1.0.0`/test1.0.0.tar.gz . && $(DEL_FILE) -r .obj/release-shared/test1.0.0
      
      
      clean:compiler_clean 
      	-$(DEL_FILE) $(OBJECTS)
      	-$(DEL_FILE) *~ core *.core
      
      
      ####### Sub-libraries
      
      distclean: clean
      	-$(DEL_FILE) $(TARGET) 
      	-$(DEL_FILE) Makefile
      
      
      check: first
      
      /home/matt/bin/moc:
      	(cd /home/matt/src/moc && $(MAKE))
      
      mocclean: compiler_moc_header_clean compiler_moc_source_clean
      
      mocables: compiler_moc_header_make_all compiler_moc_source_make_all
      
      compiler_moc_header_make_all: .moc/release-shared/moc_mainwindow.cpp
      compiler_moc_header_clean:
      	-$(DEL_FILE) .moc/release-shared/moc_mainwindow.cpp
      .moc/release-shared/moc_mainwindow.cpp: mainwindow.h \
      		../bin/moc
      	/home/matt/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o .moc/release-shared/moc_mainwindow.cpp
      
      compiler_rcc_make_all:
      compiler_rcc_clean:
      compiler_image_collection_make_all: .uic/release-shared/qmake_image_collection.cpp
      compiler_image_collection_clean:
      	-$(DEL_FILE) .uic/release-shared/qmake_image_collection.cpp
      compiler_moc_source_make_all:
      compiler_moc_source_clean:
      compiler_uic_make_all: .uic/release-shared/ui_mainwindow.h
      compiler_uic_clean:
      	-$(DEL_FILE) .uic/release-shared/ui_mainwindow.h
      .uic/release-shared/ui_mainwindow.h: mainwindow.ui
      	/home/matt/bin/uic mainwindow.ui -o .uic/release-shared/ui_mainwindow.h
      
      compiler_yacc_decl_make_all:
      compiler_yacc_decl_clean:
      compiler_yacc_impl_make_all:
      compiler_yacc_impl_clean:
      compiler_lex_make_all:
      compiler_lex_clean:
      compiler_clean: compiler_moc_header_clean compiler_uic_clean 
      
      ####### Compile
      
      .obj/release-shared/main.o: main.cpp mainwindow.h
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/release-shared/main.o main.cpp
      
      .obj/release-shared/mainwindow.o: mainwindow.cpp mainwindow.h \
      		.uic/release-shared/ui_mainwindow.h
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/release-shared/mainwindow.o mainwindow.cpp
      
      .obj/release-shared/moc_mainwindow.o: .moc/release-shared/moc_mainwindow.cpp 
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/release-shared/moc_mainwindow.o .moc/release-shared/moc_mainwindow.cpp
      
      ####### Install
      
      install:   FORCE
      
      uninstall:   FORCE
      
      FORCE:
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            buddenha Oswald Buddenhagen
            mattphillips Matthew Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes