[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #23561 [Applications/Tor Browser]: Fix nsis builds for Windows 64
#23561: Fix nsis builds for Windows 64
-------------------------------------------+--------------------------
Reporter: boklm | Owner: boklm
Type: task | Status: assigned
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: TorBrowserTeam201709, tbb-rbm | Actual Points:
Parent ID: #20636 | Points:
Reviewer: | Sponsor:
-------------------------------------------+--------------------------
Comment (by boklm):
I tried a build with the following patch:
{{{
diff --git a/projects/nsis/build b/projects/nsis/build
index af19dd7..c75dced 100755
--- a/projects/nsis/build
+++ b/projects/nsis/build
@@ -16,7 +16,7 @@ do
[ -f debian/patches/$patch ] && patch -p1 < debian/patches/$patch
done
[% SET scons_args = 'APPEND_CCFLAGS="-fgnu89-inline" VERSION=' _
c("version")
- _ " SKIPUTILS='NSIS Menu' XGCC_W32_PREFIX=i686-w64-mingw32-"
+ _ " SKIPUTILS='NSIS Menu' XGCC_W32_PREFIX=" _ c("arch") _
"-w64-mingw32-"
_ ' PREFIX=/var/tmp/dist/nsis' -%]
scons [% scons_args %]
scons [% scons_args %] install
}}}
Which failed with the following error:
{{{
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 000000006cf0
1000
x86_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.cpp
cc1plus: 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, unsi
gned 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 1
scons: building terminated because of errors.
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23561#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs