Closed Bug 1074711 Opened 10 years ago Closed 10 years ago

mach configure calls unsupported MSYS make instead of mozmake [error processing mozbuild file: illegal file access outside of the top source directory: /..\{suite|mail}/app.mozbuild]

Categories

(MailNews Core :: Build Config, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(thunderbird36 fixed)

RESOLVED FIXED
Thunderbird 36.0
Tracking Status
thunderbird36 --- fixed

People

(Reporter: ssitter, Assigned: jcranmer)

References

Details

Attachments

(1 file, 1 obsolete file)

After updating comm-central to d9ef713a866e and mozilla-central to 7c24470b6b3a and running mach clobber I now get the following error when running mach configure:

> ==============================
> ERROR PROCESSING MOZBUILD FILE
> ==============================
> 
> The error occurred while processing the following file:
> 
>     d:/dev/comm-central/src/mozilla/moz.build
> 
> The underlying problem is an illegal file access. This is likely due to trying to access a file outside of the top source directory.
> 
> The path whose access was denied is:
> 
>     /..\mail/app.mozbuild
> 
> Modify the script to not access this file and try again.
mach configure succeeds after reverting the changes from https://hg.mozilla.org/comm-central/rev/d9ef713a866e - caused by Bug 1074034.
Blocks: 1074034
This is my mozconfig:
ac_add_options --enable-application=mail
ac_add_options --enable-calendar
ac_add_options --enable-debug
Can you be more specific about which patch? There are three of them.
As mentioned above I undid https://hg.mozilla.org/comm-central/rev/d9ef713a866e, i.e. "Bug 1074034, part 3: Use mozilla-central's baseconfig.mk instead of forking it".
No longer blocks: 1074034
Depends on: 1074034
OK, problem seems that after the update mach calls make instead of mozmake:

> $ ./mozilla/mach configure
> 0:00.55 C:\mozilla-build\msys\local\bin\make.EXE -f client.mk -s configure

If I manually run
> c:/mozilla-build/mozmake/mozmake.EXE -f client.mk -s configure

it succeeds.

Any idea why Bug 1074034 patch 3 breaks mach? Is there a special mozconfig flag or environment variable that I have to set now?
(In reply to Stefan Sitter from comment #5)
> OK, problem seems that after the update mach calls make instead of mozmake:
> 
> > $ ./mozilla/mach configure
> > 0:00.55 C:\mozilla-build\msys\local\bin\make.EXE -f client.mk -s configure
> 
> If I manually run
> > c:/mozilla-build/mozmake/mozmake.EXE -f client.mk -s configure
> 
> it succeeds.
> 
> Any idea why Bug 1074034 patch 3 breaks mach? Is there a special mozconfig
> flag or environment variable that I have to set now?

I suspect the logic that mach uses to decide whether or not it should use mozmake is broken, but I don't know what that logic is. CC'ing gps and/or glandium for more info.
I think I found the answer to my question why this error doesn't show up on the official build servers. According to the logs the servers call pymake instead of mach. But pymake will be replaced by mozmake on the build servers:
http://mxr.mozilla.org/comm-central/source/build/pymake/make.py#24
http://mxr.mozilla.org/comm-central/source/mozilla/build/pymake/make.py#16

I assume that when running mach I end up in
http://mxr.mozilla.org/comm-central/source/mozilla/python/mozbuild/mozbuild/base.py#516
that prefers make before mozmake?
(In reply to Stefan Sitter from comment #7)
> I think I found the answer to my question why this error doesn't show up on
> the official build servers. According to the logs the servers call pymake
> instead of mach. But pymake will be replaced by mozmake on the build servers:
> http://mxr.mozilla.org/comm-central/source/build/pymake/make.py#24
> http://mxr.mozilla.org/comm-central/source/mozilla/build/pymake/make.py#16
> 
> I assume that when running mach I end up in
> http://mxr.mozilla.org/comm-central/source/mozilla/python/mozbuild/mozbuild/
> base.py#516
> that prefers make before mozmake?

This is supposed to /try/ make before mozmake, but make should fail and be skipped. Can you figure why that's not the case?
(In reply to Mike Hommey [:glandium] from comment #8)
> This is supposed to /try/ make before mozmake, but make should fail and be
> skipped. Can you figure why that's not the case?

https://hg.mozilla.org/comm-central/rev/d9ef713a866e#l1.28 perhaps?
I have worked around the problem by creating the environment variable 'MAKE' and setting it to 'C:\mozilla-build\mozmake\mozmake.exe'.
(In reply to Joshua Cranmer [:jcranmer] from comment #9)
> https://hg.mozilla.org/comm-central/rev/d9ef713a866e#l1.28 perhaps?
Re-adding this fixes the issue:

ifeq ($(HOST_OS_ARCH),WINNT)
ifeq (,$(filter mozmake%,$(notdir $(MAKE))))
$(error Only building with pymake or mozmake is supported.)
endif
endif # WINNT
(In reply to Joshua Cranmer [:jcranmer] from comment #9)
> (In reply to Mike Hommey [:glandium] from comment #8)
> > This is supposed to /try/ make before mozmake, but make should fail and be
> > skipped. Can you figure why that's not the case?
> 
> https://hg.mozilla.org/comm-central/rev/d9ef713a866e#l1.28 perhaps?

Ah, the problem is that baseconfig.mk is included conditionally, and the condition is such that it's not included during the test from http://mxr.mozilla.org/comm-central/source/mozilla/python/mozbuild/mozbuild/base.py#516
But the test in base.py doesn't set topsrcdir, so it would either need a change, or baseconfig.mk needs to include the tests from m-c's baseconfig.mk (the test from comment 11, that used to be there, is not futureproof)
Summary: error processing mozbuild file: illegal file access outside of the top source directory: /..\mail/app.mozbuild → mach configure calls unsupported MSYS make instead of mozmake [error processing mozbuild file: illegal file access outside of the top source directory: /..\mail/app.mozbuild]
Product: Thunderbird → MailNews Core
Summary: mach configure calls unsupported MSYS make instead of mozmake [error processing mozbuild file: illegal file access outside of the top source directory: /..\mail/app.mozbuild] → mach configure calls unsupported MSYS make instead of mozmake [error processing mozbuild file: illegal file access outside of the top source directory: /..\{suite|mail}/app.mozbuild]
Attachment #8522666 - Flags: review?(mh+mozilla)
/r/625 - Bug 1074711 - Include m-c's baseconfig.mk check to use mozmake instead of gmake, r=glandium

Pull down this commit:

hg pull review -r 4f93bb8381166b85b73f765fc407a1da81200e89
Attachment #8522666 - Flags: review?(mh+mozilla) → feedback?(mh+mozilla)
Attachment #8522666 - Flags: review+
Attachment #8522666 - Flags: feedback?(mh+mozilla)
https://hg.mozilla.org/comm-central/rev/ae05d0416ab8
Assignee: nobody → Pidgeot18
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 36.0
Attachment #8522666 - Attachment is obsolete: true
Attachment #8618382 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: