Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: n3ond4x on January 10, 2013, 12:07:45 PM

Title: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 12:07:45 PM
Hey guys,

I'm trying to build my own custom 32-bit chromium build for TC and I'm struggling because it requires roughly 8-10 gbs of memory to link and the 32-bit TC instance I'm compiling on cannot support more than 3gb of memory. Does anyone have any good suggestions for how to handle this?

Thanks a lot.
Title: Re: Chromium build on TC 3.0.21
Post by: Rich on January 10, 2013, 12:21:59 PM
Hi n3ond4x
Quote
it requires roughly 8-10 gbs of memory to link
That sounds excessive. Try putting the source package in a persistent directory and build from there.
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 12:26:55 PM
I sourced that from the chromium build wiki but I can't find it as of right now. However I know for a fact it is using more than the 3gb a 32bit kernel can handle. The source is being built on a persistent harddisk not in memory, the final linking stage is when all of the object code and dynamic libraries need to be loaded into actual memory.
Title: Re: Chromium build on TC 3.0.21
Post by: bmarkus on January 10, 2013, 12:32:22 PM
Why don't you ask extension creator for details?
Title: Re: Chromium build on TC 3.0.21
Post by: Rich on January 10, 2013, 12:42:03 PM
Hi n3ond4x
Read the  Memory space  paragraph here:
http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 01:13:10 PM
Thanks Rich, I read that before "It takes about 8GB of swap file to link chromium and its tests. If you get an out-of-memory error during the final link, you will need to add swap space with swapon." and I've got a 20gb swap partition enabled just for this.

Here is the error I'm receiving. "gold32 fatal error mmap: failed to allocate 1509484464 bytes for output file: cannot allocate memory."
That's around 1.4gb.

The maintainer of the package is Arslan S. I'll try and find him and send him a PM
Title: Re: Chromium build on TC 3.0.21
Post by: bmarkus on January 10, 2013, 01:20:20 PM
Are you building static or shared, with or w/o test?
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 01:33:50 PM
 It's dynamic/shared. The only command I am passing is "make chrome". Which is what is suggested in the build instructions. All of the object code has successfully compiled, it's the linking that is failing.
Title: Re: Chromium build on TC 3.0.21
Post by: curaga on January 10, 2013, 01:58:06 PM
I think they use 64-bit machines and cross-compile because Chromium's too big like that. But perhaps a shared release build fits in the normal 32-bit limits.
Title: Re: Chromium build on TC 3.0.21
Post by: Rich on January 10, 2013, 01:58:43 PM
Hi n3ond4x
I found this:
Code: [Select]
LDFLAGS="-Wl,--reduce-memory-overheads"here:
http://old.nabble.com/Out-of-memory-on-OBS-issue-for-Chromium-td33384307.html
See here:
http://linux.die.net/man/1/ld
for what  --reduce-memory-overheads  does.
Title: Re: Chromium build on TC 3.0.21
Post by: bmarkus on January 10, 2013, 02:16:03 PM
I think they use 64-bit machines and cross-compile because Chromium's too big like that. But perhaps a shared release build fits in the normal 32-bit limits.

When I checked a month ago I decided not try to build on Raspberry Pi  :D
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 02:22:19 PM
curaga: Any idea on how I could go about doing that? Could it be as simple as replacing my 32bit kernel with a 64bit kernel? I haven't found any instructions that don't claim to be obsolete on the chromium wiki.

rich: I keep getting "--reduce-memory-overheads: unknown option" when I add "-Wl,--reduce-memory-overheads" to my LDFLAGS

Thanks again guys.
Title: Re: Chromium build on TC 3.0.21
Post by: bmarkus on January 10, 2013, 02:24:19 PM
It's dynamic/shared. The only command I am passing is "make chrome". Which is what is suggested in the build instructions. All of the object code has successfully compiled, it's the linking that is failing.

Disable building tests as written in WIKI.
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 02:30:16 PM
I'm not building any tests. "make chrome" makes chrome specifically (or chromium) in debug mode. Which includes a lot of debug symbols I realize, however I don't see why I should be limited by that. I would very much like it to just use whatever swap space I have available to finish the link. Is there any special PAE build of the 32bit kernel I could use or something similar?
Title: Re: Chromium build on TC 3.0.21
Post by: bmarkus on January 10, 2013, 02:32:14 PM
BTW, what is wrong with the repo version?
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 02:43:53 PM
Nothing. I would just like to be able to compile bleeding edge code from the SVN on my Tiny Core install plus be able to fix bugs/work on it/etc.
Title: Re: Chromium build on TC 3.0.21
Post by: Rich on January 10, 2013, 03:03:06 PM
Hi n3ond4x
Quote
rich: I keep getting "--reduce-memory-overheads: unknown option"
Sorry. Seems that the gold linker does not support that switch. How about:
Code: [Select]
LDFLAGS="-Wl,--no-keep-memory"Man page can be found here:
http://manpages.ubuntu.com/manpages/oneiric/man1/gold.1.html
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 03:43:59 PM
Hi Rich,

Well good news and bad news. It helped it link some items but once the memory limit was reached it failed again. I think there is just too much for this to work. I need to be able to get this system utilizing the 20gb swap partition I gave it somehow.

I'm going to try and compile a 32bit TC kernel with PAE to see if it'l start using my swap.

If anyone has any tips for x-compiling this thing I'd be very grateful. The chromium instructions all seem to be obsolete. It's not my ideal solution but at least it would get me moving forward.

Thanks again.
Title: Re: Chromium build on TC 3.0.21
Post by: n3ond4x on January 10, 2013, 04:32:38 PM
Well PAE isn't the solution as it only allows 4GB to a process anyhow. I need to x-compile it looks like, just as curaga said. Does anyone have any advice on how I should do this?
Title: Re: Chromium build on TC 3.0.21
Post by: Rich on January 10, 2013, 04:50:44 PM
Hi n3ond4x
Quote
I need to be able to get this system utilizing the 20gb swap partition I gave it somehow.
Enter  free  in a terminal. What does it report?
Title: Re: Chromium build on TC 3.0.21
Post by: curaga on January 11, 2013, 11:05:29 AM
To cross-compile like that, you need a fully 64-bit system with a 64-to-32bit cross-compiler. While we do have the first (pure64), there is no cross-compiler like that readily available.