Closed Bug 1367847 Opened 7 years ago Closed 7 years ago

MinGW Build fails when trying to create uninstaller

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

(Blocks 1 open bug)

Details

(Whiteboard: [tor])

Attachments

(1 file)

At the end of a successful build and link on MinGW, the following error is encountered.

> 25:31.75 cp: cannot stat 'instgen/helper.exe': No such file or directory
> 25:31.76 /home/tom/Documents/moz/mingw-work/OSPreferences/toolkit/mozapps/installer/windows/nsis/makensis.mk:89: recipe for target 'uninstaller' failed
> 25:31.76 make[6]: *** [uninstaller] Error 1
> 25:31.76 Makefile:20: recipe for target 'libs' failed
> 25:31.76 make[5]: *** [libs] Error 2
> 25:31.76 /home/tom/Documents/moz/mingw-work/OSPreferences/config/recurse.mk:100: recipe for target 'browser/libs' failed
> 25:31.76 make[4]: *** [browser/libs] Error 2
> 25:31.76 /home/tom/Documents/moz/mingw-work/OSPreferences/config/recurse.mk:32: recipe for target 'libs' failed
> 25:31.76 make[3]: *** [libs] Error 2
> 25:31.76 /home/tom/Documents/moz/mingw-work/OSPreferences/config/rules.mk:519: recipe for target 'default' failed
> 25:31.76 make[2]: *** [default] Error 2
> 25:31.76 /home/tom/Documents/moz/mingw-work/OSPreferences/client.mk:419: recipe for target 'realbuild' failed
> 25:31.76 make[1]: *** [realbuild] Error 2
> 25:31.76 client.mk:170: recipe for target 'build' failed
> 25:31.76 make: *** [build] Error 2
> 25:31.80 0 compiler warnings present.
> 25:31.88 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Build failed
The attached patch fixes the issue, by requiring nsis for the mingw build.

I set up nsis with the following (as nsis 3+ isn't in Debian/Ubuntu):

> wget http://nsis.sourceforge.net/mediawiki/images/c/ca/Zlib-1.2.7-win32-x86.zip
> mkdir zlib-1.2.7-dll/
> mv Zlib-1.2.7-win32-x86.zip zlib-1.2.7-dll
> cd zlib-1.2.7-dll
> unzip Zlib-1.2.7-win32-x86.zip
> cd ..

> wget https://downloads.sourceforge.net/project/nsis/NSIS%203/3.01/nsis-3.01-src.tar.bz2
> bunzip2 nsis-3.01-src.tar.bz2
> tar xf nsis-3.01-src.tar
> cd nsis-3.01-src
> # I don't know how to make the version work with the environment variables/config flags the way the author appears to
> sed -i "s/'VERSION', 'Version of NSIS', cvs_version/'VERSION', 'Version of NSIS', '3.01'/" SConstruct
> scons XGCC_W32_PREFIX=i686-w64-mingw32- ZLIB_W32=../zlib-1.2.7-dll SKIPUTILS="NSIS Menu" install
> cd ..

It also required

> apt-get install scons libwxbase3.0-dev upx
Summary: MinGW Build fails when trying to create installer → MinGW Build fails when trying to create uninstaller
Note that with this patch `./mach build installer` creates a setup .exe, but it doesn't run. It displays the extracting progress, and after it completes it displays the following errors:
https://imgur.com/a/G9MZF
https://imgur.com/a/knGpg
Attachment #8871371 - Flags: review?(mh+mozilla)
Comment on attachment 8871371 [details]
Bug 1367847 Support makensis on MinGW Linux for Windows builds

https://reviewboard.mozilla.org/r/142846/#review151042

::: moz.configure:322
(Diff revision 1)
>  def makensis_progs(target):
>      if target.kernel != 'WINNT':
>          return
>  
>      candidates = [
> +        'makensis',

This changes the order in which things are looked up on Windows too, because which.which actually adds .exe on its own.

::: moz.configure:364
(Diff revision 1)
>                                % nsis_min_version)
>  
>      return ver
>  
> -# And that makensis is 32-bit.
> -@depends_if(nsis)
> +# And that makensis is 32-bit (but only on Windows).
> +@depends_if(nsis, host)

You should be able to do something like 
@depends_if(nsis, when=depends(host)(lambda h: h.kernel == 'WINNT')

without touching the rest of the function.
Attachment #8871371 - Flags: review?(mh+mozilla)
Comment on attachment 8871371 [details]
Bug 1367847 Support makensis on MinGW Linux for Windows builds

https://reviewboard.mozilla.org/r/142846/#review151042

> This changes the order in which things are looked up on Windows too, because which.which actually adds .exe on its own.

Ah okay, in that case I will only move it above the .exe to let the specific versions keep their priority.
Comment on attachment 8871371 [details]
Bug 1367847 Support makensis on MinGW Linux for Windows builds

https://reviewboard.mozilla.org/r/142846/#review151042

> Ah okay, in that case I will only move it above the .exe to let the specific versions keep their priority.

Actually, removing all the .exe extensions should just work.
Comment on attachment 8871371 [details]
Bug 1367847 Support makensis on MinGW Linux for Windows builds

https://reviewboard.mozilla.org/r/142846/#review151066

::: commit-message-f7adb:4
(Diff revision 3)
> +- Move makensis above makensis.exe because on Linux, nsis also
> +  builds makensis.exe which isn't going to run

You need to update this.

::: moz.configure:374
(Diff revision 3)
>  
>      return 'yes'
>  
> +# And any flags we have to give to makensis
> +@depends(host)
> +@checking('for NSIS flags')

Probably not worth adding a @checking.
Attachment #8871371 - Flags: review?(mh+mozilla) → review+
Hi Tom,

seems this has one open issue in mozreview that need to be fixed first before we can use autoland.
Flags: needinfo?(tom)
Keywords: checkin-needed
Sorry I thought I had marked them all.
Flags: needinfo?(tom)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/352b0d009f78
Support makensis on MinGW Linux for Windows builds r=glandium
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/352b0d009f78
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: