-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for mips64el #11208
Add support for mips64el #11208
Conversation
Note that our CI server is not ready for mips64el yet, so the binaries of libcc are not available yet. Currently it is downloading the binaries created by me manually, we should redirect to the official mirror before merging this PR.
@ClarkWang-2013 It looks like that the sysroot image still lacks some necessary dependencies, but unfortunately the linker can not list all missing ones at one time. Can you checkout this branch and build it, and then add all missing dependencies to the sysroot image? You can find build steps above, and the sysroot image is downloaded to |
@zcbenz ok. I try it. |
@zcbenz I encountered a very troublesome problem。Recently, domestic visits to foreign are more stringent,even googlesource.com also can't visit, So I try it and occur errors as follows: Submodule path 'vendor/breakpad': checked out '82f0452e6b687b3c1e14e08d172b2f3fb79ae91a' For the time being I have no better way to solve this problem,If convenient, can you pack the code and push somewhere I upload. Thanks! |
@ClarkWang-2013 Hmm bootstrapping step also requires downloading some large archives, so uploading only the source code would not be enough. Can you add following dependencies to sysroot image, and I'll try it on my side: |
@zcbenz update sysroot complete, look at https://github.com/ClarkWang-2013/Sysroot |
@ClarkWang-2013 Thanks, I'm now meeting following missing dependencies: |
@zcbenz Extract more trouble everytime, So I push libraries you need to github, and you can push them into the debian_jessie_mips64-sysroot/ corresponding directory. |
@ClarkWang-2013 I now get no more linking errors, thanks for your help! I'll provide prebuilt binaries tomorrow so you can test whether it works or not. |
@zcbenz ok |
Note that dump_syms can not parse mips64 binaries, so we don't have symbols archive for mips64 arch.
@ClarkWang-2013 Can you download https://s3.amazonaws.com/gh-contractor-zcbenz/electron-artifacts/v1.8.2-beta.2/electron-v1.8.2-beta.2-linux-mips64el.zip and see whether it works? |
@zcbenz it doesn't work. |
@ClarkWang-2013 Can you replace |
|
@ClarkWang-2013 Can you paste the stack trace with |
@zcbenz Sorry, I forgot to paste.
|
@zcbenz I cross-compile a chromium project also encountered V8 problems before, it‘s mainly about loongson platform pagesize(16K on loongson platform)。 The same code compiling on loongson is ok, but run error when cross compiling. I solve this problem as follows: v8/src/base/platform/platform-posix.cc
intptr_t OS::CommitPageSize() {
+#if V8_TARGET_ARCH_MIPS64
+ static intptr_t page_size = 16384;
+#else
static intptr_t page_size = getpagesize();
+#endif
return page_size;
}
size_t OS::AllocateAlignment() {
-return static_cast<size_t>(sysconf(_SC_PAGESIZE));
+return 16384;
}
v8/src/base/sys-info.cc
#elif V8_OS_POSIX
long pages = sysconf(_SC_PHYS_PAGES); // NOLINT(runtime/int)
-long page_size = sysconf(_SC_PAGESIZE); // NOLINT(runtime/int)
+long page_size = 16384; // NOLINT(runtime/int) some places may not need to change, |
I'll try applying that patch to libchromiumcontent. |
@ClarkWang-2013 Can you try this? http://gh-contractor-zcbenz.s3.amazonaws.com/tmp/electron-v1.8.2-beta.2-linux-mips64el.zip I'm still uploading the binaries with symbols. |
Binaries with symbols: http://gh-contractor-zcbenz.s3.amazonaws.com/tmp/electron_libnode_2.7z |
@zcbenz error again, and the error info is follow: Electron 1.8.2-beta.2 - Build cross platform desktop apps with JavaScript, HTML, and CSS A path to an Electron app may be specified. It must be one of the following: Options: Program received signal SIGSEGV, Segmentation fault. and the bt info is: |
It seems that Electron has successfully started, but crashed when calling APIs from third party dependencies. The crash seems to have happened in IO thread, since libsoftokn3 is a dependency of nss. Is it possible to get a longer stack trace? It is too short to know what happened. |
@zcbenz We can only get these information |
I'm merging this PR since it already builds locally, and does not affect other builds. (It is still crashing though.) The CI job for mips64el has been disabled. |
I noticed that the debugger seemed to indicate you were using Fedora, but the binaries were cross-compiled for debian sysroot, could that be related to the crash? |
@zcbenz I made the sysroot image according to Fedora, I think it should not matter with this |
To build: