Closed Bug 570477 Opened 14 years ago Closed 14 years ago

Add YASM 1.1.0 to MozillaBuild

Categories

(Firefox Build System :: MozillaBuild, task)

x86
Windows 7
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ted, Assigned: ted)

References

Details

We should add YASM to MozillaBuild so we can more easily build the WebM code without translating the assembly.
The current version of YASM (1.0.1) doesn't emit Win32 object files with correct safe structured exception handling code, see YASM bug: http://www.tortall.net/projects/yasm/ticket/139

We can't link object files produced by YASM on Windows with /SAFESEH until this bug in YASM is fixed, so there's not much point in adding YASM to MozillaBuild until YASM fixes its SafeSeh code... :(

Once YASM is fixed, we should definitely add it to MozillaBuild though.
Yuck, ok. We're not going to get it for MB 1.5 then. I guess our gross assembly translation will keep until we get it.
No longer blocks: 570473
Hi cpearce,
The day that we get yasm.exe (if that is what we want to get it) into MB are we going to have two different versions? one for x86 and another for x86-64?

From the work that we have done in bug 570882 it seems that yasm works for x86-64, is this a correct assumption?

Should I put yasm.exe in another location inside of MozillaBuild instead of msys/bin? moztools-x64/bin instead?

> To make the webm build to work for Windows 64-bit I had to:
> * wget http://www.tortall.net/projects/yasm/releases/vsyasm-1.0.1-win64.zip
> * unzip vsyasm-1.0.1-win64.zip
> * mv vsyasm.exe /d/mozilla-build/msys/bin/yasm.exe
(In reply to comment #3)
> Hi cpearce,
> The day that we get yasm.exe (if that is what we want to get it) into MB are we
> going to have two different versions? one for x86 and another for x86-64?

I don't have an x64 setup to test this, but as I understand it, 32bit yasm can still output x64 object files, so there's no need to ship both a 64bit and a 32bit yasm. I've not tested whether this actually works though.

> From the work that we have done in bug 570882 it seems that yasm works for
> x86-64, is this a correct assumption?

Looks like it.

> Should I put yasm.exe in another location inside of MozillaBuild instead of
> msys/bin? moztools-x64/bin instead?

If it turns out that we do need an x64 yasm for win64, we can put it in moztools-x64/bin, rename it to yasm64, detect it on win64 in configure and assign it to VPX_AS.
What's the status here? Should we hold off until yasm gets fixes for x86 compilation?
Hi Ted,
These are the steps that I followed:
* wget http://www.tortall.net/projects/yasm/releases/vsyasm-1.0.1-win64.zip
* unzip vsyasm-1.0.1-win64.zip
* mv vsyasm.exe /d/mozilla-build/msys/bin/yasm.exe

Probably the better place to have deployed it was moztools-x64/bin.

Chris would this be sufficient to release with MozillaBuild?
I'm told that the current build of YASM should support SAFESEH and so should be able to build libvpx on Win32 and Win64.  I'll try it out in a bit.
I just confirmed that yasm rev 2348 adds the SAFESEH bits automatically.

http://www.tortall.net/projects/yasm/snapshots/r2348/yasm-r2348.exe
You should make bug 583849 depend on a RelEng bug to deploy YASM to the build slaves, since that is one step further on from MozillaBuild having YASM installed. We may upgrade our MB 1.4 to add yasm, depending on when we take the 1.5 update.
(In reply to comment #9)
> You should make bug 583849 depend on a RelEng bug to deploy YASM to the build
> slaves, since that is one step further on from MozillaBuild having YASM
> installed.

Done: bug 583924
Changing subject to indicate that we want yasm v1.1.0
Summary: Add YASM to MozillaBuild → Add YASM 1.1.0 to MozillaBuild
I build libvpx using YASM 1.1.0, and it compiles and links (in libxul builds, --disable-libxul is broken ATM). Hooray! YASM's SafeSeh is fixed! I'll submit a patch so that we can use YASM for libvpx once we've got YASM1.1.0 on the mozilla win32 build machines.
(In reply to comment #12)
> I'll submit a patch so that we can use YASM for libvpx once we've got YASM1.1.0
> on the mozilla win32 build machines.

I already have one up in bug 583849 :)
I notice that there are different downloads for VS2010 on the YASM download site. Is that actually a different binary, or does it just have some extras for integration into the VS GUI?
Also, if I add the YASM Win32 version, will it be able to produce 64-bit code for the Win64 builds?
(In reply to comment #14)
> I notice that there are different downloads for VS2010 on the YASM download
> site. Is that actually a different binary, or does it just have some extras for
> integration into the VS GUI?

I believe it just has GUI extras.

(In reply to comment #15)
> Also, if I add the YASM Win32 version, will it be able to produce 64-bit code
> for the Win64 builds?

This was the setup I tested, and it wfm.
(In reply to comment #15)
> Also, if I add the YASM Win32 version, will it be able to produce 64-bit code
> for the Win64 builds?

Yes, Win32 YASM can output both 32bit and 64bit code.
(In reply to comment #17)
> Here's a test build that includes YASM:
> http://people.mozilla.com/~tmielczarek/MozillaBuildSetup1.5.1pre.exe

This package includes vsyasm.exe, rather than yasm.exe.  I think the regular yasm.exe should work (that's what I've been using), with the upside that it has the same name as the binary on other platforms.
Oh, bah, after all that I downloaded the wrong one. I'll fix and spin another build...
Assignee: nobody → ted.mielczarek
Status: NEW → ASSIGNED
Uploading now, it's going to take a while:
http://people.mozilla.com/~tmielczarek/MozillaBuildSetup1.5.1.exe
 (81727286 bytes in size when it's finished)
Tested this locally on 64-bit Windows 7 building a 32-bit FF and it seems to work fine.
Pushed the change:
http://hg.mozilla.org/mozilla-build/rev/23ee4c6f7d10
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Depends on: 599570
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.