chrome executable too big in size

551 views
Skip to first unread message

Ashish S

unread,
Jul 14, 2012, 8:04:48 AM7/14/12
to chromiu...@chromium.org
Hello,

I built chromium browser targeting arm within the chromiumos chroot.
The generated exe is so large(1.2GB in release mode) it cant fit in my target.
The x86-target exe in release mode came out to be only 100Mb..
How can i built an exe thats small enough to land on my target board.
i remember exes for arm under 60mb.. and one cant ship a software with main exe this big..
whats wrong.. and what can be done.
Thanks.

Simon Hong

unread,
Jul 14, 2012, 8:14:58 AM7/14/12
to Ashish S, chromiu...@chromium.org

Try to strip your image.

> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

Ashish S

unread,
Jul 14, 2012, 9:35:09 AM7/14/12
to chromiu...@chromium.org, Ashish S
If I gussed it right you mean to say take the exec from stripping it from the image? But the whole point of building quickly through cros_make_chrome is to build incremently which is lost if everytime I need to strip it from the image?
Correct me i am wrong wrong.
Thanks.


On Saturday, 14 July 2012 17:44:58 UTC+5:30, Simon Hong wrote:
> Try to strip your image.
>

> On Jul 14, 2012 9:04 PM, &quot;Ashish S&quot; &lt;<a href="
>
> &gt;
>
> &gt; Hello,
>
> &gt;
>
> &gt; I built chromium browser targeting arm within the chromiumos chroot.
>
> &gt; The generated exe is so large(1.2GB in release mode) it cant fit in my target.
>
> &gt; The x86-target exe in release mode came out to be only 100Mb..
>
> &gt; How can i built an exe thats small enough to land on my target board.
>
> &gt; i remember exes for arm under 60mb.. and one cant ship a software with main exe this big..
>
> &gt; whats wrong.. and what can be done.
>
> &gt; Thanks.
>
> &gt;
>
> &gt; --
>
> &gt; Chromium OS Developers mailing list: <a href="mailto:chromiu...@chromium.org" target="_blank">chromiu...@chromium.org</a>
>
> &gt; View archives, change email options, or unsubscribe:
>
> &gt; <a href="http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en" target="_blank">http://groups.google.com/a/<WBR>chromium.org/group/chromium-<WBR>os-dev?hl=en</a>
>
> </p>

Mike Frysinger

unread,
Jul 14, 2012, 11:55:57 AM7/14/12
to Ashish S, chromiu...@chromium.org
no, he means run `strip` on it
-mike



--
Chromium OS Developers mailing list: chromiu...@chromium.org

View archives, change email options, or unsubscribe:

Simon Que

unread,
Jul 16, 2012, 4:57:31 PM7/16/12
to Mike Frysinger, Ashish S, chromiu...@chromium.org
Ashish:

If you run strip, I think you'll lose debug symbols, and you won't be
able to step through it with gdb. This may or may not be what you
want to do -- it sounds like you're in a development workflow and you
might end up needing to debug it.

Here's an alternative solution: If you have a normal Chromebook, you
can move the /opt/google/chrome folder to /usr/local/chrome. Then
just create a symlink at /opt/google/chrome to /usr/local/chrome. On
a Chromebook, /usr/local will have enough space for that 1.2 GB
executable.

Of course, this is only for development purposes. On the system that
you ship, you will have to strip it (or build with build_packages) and
put it in the proper location.

Simon

asharif

unread,
Jul 16, 2012, 6:16:38 PM7/16/12
to Simon Que, Mike Frysinger, Ashish S, chromiu...@chromium.org
On Mon, Jul 16, 2012 at 1:57 PM, Simon Que <sq...@chromium.org> wrote:
Ashish:

If you run strip, I think you'll lose debug symbols, and you won't be
able to step through it with gdb.  This may or may not be what you

You can still debug your binary using USE="splitdebug" and use gdbserver on the remote machine.

Pawel Osciak

unread,
Jul 16, 2012, 7:28:31 PM7/16/12
to asharif, Simon Que, Mike Frysinger, Ashish S, chromiu...@chromium.org
Or you could also sshfs-mount it on target...

Ashish S

unread,
Jul 18, 2012, 12:35:09 PM7/18/12
to chromiu...@chromium.org, asharif, Simon Que, Mike Frysinger, Ashish S
Thank you all for the knowledge!
stripping did the trick.. i didnt know about it.

On Tuesday, 17 July 2012 04:58:31 UTC+5:30, Pawel Osciak wrote:
Or you could also sshfs-mount it on target...


On Mon, Jul 16, 2012 at 3:16 PM, asharif <> wrote:



On Mon, Jul 16, 2012 at 1:57 PM, Simon Que <> wrote:
Ashish:

If you run strip, I think you'll lose debug symbols, and you won't be
able to step through it with gdb.  This may or may not be what you

You can still debug your binary using USE="splitdebug" and use gdbserver on the remote machine.

want to do -- it sounds like you're in a development workflow and you
might end up needing to debug it.

Here's an alternative solution: If you have a normal Chromebook, you
can move the /opt/google/chrome folder to /usr/local/chrome.  Then
just create a symlink at /opt/google/chrome to /usr/local/chrome.  On
a Chromebook, /usr/local will have enough space for that 1.2 GB
executable.

Of course, this is only for development purposes.  On the system that
you ship, you will have to strip it (or build with build_packages) and
put it in the proper location.

Simon
>> > href="mailto:chromium-os-dev@chromium.org"
>> > target="_blank">chromium-os-d...@chromium.org</a>

>> >
>> > &gt; View archives, change email options, or unsubscribe:
>> >
>> > &gt; <a
>> > href="http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en"
>> > target="_blank">http://groups.google.com/a/<WBR>chromium.org/group/chromium-<WBR>os-dev?hl=en</a>
>> >
>> > </p>
>>
>> --
>> Chromium OS Developers mailing list: chromiu...@chromium.org
>> View archives, change email options, or unsubscribe:
>> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>
>
> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

Rahul Chaturvedi

unread,
Jul 18, 2012, 1:44:05 PM7/18/12
to Ashish S, chromiu...@chromium.org, asharif, Simon Que, Mike Frysinger
I generally increase my rootfs size for every image that I build.

Mattias Nissler

unread,
Jul 20, 2012, 8:05:45 AM7/20/12
to Rahul Chaturvedi, Ashish S, chromiu...@chromium.org, asharif, Simon Que, Mike Frysinger
On Wed, Jul 18, 2012 at 7:44 PM, Rahul Chaturvedi <r...@chromium.org> wrote:
I generally increase my rootfs size for every image that I build.

I generally advise against that as it significantly increases the time to build the image. I routinely mount big Chrome binaries into the VM or device via sshfs.

Ashish S

unread,
Aug 9, 2012, 1:32:45 AM8/9/12
to chromiu...@chromium.org, Rahul Chaturvedi, Ashish S, asharif, Simon Que, Mike Frysinger
Hello again...

The  strip trick did make the exe small but it cant be debugged as pointed out by people here already..

so for debugging purposes in am using sshfs . I am trying to debug on virtualbox..
the size of the exe is around 1.4G and while running gdb /tmp/chrome chrome , the gdb process gets stuck at the "Reading symbols from /opt/google/chrome/chrome..." step..
upon doing free -m i get to see that the available ram gets used up at some point at this step.. increasing the virtual ram from the VM's settings is useless as even if i give it as large as 4 GB, running free on the chronos prompt gives me this im MBs:
             total       used       free     shared    buffers     cached
Mem:          1877        224       1653          0         16        161
-/+ buffers/cache:         46       1831
Swap:            0          0          0

so i am not being able to run the exe in the gdb..

any suggestions??
 
Thanks.
>> > href="mailto:chromiu...@chromium.org"
>> > target="_blank">chromium-os-dev...@chromium.org</a>

Mattias Nissler

unread,
Aug 9, 2012, 4:54:42 AM8/9/12
to Ashish S, chromiu...@chromium.org, Rahul Chaturvedi, asharif, Simon Que, Mike Frysinger
On Thu, Aug 9, 2012 at 7:32 AM, Ashish S <ash...@gmail.com> wrote:
Hello again...

The  strip trick did make the exe small but it cant be debugged as pointed out by people here already..

so for debugging purposes in am using sshfs . I am trying to debug on virtualbox..
the size of the exe is around 1.4G and while running gdb /tmp/chrome chrome , the gdb process gets stuck at the "Reading symbols from /opt/google/chrome/chrome..." step..

This takes up to a minute even on beefy machines, and gdb may run out of memory if you run it within the VM :) An alternative is to run gdbserver in the VM and connect a remote debugger from the CrOS dev chroot.

Ashish S

unread,
Aug 10, 2012, 12:50:26 AM8/10/12
to chromiu...@chromium.org, Ashish S, Rahul Chaturvedi, asharif, Simon Que, Mike Frysinger
Thanks the gdbserver allows me to atleast give a continue command at the client gdb prompt.
but after that the exe is not actually launching and gets stuck for ever.. the output is as follows:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
localhost user #  gdbserver :1234 /tmp/chrome/chrome
Unable to lstat() logging checkpoint parent directory: No such file or directory.
Process /tmp/chrome/chrome created; pid = 18714
Listening on port 1234
Remote debugging from host 192.168.56.1
[18714:18714:63671148635:WARNING:zygote_host_impl_linux.cc(165)] Running without the SUID sandbox! See http://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[18714:18714:63671202692:ERROR:ownership_service.cc(100)] Blocking on UI thread in OwnershipService::GetStatus
[18769:18769:63671352226:ERROR:nss_util.cc(474)] Error initializing NSS with a persistent database (sql:/etc/fake_root_ca/nssdb): NSS error code: -8174
[18714:18714:63671565652:ERROR:nss_util.cc(474)] Error initializing NSS with a persistent database (sql:/etc/fake_root_ca/nssdb): NSS error code: -8174
... just hangs in here..
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

im not able to proceed further.. if i run the chrome exe without gdb , the exe is launching fine though.. and the errors shown while in gdb mode also exist in normal launch mode.. so i  guess its nothing to do with these errors..

im clueless how to debug why its hanging here.. any clues please?

Thanks.

Rahul Chaturvedi

unread,
Aug 10, 2012, 4:39:29 AM8/10/12
to Ashish S, chromiu...@chromium.org, asharif, Simon Que, Mike Frysinger
Have you tried using remote debugging? If your client can't fit a 1.8gig executable, it's unlikely that it will ever be able to fit the symbols into memory, making debugging impossible.

Ashish S

unread,
Aug 10, 2012, 4:53:34 AM8/10/12
to chromiu...@chromium.org
Hi Rahul,
I am running remote debugging using gdbserver. my last msg is regarding the remote debugging only.I am continuing from my host machine not the VM.
Thanks.
Message has been deleted

OA III

unread,
Apr 4, 2017, 12:58:36 PM4/4/17
to Chromium OS dev


I'm using Linux(on VM) and cross compiling to Linux/ARM64 in release mode.  My out/build comes out to 1.3GB in release mode with symbols = 0.  is there a way to reduce the size further?  I'm a noob so please tell me what I am missing. my args are:

target_os = "linux"
target_cpu = "arm64"
is_debug = false
symbol_level = 0
remove_webcore_debug_symbols = true
optimize_for_size = true

Mike Frysinger

unread,
Apr 4, 2017, 1:41:47 PM4/4/17
to OA III, Chromium OS dev
this group is for Chromium OS as in the OS, not as in the browser.  if you're building for Linux, then this is not the correct group.  please post to a Chromium browser group instead.
-mike

On Tue, Apr 4, 2017 at 12:56 PM, OA III <oalvare...@gmail.com> wrote:
I'm using Linux and cross compiling to Linux/ARM64 in release mode.  My out/build comes out to 1.3GB in release mode with symbols = 0.  is there a way to reduce the size further?  I'm a noob so please tell me what I am missing.

--
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages