Opened 10 years ago

Closed 10 years ago

#58 closed defect (wontfix)

make will not create certain modules because of a trailing backslash

Reported by: rudi Owned by:
Priority: major Milestone: Qt Beta 2
Component: qmake Version: 4.5.1 Beta 1
Severity: Keywords:
Cc:

Description

Using GNU Make 3.81 r2 certain libraries cannot be built using the makefiles created by QMAKE. Error message looks like this:

E:\Qt\4.5.1-os2-beta1\src\testlib>make -f Makefile.Debug
make: *** No rule to make target `..\..\lib\QtTestd4.lib\',
needed by `..\..\lib\QtTestd4.dll'.  Stop.

As you can see, there is a trailing backslash appended to the target. The problem seems to be known as it is mentioned in:

qmake\generators\win32\winmakefile.cpp, line 638

My fix was to change winmakefile.cpp and gnumake.cpp to add an empty comment to the following items:

TARGET
DESTDIR_TARGET
DEF_FILE
RES_FILE
RC_FILE
TARGET_IMPLIB

Not sure if all of them are neccessary, but here it was required to get the stuff built.

Change History (9)

comment:1 Changed 10 years ago by diver

  • Milestone set to Qt GA

with which svn rev did you get the above error? with svn rev >= 153 or with the original beta1?

comment:2 Changed 10 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

I suppose you tried the .zip file. The problem you described was fixed in SVN, r153. So if you take the latest SVN tree it will build fine. I will reupload a new .zip soon.

comment:3 Changed 10 years ago by rudi

Yes, I tried the ZIP file. May give the SVN version a shot this weekend...

comment:4 Changed 10 years ago by dmik

OK, please. Feel free to reopen this ticket if the problem still exists on your side.

comment:5 Changed 10 years ago by rudi

With the SVN version the problem is gone. Thx. BTW, was it a carriage return/line feed thing ?

comment:6 Changed 10 years ago by dmik

Great.

What carriage return/line feed thing?

comment:7 Changed 10 years ago by diver

  • Milestone changed from Qt GA to Qt Beta2

comment:8 Changed 10 years ago by Tellie

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi,
I build today a certain apps, but it stops here with:

emxomfar r release\database.lib @release\OBJECTS.database.Release.rsp
Creating library file `release\database.lib'
make.exe[3]: Leaving directory `U:/chessx/src/database'
make.exe[2]: Leaving directory `U:/chessx/src/database'
cd gui && u:\qt-4.5.1\bin\qmake.exe gui.pro -os2 -o Makefile
cd gui && make.exe -f Makefile
make.exe[2]: Entering directory `U:/chessx/src/gui'
make.exe -f Makefile.Release
make.exe[3]: Entering directory `U:/chessx/src/gui'
make.exe[3]: * No rule to make target ..\database\libdatabase.a', needed by ..\bin\chessx.exe'. Stop.
make.exe[3]: Leaving directory `U:/chessx/src/gui'
make.exe[2]:
* [release] Error 2
make.exe[2]: Leaving directory `U:/chessx/src/gui'
make.exe[1]: * [sub-gui-make_default-ordered] Error 2
make.exe[1]: Leaving directory `U:/chessx/src'
make:
* [sub-src-make_default] Error 2

I thought it's the same error like this one.
I use beta2

comment:9 Changed 10 years ago by dmik

  • Resolution set to wontfix
  • Status changed from reopened to closed

It clearly says:

make.exe[3]: *** No rule to make target ..\database\libdatabase.a'

My guess is that the gui.pro file refers to the library in a non-portable way (something like LIBS += -llibdatabase.a) instead of just LIBS += -ldatabase...

Yes, according to http://chessx.svn.sourceforge.net/viewvc/chessx/trunk/src/gui/gui.pro?view=markup, it's the case. So, isn't our bug.

Their problem is that they want PRE_TARGETDEPS (to get '* No rule to make target...' from makr instead of 'Cannot find library...' from the linker if the build order is broken) and PRE_TARGETDEPS needs a full path which differs depending on the platform.

Just craete an os2 section similar to win32 (don't forget to replace .a with .lib).

Note: See TracTickets for help on using tickets.