Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I want to make a Chromium 5.0.317.0 ebuild/binary-package
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Mon Feb 08, 2010 12:07 am    Post subject: I want to make a Chromium 5.0.317.0 ebuild/binary-package Reply with quote

I just found out about a new version of chromium that has been released to developers. ZDNet says that it has built-in NoScript functionality and "lets you selectively choose which cookies, images, plug-ins and pop-ups are allowed as well":

http://blogs.zdnet.com/Google/?p=1714

The latest version of chromium avaliable from portage is 5.0.307.5 and it is hardmasked:

http://packages.gentoo.org/package/www-client/chromium

I am reading the following documents to figure out how to install 5.0.307.5 in a manner compatible with portage:

http://devmanual.gentoo.org/quickstart/index.html
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1
http://code.google.com/p/chromium/wiki/LinuxBuildInstructions
http://dev.chromium.org/developers/how-tos/get-the-code

Is there any more information on this topic which could make this easier? I ask because when I was first trying Linux, I had Ubuntu Linux installed in a virtual machine and I recall a nifty commandline tool it had for making debian packages when compiling your own software. I did a google search and found it:

https://help.ubuntu.com/community/CheckInstall

Is there a similar tool for Gentoo that makes ebuilds/binary-packages?
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Mon Feb 08, 2010 12:54 am    Post subject: Reply with quote

Well, I have an update... I am building chromium. It is so complex that I am not confident that I will get an ebuild working, but here are some shell commands that should work after you download the source:

Code:
cd ~/
wget http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz
tar -xzf depot_tools.tar.gz
wget http://build.chromium.org/buildbot/archives/chromium.r38327.tgz
tar -xzf chromium.r38327.tgz
mv home/chrome-svn/tarball/chromium ./
rm -rf ./home*
export CCACHE_DIR=/var/tmp/ccache
export GYP_GENERATORS=make
export PATH=~/depot_tools:"$PATH"
export BUILDTYPE=Release
export V=1
export CHROMIUM_ROOT=~/chromium
export CC="ccache gcc"
export CXX="ccache g++"
gclient sync --force
make -j3 chrome


This assumes that you have a dual core processor and ccache installed. The chromium tarball is the most up to date version available at the moment, but in the future, a more up to date file for the tarball can probably be found at the following page:

http://build.chromium.org/buildbot/archives/chromium_tarball.html

Extracting the tarball gives you a few nested directories with nothing but a directory in a directory in a... until you finally have the chrome directory that has the src directory and a few other things in it. I don't rec

I have a few observations regarding the compilation, which is that the CFLAGS google's build system selects are wrong. Here is a copy of a line of output from the terminal:

Code:
ccache g++  -pthread -fno-exceptions -Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -m32 -march=pentium4 -msse2 -mfpmath=sse -fno-strict-aliasing -fno-strict-aliasing -Wno-deprecated-declarations -Wno-unused-function -O2 -fno-ident -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DU_STATIC_IMPLEMENTATION -DCHROMIUM_BUILD -DENABLE_GPU=1 -DU_COMMON_IMPLEMENTATION -DNDEBUG -DNVALGRIND -Ithird_party/icu/public/common -Ithird_party/icu/public/i18n -Ithird_party/icu/source/common -Ithird_party/icu/source/i18n -MMD -MF out/Release/obj.target/icuuc/third_party/icu/source/common/utext.o.d.tmp -c -o out/Release/obj.target/icuuc/third_party/icu/source/common/utext.o third_party/icu/source/common/utext.cpp


It should be doing -march=prescott (or -march=native if the build system wants to let GCC do the work), but instead it is doing -march=pentium4 -msse2. I assume that this is for cross compiling, so one system's CPU architecture will not render the binaries unusable on another system, but I do not like it as it will produce a suboptimal binaries for my system. I will have to change this as soon as I figure out how to change it.

Also, equery files chromium shows that the files the chromium package builds are in a few locations, with >90% them in a single folder, so while it would be difficult to make an ebuild for this, it should be relatively easy for me to generate a binary package for portage that anyone interested could use to install this. It would of course require a 32-bit Pentium 4 or higher, but it is something, although I am not sure how I would host it to be able to share it with anyone here that would be interested in it. :/
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Mon Feb 08, 2010 3:09 am    Post subject: Reply with quote

Okay, I have it compiled and running. I do not see why the previous version, 5.0.307.5, is hardmasked. I could not find any bugs explaining it, but the latest version runs without an issue for me. I am running ~x86, which could explain why it works for me.

Here are the sunspider results. Chromium 4.0.266.0 (33992) took 762.4ms +/- 3.9% on my T2400. Chrome 5.0.320.0 (38335) took 640.2ms +/- 6.6% on my laptop.

Are there any guides online for how I would make an binary package out of this? I assume that the 800+ MB tarball that google provides for building chrome is too large for an ebuild and I do not know exactly how to put the binary files into a format suitable for portage to keep track of files. :/
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Mon Feb 08, 2010 2:25 pm    Post subject: Reply with quote

Another update. I found out how to modify the chrome build system so I could specify my own CFLAGS.

src/build/common.gypi has the ia32 compiler flags around line 800 or so.

I changed the defaults from "-march=pentium4 -msse2 -mfpmath=sse" to "-march=prescott -pipe -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -mfpmath=sse" and I am recompiling it now. I wonder if this will have any tangible difference in the sunspider results. :)
Back to top
View user's profile Send private message
codestation
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2008
Posts: 126
Location: /dev/negi

PostPosted: Mon Feb 08, 2010 2:48 pm    Post subject: Reply with quote

Here explains why the dev releases are hardmasked. (If you dont mind the bugs in the dev releases you can unmask it anyway).

As for making a binary package, you have to make a ebuild first, then is as easy as doing a "emerge -B chromium" or "quickpkg chromium". About the ebuild it can be as simple as renaming it with the new version then update the manifest, but the problem here is that the source tarball that gentoo provide is a nicely stripped one of ~150MiB so i dont know if the ebuild can work with the original tarball.
_________________
Just feel the code...
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Mon Feb 08, 2010 5:18 pm    Post subject: Reply with quote

codestation wrote:
Here explains why the dev releases are hardmasked. (If you dont mind the bugs in the dev releases you can unmask it anyway).

As for making a binary package, you have to make a ebuild first, then is as easy as doing a "emerge -B chromium" or "quickpkg chromium". About the ebuild it can be as simple as renaming it with the new version then update the manifest, but the problem here is that the source tarball that gentoo provide is a nicely stripped one of ~150MiB so i dont know if the ebuild can work with the original tarball.


Thankyou for the information. It is very informative. I will try getting the files from the source tarball Gentoo provides and looking for the equivalent files in the tarballl Google provides. I am hoping that the directories in each tarball will intersect to the point where Gentoo's tarball will be a subset of Google's tarball so I can just strip out the directories that are not in the intersection.

I also want to mention the results from the compilation. There seems to be no significant difference from using the heavier optimization flags with GCC 4.4.2, as the sunspider results from the new compilation is 640.8ms +/- 3.2%, which is statistically the same as 640.2ms +/- 6.6%. In other words, Google Chrome seems to have no significant benefit from SSE3 instructions and GCC's graphite optimizer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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