I'm newbie to nacl. And I find out there are so many 0 byte files in the directory (nacl_sdk/pepper_38/toolchain/win_*/bin).
When I change the project platform to NaCl64 and compile(hello_nacl_cpp), there comes out an error
(error MSB6006: “D:\nacl_sdk\pepper_38\toolchain\win_x86_newlib\bin\x86_64-nacl-gcc.exe”已退出,代码为 -1)
But I can debug the example "hello_world_gles" with PPAPI platform, so I'm not sure the environment is ok.
Anyone can tell me something? Thanks!
0
votes
Strange... I'm looking at pepper_38 on Windows, and all of those files are 10kb for me. AFAIK, those executables just forward to the real executables in win_x86_newlib/libexec. Can you update your question with the version numbers from pepper_38/README?
- binji
@binji thanks for your reply. I checked the directory (pepper_38\toolchain\win_x86_newlib\libexec), and there are several 0 byte files too, including "x86_64-nacl-g++.exe", "x86_64-nacl-gcc.exe", "x86_64-nacl-ld.exe" and "cyg*.dll". As I'm from China, I can't install or update from nacl_sdk shell directly. I just extract the urls from naclsdk_manifest2.json, and downlad with chrome, through goagent. Is there any problem?
- o0ops
Ah, I see! The problem is that we use cygwin-style symlinks for those files. The nacl sdk updater uses a tool called cygtar.py to extract those on Windows correctly. If you used a tool to untar that made copies (instead of producing size 0 files), that should work too.
- binji
@binji thanks a lot. I know a little bit about python, maybe I can hack the script file :)
- o0ops
1 Answers
1
votes
Answer my question.
As @binji says we should use cygtar.py(which is in the dirctory sdk_tools) to extract the file.
Here we go:
Open cygtar.py with your text editor, you will find a class named CygTar who is the real worker.
Move dwon, and insert a snippet of code below Main function.
def MyLogic():
os.chdir('D:\\nacl_sdk\\sdk')
# tar = CygTar('naclports.tar.bz2', 'r', True) #here must use linux file path
tar = CygTar('naclsdk_win.tar.bz2', 'r', True)
tar.Extract()
Then replace sys.exit(Main(sys.argv)) with sys.exit(MyLogic()) at last of file.That all.
Note: If you have learned python, you will know code indent is very important in python, be careful.
And the final code should looks like this:
