View previous topic :: View next topic |
Author |
Message |
ixlandia n00b

Joined: 14 Mar 2017 Posts: 2
|
Posted: Tue Mar 14, 2017 7:25 pm Post subject: www-client/chromium ebuild cannot be cross-compiled |
|
|
I'm posting this in hopes of some suggestions on how to proceed with this issue - I'm hoping we can at some point get to an ebuild that can be cross-compiled.
Cross-compilation is essential for this package since embedded platforms typically lack the resources required to compile it.
The current ebuilds in the portage tree cannot be cross-compiled in their current state. While there appear to be some checks present in the ebuild to see if the package is being cross-compiled (which makes me believe it may have worked at some point), the actual compilation fails due to several issues I've discovered:
- The GN bootstrap process called by the src_configure() command builds GN for the target architecture. GN is only used to generate the ninja files to build Chromium - it needs to run on the host architecture.
- The correct toolchain is passed to GN for the target build, but GN needs to know the architecture (via target_cpu arg) as well. Otherwise it adds CFLAGS for the host architecture to the build commands.
- GN will try to use the host system libraries if you don't use the target_sysroot arg to point it to the correct root folder for the target system.
- The ninja target "mksnapshot" called by src_compile() doesn't exist when cross-compiling - it seems to be unconditionally built (with Clang) in this case. It also seems to be used as part of the build process.
- When compiling for a different architecture, GN expects Clang to exist in the third_party/llvm-build folder, regardless of specifying the "is_clang=false" arg.
I'd appreciate any suggestions or ideas.
For now I managed to get around all the issues by doing a lot of the steps manually and using the ebuild command to do the rest so that I could at least build a binary package out of it. Ideally I'd want to be able to automate the process in the future. |
|
Back to top |
|
 |
ixlandia n00b

Joined: 14 Mar 2017 Posts: 2
|
Posted: Tue Mar 28, 2017 7:49 pm Post subject: |
|
|
In the meantime I have managed to fix the ebuild so that it will cross-compile correctly. I've put it in a local overlay for now, just putting this out there in case anyone wants more info. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|