Tuesday, November 10, 2009

G++ and Modified G++

First thing we had to do was download a script called build-tools.sh, shortly after I started running the script I was told there was a revised version where some change was made to it so we were supposed to use that one. This revised version can be found here. This time running the script was much faster but I ran into a little problem.

Error: installation or configuration problem: C++ compiler cannot create executables. I asked chris tyler about this on IRC and he said "ctyler> well, someone deleted the c++/g++ links", so whoever was on scotland last doing this, this is your fault! :P lol

After I remade the links using the commands:
su -c "ln -s /usr/bin/g++.original /usr/bin/g++"
su -c "ln -s /usr/bin/c++.original /usr/bin/c++"
it started running again doing its compiling thing.

Someone decided to compile something at the exact same time and it was severely slowing down my compile so I decided to use the hongkong machine.
That presented a new problem, apparently the gcc symbolic link wasnt done correctly so I had to fix that AND the c++.original file was tampered with so Chris Tyler had to fix that.
After these were fixed I could finally move on.

Apparently everyone decided to use the Abiword because it had a lot of c in it, so I decided to use it as well, I used the command "yumdownloader --source abiword" and then "rpm -i abiword*".

After fiddling with dependencies I ran: time rpmbuild -ba abiword.spec three times and came out with this:

Using Original g++

Test 1 - real 7m11.373s
user 10m8.225s
sys 3m5.116s

Test 2 - real 3m58.134s
user 3m27.638s
sys 2m6.875s

Test 3 - real 3m56.867s
user 3m28.087s
sys 2m7.464s

Test 4 - real 3m56.037s
user 3m27.520s
sys 2m7.851s

Four tests were done because the first test seemed exponentially longer than the others.
Now its time to use the modified g++. I had to create a symbolic link to my modified g++ I did so with this command

su -c "ln -s /home/jddeni/tools/gcc-dehydra/installed/bin/[gc]++ /usr/bin"

I ran the build command again and here are the outputs:

Test 1 - real 6m38.812s
user 10m0.445s
sys 2m53.160s

Test 2 - real 3m31.770s
user 3m17.512s
sys 1m56.154s

Test 3 - real 3m31.757s
user 3m17.073s
sys 1m55.958s

Test 4 - real 3m29.787s
user 3m16.585s
sys 1m56.548s

As you can see in all of the cases the modified g++ produced faster results.
Nobody worry, I am putting the symbolic links backk in to their originals :)

Until next time!

No comments:

Post a Comment