Chromium recommends you cross-compile for ARM because most ARM devices lack the RAM and power to build Chromium directly. For a 512MB ARMv6 SBC, I agree with this. How do I cross compile for ARMv6?
Have you actually tried it?
Code: Select all
sudo sed -i 's/^CONF_SWAPSIZE=[0-9]*$/CONF_SWAPSIZE=1024/' /etc/dphys-swapfile
sudo /etc/init.d/dphys-swapfile restart
Code: Select all
collect2: ld terminated with signal 6 Aborted terminate called after throwing an instance of 'std::bad_alloc'
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
That would mean the linker is needing more than 2GB of memorycode_exec wrote: ↑Fri Dec 07, 2018 4:16 pmI doubt it will work directly on any Pi, I am likely to get the following error when building:
This is because of lack of RAM. See https://chromium.googlesource.com/chrom ... er-CrashesCode: Select all
collect2: ld terminated with signal 6 Aborted terminate called after throwing an instance of 'std::bad_alloc' collect2: ld terminated with signal 11 [Segmentation fault], core dumped
Code: Select all
--no-keep-memory
ld normally optimizes for speed over memory usage by caching the symbol tables of
input files in memory. This option tells ld to instead optimize for memory usage, by
rereading the symbol tables as necessary. This may be required if ld runs out of
memory space while linking a large executable.
I'd rather cross-compile rather than compile directly on a Pi. Even if it did work, it would take ages (probably a few days) it took eight hours to compile x64 Chromium on a laptop with 4 cores and 8GB RAM!jahboater wrote: ↑Fri Dec 07, 2018 5:57 pmThat would mean the linker is needing more than 2GB of memorycode_exec wrote: ↑Fri Dec 07, 2018 4:16 pmI doubt it will work directly on any Pi, I am likely to get the following error when building:
This is because of lack of RAM. See https://chromium.googlesource.com/chrom ... er-CrashesCode: Select all
collect2: ld terminated with signal 6 Aborted terminate called after throwing an instance of 'std::bad_alloc' collect2: ld terminated with signal 11 [Segmentation fault], core dumped
Perhaps look at the "--no-keep-memory" linker option.Code: Select all
--no-keep-memory ld normally optimizes for speed over memory usage by caching the symbol tables of input files in memory. This option tells ld to instead optimize for memory usage, by rereading the symbol tables as necessary. This may be required if ld runs out of memory space while linking a large executable.
Agreed. I wish there were a simple, obvious, well-documented and easily downloadable cross-compiler toolchain available (for compiling Pi stuff on a regular computer).I'd rather cross-compile rather than compile directly on a Pi. Even if it did work, it would take ages (probably a few days) it took eight hours to compile x64 Chromium on a laptop with 4 cores and 8GB RAM!
Code: Select all
-mcpu=arm1176jzf-s -mfpu=vfp
Code: Select all
-march=native -mtune=native