x86_64-w64-mingw32-g++ -s -mwindows -Wl,--file-alignment,512 -Wl,-Map,build/release/Banner/Banner.map -static-libgcc -static-libstdc++ -Wl,-e_DllMain@12 -nostdlib -Wl,--exclude-libs,msvcrt.a -shared -o build/release/Banner/Banner.dll build/release/Banner/Banner.o -Lbuild/release/api/nsis -lpluginapi -lkernel32 -luser32 -Wl,--out-implib,build/release/Banner/libBanner.a -Wl,--output-def,build/release/Banner/Banner.def/var/tmp/dist/mingw-w64/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/bin/ld: warning: cannot find entry symbol _DllMain@12; defaulting to 000000006cf01000x86_64-w64-mingw32-g++ -o build/release/BgImage/BgImage.o -c -fgnu89-inline -Os -Wall -fno-strict-aliasing -DNSISCALL='__attribute__((__stdcall__))' -Ibuild/release/api Contrib/BgImage/BgImage.cppcc1plus: warning: command line option '-fgnu89-inline' is valid for C/ObjC but not for C++Contrib/BgImage/BgImage.cpp: In function 'void SetBg(HWND, int, char*, stack_t**, extra_parameters*)':Contrib/BgImage/BgImage.cpp:134:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (LPSTR)(DWORD)atomClass, ^Contrib/BgImage/BgImage.cpp:152:49: error: 'GWL_WNDPROC' was not declared in this scope oldProc = (void *)SetWindowLong(hwndParent, GWL_WNDPROC, (long)WndProc); ^Contrib/BgImage/BgImage.cpp:152:68: error: cast from 'LRESULT (*)(HWND, UINT, WPARAM, LPARAM) {aka long long int (*)(HWND__*, unsigned int, long long unsigned int, long long int)}' to 'long int' loses precision [-fpermissive] oldProc = (void *)SetWindowLong(hwndParent, GWL_WNDPROC, (long)WndProc); ^Contrib/BgImage/BgImage.cpp: In function 'void AddText(HWND, int, char*, stack_t**, extra_parameters*)':Contrib/BgImage/BgImage.cpp:296:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] newImg->hFont = (HFONT)myatoi(szTemp); ^Contrib/BgImage/BgImage.cpp: In function 'void Destroy(HWND, int, char*, stack_t**, extra_parameters*)':Contrib/BgImage/BgImage.cpp:348:31: error: 'GWL_WNDPROC' was not declared in this scope SetWindowLong(hwndParent, GWL_WNDPROC, (long)oldProc); ^Contrib/BgImage/BgImage.cpp:348:50: error: cast from 'void*' to 'long int' loses precision [-fpermissive] SetWindowLong(hwndParent, GWL_WNDPROC, (long)oldProc); ^Contrib/BgImage/BgImage.cpp: In function 'LRESULT WndProc(HWND, UINT, WPARAM, LPARAM)':Contrib/BgImage/BgImage.cpp:394:5: error: invalid conversion from 'long int (*)(HWND, unsigned int, unsigned int, long int) {aka long int (*)(HWND__*, unsigned int, unsigned int, long int)}' to 'WNDPROC {aka long long int (*)(HWND__*, unsigned int, long long unsigned int, long long int)}' [-fpermissive] ); ^In file included from /var/tmp/dist/mingw-w64/x86_64-w64-mingw32/include/windows.h:72:0, from Contrib/BgImage/BgImage.cpp:1:/var/tmp/dist/mingw-w64/x86_64-w64-mingw32/include/winuser.h:2092:29: note: initializing argument 1 of 'LRESULT CallWindowProcA(WNDPROC, HWND, UINT, WPARAM, LPARAM)' WINUSERAPI LRESULT WINAPI CallWindowProcA (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); ^scons: *** [build/release/BgImage/BgImage.o] Error 1scons: building terminated because of errors.
Actually this patch doesn't work as expected. This windows-x86_64: windows-i686 line only apply inside projects/nsis, but not on the dependencies, such as the compiler, so it will be using the 64bit mingw-w64.
So we should use the patch from bug_23561. Sorry for the confusion.
The tor-browser output filename is the same in both branches, so the result should be the same:
{{{
./rbm/rbm showconf tor-browser filename --target torbrowser-windows-i686 --target alpha
tor-browser-7.5a7-windows-i686-328442
}}}
I used --target torbrowser-windows-i686 instead of --target torbrowser-windows-x86_64 here. If I use --target torbrowser-windows-x86_64 then I get a different tor-browser filename in the 2 branches.
Alright, pushed the workaround to master (commit 51e32622701c743727d9903c67e38579c1bc7b8b). I leave this ticket open and on our radar for the right fix, though.
Trac: Parent: #20636 (moved)toN/A Status: needs_review to assigned Owner: boklm to tbb-team Keywords: TorBrowserTeam201711R deleted, TorBrowserTeam201711 added
sukhbir: once you are done with the Windows bundles for esr60, this would be a worthwhile bug spending your time on as we still need to workaround it which is annoying, see: #26363 (moved).
Bug 23561: Fix NSIS builds for Windows 64This commit adds support for building the 64-bit version of NSIS, andalso bumps the version to 3.03. Doing this enables us to build MAR filesin a 64-bit container for the 64-bit version of Tor Browser; see bug26363 and bug 24477.The pe_checksum_fix.py doesn't work in a 64-bit container with thebundled python-pefile version so we build its latest version to fix thisissue. This change is borrowed from commit bb32ec9 and updatespython-pefile to 2017.11.5.The Debian package and the patches are no longer required as all changeswere merged upstream in 3.01-1. (See the nsis changelog in Debian.)
After building Tor Browser nightly 32- and 64-bit, we get the respective NSIS installers. (Tested on Windows 10.)
In projects/nsis/build there is a line [% IF c("var/windows") %], but this IF is always true as we only build nsis for Windows. So I think the IF can be removed.
Otherwise this commit looks good to me. I have started builds on 2 machines to see if I get the same result.
In projects/nsis/build there is a line [% IF c("var/windows") %], but this IF is always true as we only build nsis for Windows. So I think the IF can be removed.
In projects/nsis/config the line enable: '[% c("var/windows") %]' can also be removed.
In projects/nsis/build there is a line [% IF c("var/windows") %], but this IF is always true as we only build nsis for Windows. So I think the IF can be removed.
In projects/nsis/config the line enable: '[% c("var/windows") %]' can also be removed.
Thanks, I removed the c("var/windows") guard for zlib in both the build and the config files. (Same branch for review.)
One thing I wondered on IRC is how to avoid depending on another external party, files.pythonhosted.org, not being down once we build + about whether rebuilding python-future and python-pefile every time is a smart idea.
I guess we could try at least for python-future the 0.15.2 package from Debian. Which leaves the other one. FWIW: Do we have a policy for when we build own projects and when it is okay to build a project during another one? I.e.: should be build python-future and python-pefile in own projects to avoid building them over and over again (in case they indeed need to get built)?
One thing I wondered on IRC is how to avoid depending on another external party, files.pythonhosted.org, not being down once we build + about whether rebuilding python-future and python-pefile every time is a smart idea.
I think we could mirror those files on some reliable hosting. Related to that I opened #25835 (moved) as we have the same issue when people.tpo is down.
I guess we could try at least for python-future the 0.15.2 package from Debian.
It looks like a good idea to try that. I think this package didn't exist in the Ubuntu version we were using when we started doing this.
Which leaves the other one. FWIW: Do we have a policy for when we build own projects and when it is okay to build a project during another one? I.e.: should be build python-future and python-pefile in own projects to avoid building them over and over again (in case they indeed need to get built)?
I can think of the following reasons for wanting to move builds into a separate project (maybe there are more):
the build of that project takes some time, and the other project in which we could include it is something we rebuild more often (such as firefox)
we need to clone a git repository (we can have only one per project)
moving it to a separate project makes things more simple or more clear
Running time python setup.py install --user for python-future and python-pefile on my laptop, I get this: