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

Fails to build library projects for Android on windows

    XMLWordPrintable

Details

    • Android
    • 57eed823e412d587e051bff0d4775f08024d4169

    Description

      I build a library. The generated Makefile contains:

      DESTDIR       = ..\..\lib\arm7\#avoid trailing-slash linebreak
      TARGET        = libcryptoppd.a
      
      ...
      
      ..\..\lib\arm7\$(TARGET):  $(OBJECTS) $(OBJCOMP) 
      	@if not exist ..\..\lib\arm7\ mkdir ..\..\lib\arm7\ & if not exist ..\..\lib\arm7\ exit 1
      	-$(DEL_FILE) $(TARGET)
      	$(AR) $(TARGET) $(OBJECTS)
      	$(RANLIB) $(TARGET)
      	-$(DEL_FILE) ..\..\lib\arm7\$(TARGET)
      	-$(MOVE) $(TARGET) ..\..\lib\arm7\ 
      

      Everything works fine, until the MOVE that fails (file not found), or in more detail:

      process_begin: CreateProcess(NULL, move libcryptoppd.a "..\..\lib\arm7 ", ...) failed.
      make (e=2): The system cannot find the file specified.

      Note:

      • If you type the move command in a console, it works.
      • It is broken either with QtCreator, or with command-line make.exe invocation

      Writting the Makefile that way works:

      DESTDIR       = ..\..\lib\arm7
      ...
      $(DESTDIR)\$(TARGET):  $(OBJECTS) $(OBJCOMP) 
      	@if not exist "$(DESTDIR)" mkdir "$(DESTDIR)" & if not exist "$(DESTDIR)" exit 1
      	-$(DEL_FILE) "$(TARGET)"
      	$(AR) "$(TARGET)" $(OBJECTS)
      	$(RANLIB) "$(TARGET)"
      	-$(DEL_FILE) "$(DESTDIR)\$(TARGET)"
      	-$(MOVE) "$(TARGET)" "$(DESTDIR)"
      

      Note:

      • The # trick on the DESTDIR definition DOES NOT WORK, as any substitution will indeed include the comment in it !
      • The "$(DESTDIR)" and "$(TARGET)" both need to be quoted, or they will broke if there is space in TARGET or the the destination path...

      Hope this helps make Qt5.2 the great dev toll it desserve.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-35713
          # Subject Branch Project Status CR V

          Activity

            People

              jbornema Joerg Bornemann
              jeando JD Gascuel
              Votes:
              6 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes