Friday, February 13, 2009

Open Office - Mac OS X Build - Part 2

I have talked with Eric on IRC about hacking the OOo on Mac OS X. He provided me with many solutions, but the main difference is the way we build.

I described to him my situation of my method of build and it appears that I have missed a few steps in between. Lets review my old method...

1. Make changes to the .cxx file
2. Rebuild the directory branch of the .cxx file that it resides.
3. Rebuild the entire project from the source root.
4. Extract the OpenOffice Application inside the instsetoo_native/....../install/en-US/
5. Open OpenOffice to see changes.

Of course this method does not work, because I do not see any changes.

Now, this is Eric's solution
1. Make changes to the .cxx file
2. Rebuild the directory branch of the .cxx file that it resides.
3. Deliver on the same directory
4. Delete the initial output tree
cd instsetoo_native
rm -rf unxmacxi.pro
5. Rebuild the entire thing

I have not yet confirm on the status of this method, because I am only trying this now right after I spoke with Eric.


A different method that was introduce to me was delete portion of the OpenOffice Bundle content and replace it the newly build. (Sounds really confusing to me and wondering how people figure out this method.)

This is what had been said to my understanding.
1. Make the change on the .cxx
2. Rebuild the branch of the .cxx reside
3. Remove a portion of the OpenOffice Bundle in the Application
4.
rm -f /Applications/OpenOffice.org.app/Contents/basis-link/program/libvclmxi.dylib
In the Mac OS X case, you will find the Openoffice.org.app inside the instsetoo_native folder
5.
Copy the unxmacxi.pro inside vcl to the OpenOffice.org.app/Contents/basis-link/program/
cp unxmacxi.pro/lib/libvclmxi.dylib /Applications/OpenOffice.org.app/Contents/basis-
link/program/
6. Run the program.

To my understanding this method is a really quick way to modify the application without rebuilding everything. But I have not yet confirm if it works.

The 3rd method, he describe is to install cache, so any build that is not been modify it'll be ignore.
So imagin, your build takes 1 hour, with cache it might take 30 minutes.
So this is how he describe how to do it.
Once you install cache... do the following

1. export CC="ccache gcc"
2. export CXX = "ccache g++"

then just do you build routine with ./bootstrap and build

I am going to try them out see how well they work :)




Wednesday, February 11, 2009

Mac OS X Build

I tried the Mac OS X build yesterday night by following the instruction on the wiki.
Surprisingly the build on the Mac OS X is much less complex than the Linux.

Now I am trying to 'hack' the OpenOffice, by editing the code in the SW(Open Office writer) source.
I ran the build again with the modification, but it did not seem to have any effect.

I edited the menu.cxx inside the ~/DEV300_m40/solenv/source/window
to get the menu item to display their names backward. The code were successfully build, but the changes are not apply. Maybe perhaps I am missing a few steps in between.

Then I went on to modify the SW(Open Office writer) source hoping that I might get more of a noticeable change. I simply write a code to open a file for writing and put some random text in there and close the file whenever I bookmark something.
Again, the changes did not apply, because when I try to bookmark in -writer I did not see any sort of text file being generated.

Saturday, January 31, 2009

Building OOo mystery

The build for OOo on Liberia is finished, however I do not know if I did it right or not until we actually work on it. I was talking with Daeseon about why the build does not work for him.

The difference in my build is that I did it in root. But quickly that difference did not help much, because Daeseon build it later, in root, on his machine and it failed at the same spot. I then tried it on my own account on Liberia, it quickly fail after 5 seconds. Saying error "/home/sclaw1/ooo/DEV300_m40/soltools/mkdepend/collectdircontent.cxx on ireland failed
Error code 1, while making '../unxlngx6.pro/obj/collectdircontent.obj' "

Now I am testing on Australia in root, and it seem to be building just fine.

As to why it does not work in your user account is unknown.

Friday, January 30, 2009

OOo Build has finish and a success

So, stayed up late at night to see how the build is coming along.

Started last night at 9:41pm and was finished by 1:52pm.
It was a success, but sorry that I didn't kept a log on the progress.

Building OOo

Thanks to Daeseon's effort in getting a success run for the build, the results is still unknown till I talk to him.

In the meantime, I am doing a build on Liberia. Everything is running smoothly so far, all that is left to do is wait for it to finish.

If anyone out there who hasn't done this yet, Daeseon has posted a quick run on how to build OOo on his blog. I am gonna put some information about it here as well because the build for me and Daeseon has different errors.

Part 1 : Getting Open Office on your machine
Be sure you are in root.
-> su -
-> mkdir ooo
-> svn co http://svn.services.openoffice.org/ooo/tags/DEV300_m40

Part 2: Setting C and C++ compiler (I just did what was shown in class)
-> export CC="distcc gcc"
-> export GCC='distcc g++"

Part 3: Configuring the Source
cd to your open office DEV300_m40 folder and use
-> ./configure --with-use-shell=bash

Note: You will run into problems with some errors of not being able to find a certain things and is different for every computer. I have provide some of the issues that I ran into and fixes.
Problem #1: no cups/cups.h
Solution #1: yum install cups-devel

Problem #2: no JDK installed
Solution #2: yum install java-1.7.0-icedtea-devel.x86_64

Problem #3: no gperf
Solution #3: yum install gperf.x86_64

Problem #4: no mozilla
Solution #4: get it from the link provided by the error generated.

Problem #5: no Ant
Solution #5: yum install ant.x86_64

Part 4: Setting Environmental Variables
At the end of the configuration, you will get a warning issue, do read what it says before procceding. It should say you have to do source LinuxX86-64Env.Set or LinuxX86-64Env.Set.sh
-> source LinuxX86-64Env.Set.sh

Part 5: Bootstrap
If everything goes well with part 4, run bootstrap
-> ./bootstrap

Part 6: Build!!!
Do pray that you'll not run into any problem and build this thing all the way.
-> dmake

Sunday, January 25, 2009

DistCC Installed Germany

This morning I came up on my blog and found 2 comments.
One suggesting the issue of why DistCC isn't working because of the firewall setting and the other came from a team member saying that he had solve the issues with DISTCC and has documented it.

Give yourself a pat on the back Deaseon :)

Then I followed the his documented blog and do the installation on Germany. It worked like a charm, with exception on the iptables command would need some adjustment based upon the computer you are using. The process still takes some time for me regardless.

Friday, January 23, 2009

DistCC Failure Experience

Ok, I have spent some time with my team in the CDOT trying to figure out the configuration process of DistCC, but we are constantly kept on bumping up against obstacles unexpectedly without a single answer on the internet.

We first encounter the problem of unable to reference CDOT computer by name. But it turns out to be a minor problem of adding the proxmity.com in the DNS. Thanks to Chris Tyler effort in mentioning this in the IRC and I just happened to glanced at it that solved the problem. :)

Eager by the result, we jumped into distribution compilation and this is where the fun starts.
Setting up the distCC daemon on other computer for compilation sounded very easy on the guide written by countless number of authors.

But when actually doing it, it does not work. It kept generating errors saying that it could not connect. (I wish I have copied the error message to post up here). I suspected the reason because we are missing a few steps in between that has to do with HOST and 'make'. I am only making this assumption based upon reading the guide and documentation.