-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Windows build failed with Ninja #419
Comments
@leesanggoo Thanks for filing the issue. Can you provide more information? For example, (1) Windows version. (2) Packager source code revision. (3) The error messages. |
@kqyang Thanks for your quick reply. (1) Windows version : Windows 10 Pro, x64 Please tell me if you need any more information. |
@leesanggoo Thanks for the info! Here is what I saw from the log: d:\works\shaka_packager\src\packager\third_party\boringssl\src\crypto\internal.h: error C2220: °æ°í°¡ ¿À·ù·Î ó¸®µÇ¾î »ý
¼ºµÈ 'object' ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.
d:\works\shaka_packager\src\packager\third_party\boringssl\src\crypto\internal.h: warning C4819: ÇöÀç ÄÚµå ÆäÀÌÁö(949)¿¡
¼ Ç¥½ÃÇÒ ¼ö ¾ø´Â ¹®ÀÚ°¡ ÆÄÀÏ¿¡ µé¾î ÀÖ½À´Ï´Ù. µ¥ÀÌÅÍ°¡ ¼Õ½ÇµÇÁö ¾Ê°Ô ÇÏ·Á¸é ÇØ´ç ÆÄÀÏÀ» À¯´ÏÄÚµå Çü½ÄÀ¸·Î ÀúÀåÇϽʽÿÀ.
...
d:\works\shaka_packager\src\packager\third_party\boringssl\src\crypto\base64\base64.c: error C2220: °æ°í°¡ ¿À·ù·Î 󸮵Ç
¾î »ý¼ºµÈ 'object' ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.
d:\works\shaka_packager\src\packager\third_party\boringssl\src\crypto\base64\base64.c: warning C4819: ÇöÀç ÄÚµå ÆäÀÌÁö(9
49)¿¡¼ Ç¥½ÃÇÒ ¼ö ¾ø´Â ¹®ÀÚ°¡ ÆÄÀÏ¿¡ µé¾î ÀÖ½À´Ï´Ù. µ¥ÀÌÅÍ°¡ ¼Õ½ÇµÇÁö ¾Ê°Ô ÇÏ·Á¸é ÇØ´ç ÆÄÀÏÀ» À¯´ÏÄÚµå Çü½ÄÀ¸·Î ÀúÀåÇϽÊ
½Ã¿À.
...
d:\works\shaka_packager\src\packager\third_party\boringssl\src\include\openssl\aead.h: error C2220: °æ°í°¡ ¿À·ù·Î 󸮵Ç
¾î »ý¼ºµÈ 'object' ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.
d:\works\shaka_packager\src\packager\third_party\boringssl\src\include\openssl\aead.h: warning C4819: ÇöÀç ÄÚµå ÆäÀÌÁö(9
49)¿¡¼ Ç¥½ÃÇÒ ¼ö ¾ø´Â ¹®ÀÚ°¡ ÆÄÀÏ¿¡ µé¾î ÀÖ½À´Ï´Ù. µ¥ÀÌÅÍ°¡ ¼Õ½ÇµÇÁö ¾Ê°Ô ÇÏ·Á¸é ÇØ´ç ÆÄÀÏÀ» À¯´ÏÄÚµå Çü½ÄÀ¸·Î ÀúÀåÇϽÊ
½Ã¿À. According to https://msdn.microsoft.com/en-us/library/ms173715.aspx
I checked these files and there are indeed non-ASCII characters in the comment section of these files. It is safe to just suppress the warning during compilation. We'll prepare a fix soon. In the mean while, if you want to try, you can edit the source code yourself to suppress the warning: --- c/packager/third_party/boringssl/boringssl.gyp
+++ w/packager/third_party/boringssl/boringssl.gyp
@@ -34,7 +34,7 @@
},
# TODO(davidben): Fix size_t truncations in BoringSSL.
# https://crbug.com/429039
- 'msvs_disabled_warnings': [ 4267, ],
+ 'msvs_disabled_warnings': [ 4267, 4819, ],
'conditions': [
['component == "shared_library"', {
'defines': [
@@ -73,7 +73,7 @@
'dependencies': [ 'boringssl_asm' ],
# TODO(davidben): Fix size_t truncations in BoringSSL.
# https://crbug.com/429039
- 'msvs_disabled_warnings': [ 4267, ],
+ 'msvs_disabled_warnings': [ 4267, 4819, ],
'conditions': [
['component == "shared_library"', {
'defines': [ |
@kqyang Thank you! But I've run Ninja after edit it(boringssl.gyp), but the same warning occurred. Am I right..? |
Ah, you need to run C2220 is the result of C4819, so it will be gone after fixing C4819. There could be C4819 in other third_party modules though, but we can address them one by one. |
oh, I see. Thank you for your detailed explanation. So I fixed some modules, and It but I've been in trouble again at 'gtest'. I edited it like this,
I haven't used gyp, so I don't know well.. Is it wrong? |
Thanks for trying. That looks correct. Can you post the whole build log? You may also send a pull request so we can review your change. |
Here is it. I edited only that part. |
@leesanggoo Thanks for the log. It is because the header file is indirectly included in another module, i.e. in a dependent module, so you'll need to modify the dependent settings in line 196 of gtest.gyp: https://github.com/google/shaka-packager/blob/master/packager/testing/gtest.gyp#L196. Let us know if it works if you add 4819 there too. |
Thank you for your active support, the build finally succeeded! But.. there is one more question to ask. SET GYP_DEFINES='target_arch=x64' but the 'fatal error LNK1112' is occurred. Could you explain me what I did wrong? |
@leesanggoo That is great! I am a bit surprised that you have to update almost all modules though. Can you try if you can get it work by just having the below change? --- c/packager/common.gypi
+++ w/packager/common.gypi
@@ -61,6 +61,10 @@
'-Wno-unguarded-availability',
],
},
+ 'msvs_disabled_warnings': [ 4819, ],
+ 'direct_dependent_settings': {
+ 'msvs_disabled_warnings': [ 4819, ],
+ },
'conditions': [
['clang==0', {
'cflags': [ As for the link error with 64-bit build, is your system 32-bit or 64-bit? You won't be able to build for 64-bit if your operation system is 32-bit. You can build for both 32-bit and 64-bit if your system is 64-bit. |
@kqyang I got the source again and tried to build it again by modifying only that part, but I get 4819 from modules as 'base', 'media'. And.. my system is x64, but I'll use x86 build. So It's okay. Thank you very much! |
I do not know if I should send a pull request with msvs_disabled_warnings added for all modules, but I will close the issue. |
@leesanggoo Thanks for putting your effort in resolving the problem yourself. If you can send a pull request, it will be really appreciated. As for the x86/x64 build, I am not very familiar with Windows command shell, I am afraid that the setting for GYP_DEFINES may not be carried forward, so another thing you can try is to set GYP_DEFINES and GYP_DEFINES='target_arch=x64' gclient runhooks
ninja.exe -C .\out\Release_x64\ |
I don't know if it's right to ask a question here.
I have a question about building on Windows
I was succeeded to build binary immediately on Ubuntu.
but on Windows, failed.
After entering the command 'ninja -C out \ Release_x64', an error occurs during the build with 'The warn is treated as an error and no generated 'object' file exists.' message.
especially, most of this errors were files in 'boringssl'.
I tried to edit .gyp scripts, but it didn't work.
what should I do?
The text was updated successfully, but these errors were encountered: