Open
Bug 1238908
Opened 10 years ago
Updated 3 years ago
Artifact build fails on Windows 10 with "You are targeting 64-bit but using the 32-bit compiler"
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: pbro, Unassigned)
Details
Attachments
(2 files)
I wanted to give artifact build a try today, so I followed the doc at:
https://developer.mozilla.org/en-US/docs/Artifact_builds
I added
ac_add_options --enable-artifact-builds
mk_add_options MOZ_OBJDIR=./objdir-frontend
to mozconfig
Ran
./mach mercurial-setup
Added the hg extension
mozext = \my\path\to\.mozbuild\version-control-tools\hgext\mozext
And ran
hg pushlogsync
After this, running ./mach build produced the following error:
configure: error: You are targeting 64-bit but using the 32-bit compiler.
I'll attach the full build log for more info, as well as my .mozconfig file.
| Reporter | ||
Comment 1•10 years ago
|
||
| Reporter | ||
Comment 2•10 years ago
|
||
For info, I'm using the latest version of the mozilla-build tools for windows (downloaded yesterday), and start the shell with start-shell-msvc2013-x64.bat.
| Reporter | ||
Updated•10 years ago
|
OS: Unspecified → Windows 10
Comment 3•10 years ago
|
||
(In reply to Patrick Brosset [:pbrosset] [:pbro] from comment #2)
> For info, I'm using the latest version of the mozilla-build tools for
> windows (downloaded yesterday), and start the shell with
> start-shell-msvc2013-x64.bat.
Hi Patrick,
I think you're seeing the intersection of three things:
1) mozconfig options that may not make sense with artifact builds (I don't really know);
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
2) not having a way to specify 32 or 64 bit binaries are wanted.
3) having a toolchain specified, when it isn't *really* used, but is being *partially* used.
Part 3) should get better when we land Bug 1237502.
Part 2) is a known issue: you can see the TODO here: https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/mach_commands.py#1477. I don't know how to finish this intent from the mozconfig *when there is no toolchain*; we may have to grow something, like ~/.hgrc but for mach or artifact builds.
Part 1) is trickier. In general, artifact builds only work when you're building something exactly the same as we do in automation. It appears that you want "win64" from https://tools.taskcluster.net/index/artifacts/#buildbot.branches.mozilla-central/buildbot.branches.mozilla-central.win64, and it's already supported.
Can you try removing the two host/target lines from your mozconfig, and then running:
mach clobber
mach build
mach artifact install --job=win64
mach run
Flags: needinfo?(pbrosset)
Comment 4•10 years ago
|
||
There's a fourth thing: the check that is barfing relies on HAVE_64BIT_BUILD, which depends on a compilation test, so on a toolchain. The check should be ignored with --disable-compile-environment.
| Reporter | ||
Comment 5•10 years ago
|
||
Gijs had also suggested on IRC that I remove
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
So I did that and building worked.
Should we keep this bug opened?
Flags: needinfo?(pbrosset)
Comment 6•10 years ago
|
||
I would personally like people to be able to opt into 64-bit windows builds. The trivial artifact support for win64 is there, the problem is just how to decide that people get it. Could probably reuse the target variable. Either way, the build should probably not break the way it does right now even if these things are in your mozconfig, so let's keep it open.
Comment 7•10 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #6)
> I would personally like people to be able to opt into 64-bit windows builds.
> The trivial artifact support for win64 is there, the problem is just how to
> decide that people get it. Could probably reuse the target variable. Either
> way, the build should probably not break the way it does right now even if
> these things are in your mozconfig, so let's keep it open.
Absolutely agree. I'm not sure the existing --target or --host options make sense since those are very much tied to the compile environment processing. I want to grow a ~/.machrc for setting the default switches for |mach artifact|. That'll handle things like temporarily overriding paths (to fetch from try builds) and temporarily disabling artifacts (when you have no network connection) better than mozconfig options.
Comment 8•10 years ago
|
||
Fundamentally all --target does is set $target in configure, so using that doesn't seem terribly unreasonable, unless you really want artifact builds to work without a mozconfig in this case.
Comment 9•10 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #8)
> Fundamentally all --target does is set $target in configure, so using that
> doesn't seem terribly unreasonable, unless you really want artifact builds
> to work without a mozconfig in this case.
Then I'd be happy to interrogate --target in |mach artifact| and use it if we can. There's no way to opt-in to --disable-compile-environment without a mozconfig; and we expect to have --enable-artifact-builds, so there's no desire to work without a mozconfig.
Comment 10•10 years ago
|
||
:jgilbert hit this today. Since bug 1243041 we're actually checking target_cpu and finding automation jobs based on it, but configure still fails in this way, so comment 4 is the remaining bug here and probably quite actionable.
Updated•8 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•