Closed Bug 698213 Opened 10 years ago Closed 10 years ago

pymake chokes when the target is "./" (building using pymake on windows busted...)

Categories

(Firefox Build System :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla10

People

(Reporter: Bienvenu, Assigned: rain1)

References

Details

Attachments

(1 file, 1 obsolete file)

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?
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()
fwiw, commenting out the empty target assertion allows the build to go on...

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

not sure if it finishes yet, though.
Thunderbird build finishes fine w/ that line commented out.
The failure's actually in

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

Looking into it.
Attached patch hack (obsolete) — Splinter Review
This fixes it, so I'm guessing this is a bug in pymake.
Comment on attachment 570530 [details] [diff] [review]
hack

yeah nevermind, forgot the $() around the variable. Adding them doesn't help matters unfortunately.
Attachment #570530 - Attachment is obsolete: true
Blocks: 686464
Depends on: 698255
Depends on: 698257
Summary: building using pymake on windows busted... → pymake chokes when the target is "./" (building using pymake on windows busted...)
Attached patch tentative fixSplinter Review
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.
Assignee: nobody → sagarwal
Status: NEW → ASSIGNED
Attachment #570536 - Flags: review?(ted.mielczarek)
Attachment #570536 - Flags: review?(khuey)
Comment on attachment 570536 [details] [diff] [review]
tentative fix

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

This seems reasonable enough
Attachment #570536 - Flags: review?(khuey) → review+
Fixed with https://hg.mozilla.org/mozilla-central/rev/d13cb5295a37.
Flags: in-testsuite+
Target Milestone: --- → mozilla10
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.