Last Comment Bug 698213 - pymake chokes when the target is "./" (building using pymake on windows busted...)
: pymake chokes when the target is "./" (building using pymake on windows buste...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla10
Assigned To: Siddharth Agarwal [:sid0] (inactive)
:
: Gregory Szorc [:gps]
Mentors:
Depends on: 698255 698257
Blocks: 686464
  Show dependency treegraph
 
Reported: 2011-10-29 10:25 PDT by David :Bienvenu
Modified: 2011-11-02 06:15 PDT (History)
6 users (show)
sid.bugzilla: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
hack (526 bytes, patch)
2011-10-30 00:23 PDT, Siddharth Agarwal [:sid0] (inactive)
no flags Details | Diff | Splinter Review
tentative fix (1.34 KB, patch)
2011-10-30 03:28 PDT, Siddharth Agarwal [:sid0] (inactive)
khuey: review+
Details | Diff | Splinter Review

Description David :Bienvenu 2011-10-29 10:25:14 PDT
fails in libutil, it looks like:

cd libutil; c:/mozilla-build/python/python.exe c:/builds/tbirdhg/mozilla/build/p
ymake/pymake/../make.py BUILD_DEBUG=optimize export
export_tier_platform
WARNING:pymake.data:httpserver XPI_NAME=
Traceback (most recent call last):
  File "c:/builds/tbirdhg/mozilla/build/pymake/make.py", line 18, in <module>
    pymake.process.ParallelContext.spin()
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\process.py", line 331, in
spin
    c.run()
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\process.py", line 261, in
run
    cb(*args, **kwargs)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 1171, in _c
b
    self.usercb(error=False)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 680, in _co
mmandcb
    self.commands.pop(0)(self._commandcb)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 1175, in __
call__
    process.call(self.cline, loc=self.loc, cb=self._cb, context=self.context, **
self.kwargs)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\process.py", line 86, in c
all
    cb(res=0)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 1171, in _c
b
    self.usercb(error=False)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 680, in _co
mmandcb
    self.commands.pop(0)(self._commandcb)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 1175, in __
call__
    process.call(self.cline, loc=self.loc, cb=self._cb, context=self.context, **
self.kwargs)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\process.py", line 95, in c
all
    command.main(argv[2:], env, cwd, cb)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\command.py", line 268, in
main
    _MakeContext(makeflags, makelevel, workdir, context, env, targets, options,
ostmts, overrides, cb)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\command.py", line 91, in _
_init__
    self.remakecb(True)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\command.py", line 121, in
remakecb
    self.makefile.include(f)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 1532, in in
clude
    stmts.execute(self, weak=weak)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\parserdata.py", line 502,
in execute
    s.execute(makefile, context)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\parserdata.py", line 147,
in execute
    makefile.gettarget(t.gettarget()).addrule(rule)
  File "c:\builds\tbirdhg\mozilla\build\pymake\pymake\data.py", line 1474, in ge
ttarget
    assert target != '', "empty target?"
AssertionError: empty target?
Comment 1 David :Bienvenu 2011-10-29 12:34:27 PDT
If I dump the targets before the check for empty target, the output looks like this:

evaluation from c:\builds\tbirdhg\mozilla\config\rules.mk:1382:42:3:0$ c:/builds
/tbirdhg/objdir-tb/mozilla/config/nsinstall.exe -m 644 ../../../../mozilla/ipc/t
estshell/TestShellChild.h ../../../../mozilla/ipc/testshell/TestShellParent.h ..
/../../../mozilla/ipc/testshell/XPCShellEnvironment.h ../../dist/include/mozilla
/ipc
make.py[6]: Leaving directory 'c:\builds\tbirdhg\objdir-tb\mozilla\ipc\testshell
'
make.py[6]: Entering directory 'c:\builds\tbirdhg\objdir-tb\mozilla\ipc\app'
target = ../../config/autoconf.mk
target = ../../../../mozilla/ipc/app/defs.mk
target = plugin-container.exe
target =
Traceback (most recent call last):
  File "c:/builds/tbirdhg/mozilla/build/pymake/make.py", line 18, in <module>
    pymake.process.ParallelContext.spin()
Comment 2 David :Bienvenu 2011-10-29 12:46:34 PDT
fwiw, commenting out the empty target assertion allows the build to go on...

        """assert target != '', "empty target?" """

not sure if it finishes yet, though.
Comment 3 David :Bienvenu 2011-10-29 14:58:06 PDT
Thunderbird build finishes fine w/ that line commented out.
Comment 4 Siddharth Agarwal [:sid0] (inactive) 2011-10-30 00:16:50 PDT
The failure's actually in

make.py[6]: Entering directory 'c:\Users\Sid\mozilla\tb-trunk-opt\mozilla\ipc\app'

Looking into it.
Comment 5 Siddharth Agarwal [:sid0] (inactive) 2011-10-30 00:23:33 PDT
Created attachment 570530 [details] [diff] [review]
hack

This fixes it, so I'm guessing this is a bug in pymake.
Comment 6 Siddharth Agarwal [:sid0] (inactive) 2011-10-30 00:32:50 PDT
Comment on attachment 570530 [details] [diff] [review]
hack

yeah nevermind, forgot the $() around the variable. Adding them doesn't help matters unfortunately.
Comment 7 Siddharth Agarwal [:sid0] (inactive) 2011-10-30 03:28:44 PDT
Created attachment 570536 [details] [diff] [review]
tentative fix

I'm not sure this fix is what we want, but what it does is change the behaviour of stripdotslash to return "." if the input string is "./".

I've added a couple of tests which seem to make sense. Both the dependent patches need to be applied first.
Comment 8 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-10-31 05:28:46 PDT
Comment on attachment 570536 [details] [diff] [review]
tentative fix

Review of attachment 570536 [details] [diff] [review]:
-----------------------------------------------------------------

This seems reasonable enough
Comment 9 Siddharth Agarwal [:sid0] (inactive) 2011-10-31 05:43:39 PDT
Comment on attachment 570536 [details] [diff] [review]
tentative fix

http://hg.mozilla.org/users/bsmedberg_mozilla.com/pymake/rev/a53100d69b06
Comment 10 Siddharth Agarwal [:sid0] (inactive) 2011-11-02 06:14:56 PDT
Fixed with https://hg.mozilla.org/mozilla-central/rev/d13cb5295a37.

Note You need to log in before you can comment on or make changes to this bug.