User:Mano622
Hi everybody ! My name is Pierre Pasteau. I am new to OpenOffice.org, but I hope help the project.
Here are some information about my work in the project :
irc.freenode.net: channels : #educooo,#education.openoffice.org,#dev.openoffice.org,#go-oo,#lealinux
Configuration : Gentoo Linux 2.6.24-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3200+
Contents
- 1 16/07/08: Download and get information about the project
- 2 17/07/08: Configuration and begin compilation
- 3 18/07/08: Finish to build mozilla module
- 4 19/07/08 - 20/08/08: Continue compilation
- 5 20/07/08: Compilation break break ... end
- 6 21/07/08: Finish setup && Documentation
- 7 22/07/08: Seamonkey source first look
- 8 23/07/08 - 28/07/08 Get first patch
- 9 28/07/08 - 31/07/08 Seamonkey And OpenOffice configure:
- 10 12/07/08 - 22/07/08 Replaced invalided hunks:
- 11 QA checking of migration
- 12 Begin build on different OS
16/07/08: Download and get information about the project
First get the latest dev souce with cvs:
$ export CVSROOT=":pserver:anoncvs@anoncvs.services.openoffice.org:/cvs" $ cvs -z4 co -r DEV300_m23 OpenOffice3 swext tomcat apache-commons
Begin to read and to do exercice from this page: http://wiki.services.openoffice.org/wiki/Education_ClassRoom/Previous_Logs/Introduction
Read some information about all the module in the project, here: http://wiki.services.openoffice.org/wiki/Source_code_directories
17/07/08: Configuration and begin compilation
I do a little meeting in the morning, with ericb2 and chacha_chaudry (contributors).
I try to configure the software, whith this flags enabled :
$ cd DEV300_m23/config_office && ./configure --with-lang=ALL --with-dict=ALL --without-fonts --enable-libsn --with-system-zlib
--with-lang=ALL : for every language. --with-dict=ALL : dictionary for every language. --without-fonts : no Bitstream Vera police I have already it with X. --with-epm=internal : solve the rpm depends
But I have got some errors, I need to install tcsh and rpm so :
$ emerge tcsh rpm
emerge is the command of the package management system from Gentoo
ericb2 told me after that to don't have depends I must use this flags:
--with-epm=internal --with-use-shell=bash
I need to download mozilla sources and put it in moz subdir, need the file unowinreg.dll too.
$ cd moz
Missed modules hyphen and hunspell so:
$ cvs -z4 co -r DEV300_m23 hunspell hyphen
Configuration is ok, so save the line.
Now set the setup context, and do bootstrap:
$ cd .. && source linux*.sh $ ./bootstrap
The linux*.sh script set vars, alias and unset few vars.
Now try to compile:
$ dmake
But quicly :
first error whith moz : {standard input}: Assembler messages: {standard input}:8: Error: suffix or operands invalid for `push' this error hapenned when i386 assembler code arrive on x86_64.
I go to the moz subdir, and modified patch with :
$ dmake patch $ dmake create_patch
But the same problem re-appear.
When try to resolv problem seen that in the Makefile x86 field is execute.
Yes, the mozilla configure detect an i686.
18/07/08: Finish to build mozilla module
After that discover a part of the problem, I go to see the configure of mozilla.
I waste some hours, so I tryed to restore the original patch with :
$ cd moz $ cvs up
And this time the build is ok (don't know why)
ericb2 told me to create archive of the module moz
$ dmake zip
So next time I will configure with --disable-build-mozilla
I create repertory work in moz and download seamonkey last version 1.1.11 in.
$ mkdir work
Read mozilla-source-1.7.5.patch for the first time, don't understand every things. Need to revise patch syntax :
+ line which will be add - line which will be delete
! block which will be replace --- ! by this block
Other line is here to indicate the place in the code
19/07/08 - 20/08/08: Continue compilation
The install don't find few of jdk header and lib, I found them :
$ ln -s /etc/java-config-2/current-system-vm/include/jni.h /usr/include $ ln -s /etc/java-config-2/current-system-vm/include/linux/jni_md.h /usr/include
$ ln -s /etc/java-config-2/current-system-vm/include/jawt.h /usr/include $ ln -s /etc/java-config-2/current-system-vm/include/linux/jawt_md.h /usr/include $ ln -s /opt/sun-jdk-1.5.0.15/jre/lib/amd64/libjawt.so /usr/lib64/ $ ln -s /opt/sun-jdk-1.5.0.15/jre/lib/amd64/xawt/libmawt.so /usr/lib64/ $ ln -s /opt/sun-jdk-1.5.0.15/jre/lib/amd64/libjava.so /usr/lib64/ $ ln -s /opt/sun-jdk-1.5.0.15/jre/lib/amd64/server/libjvm.so /usr/lib64/ $ ln -s /opt/sun-jdk-1.5.0.15/jre/lib/amd64/libmlib_image.so /usr/lib64/ $ ln -s /opt/sun-jdk-1.5.0.15/jre/lib/amd64/libverify.so /usr/lib64/
Have another problem with jurt.jar and ridl.jar.
error : "class file has wrong version 50.0, should be 49.0"
It was because I do an update of jdk before the end of the dmake so
it mixed code compiled: class file version 50.0 is used by Java 6.0, and 49.0 is used by Java 5.0.
Another probleme appear:
error : "The JRE specified by the bootstrap variable UNO_JAVA_JFW_JREHOME or UNO_JAVA_JFW_ENV_JREHOME could not be recognized. Check the values and make sure that you use a plug-in library that can recognize that JRE.javaldx failed!"
UNO_JAVA_JFW_ENV_JREHOME is using so:
$ UNO_JAVA_JFW_ENV_JREHOME="/usr/lib/jvm/sun-jdk-1.6/" $ export UNO_JAVA_JFW_ENV_JREHOME
But nothing change
20/07/08: Compilation break break ... end
After many hours decide to take all from begin, with this time jdk-1.5 and no jdk-1.6 :
$ dmake clean
I reconfigure with this flag:
--with-jdk-home="/usr/lib/jdk-1.5/"
Download and install ccache 2.4 to win time if need recompilation
$ export CC="ccache gcc" $ export CXX="ccache g++" $ dmake
I have got a new error :
PROBLEM: magic_load(ms, "/usr/lib/rpm/magic") failed: could not find any magic files! Try 1 : Could not execute "rpmbuild -bb RPMS/ooobasis3.0-gnome-integration.spec --target x86_64 2>&1 |"! ... ERROR: "rpmbuild -bb RPMS/ooobasis3.0-gnome-integration.spec --target x86_64 2>&1 |"! in function: create_packages_without_epm
It's a problem from my system, need to get manually the magic file of rpm from source:
$ cp /var/tmp/portage/app-arch/rpm-4.4.6-r3/work/rpm-4.4.6/rpm.magic /usr/lib/rpm/magic
Ok the compilation finished
21/07/08: Finish setup && Documentation
To finish setup, we need to extract each rpm file :
$ cd / $ rpm2cpio /home/mano/DEV23/instsetoo_native/unxlngx6.pro/OpenOffice/rpm/install/en-US/RPMS/package_arch.rpm | cpio --extract
Warning : can't use * (globing) with rpm2cpio
If need to restore few files, rpm come from this archive :
/home/mano/DEV23/instsetoo_native/unxlngx6.pro/OpenOffice/rpm/install/en-US_download/OOo_3.0.0_080721_unxlngx6_install.tar.gz
Try to run software:
$ openoffice.org3.0 /usr/bin/openoffice.org3.0: line 2: /opt/openoffice.org3.0/program/soffice: No such file or directory /usr/bin/openoffice.org3.0: line 2: exec: /opt/openoffice.org3.0/program/soffice: cannot execute: No such file or directory
So after looking:
$ mv /opt/openoffice.org3 /opt/openoffice.org3.0
Enjoy it !
To know milestone of a CVS repository:
$ cat /CVS/Repository ...
An example(from ericb2), with a child work space(cws):
$ cat CVS/Tag Tcws_dev300_wae4binfilter01
cws name is : cws_dev300_wae4binfilter01, master workspace is dev300 (DEV300)
To download a module of this cws :
$ cvs -z4 co -r cws_dev300_wae4binfilter01 module
22/07/08: Seamonkey source first look
I modified moz/makefile.mk, to take seamonkey-1.1.11.source.tar.gz
Changed var MOZILLA_VERSION (1.7.5 to 1.1.11) in Linux_arch**.sh
Create unxlngx6.pro/misc/seamonkey-source-1.1.11.unpack:
$ cd unxlngx6.pro/misc/ $ echo "sh -c \"tar -xf ../../../download/seamonkey-1.1.11.source.tar.gz\"" > seamonkey-source-1.1.11.unpack
Now dmake in moz subdir give me a general idea of the job
23/07/08 - 28/07/08 Get first patch
Theoretically Plane:
1) build on moz -> applies the patch, and fails
2) guessing the patch is unified, create a directory, and put all the .rej created during the patch application ( triggered by "build" )
3) once you are sure you collected *all* the .rej (in the unxlngx6.pro)
4) using whatever editor, remove all rejected hunks
5) once you are sure you try to start a new build
6) the patch must work, means, the patch application must no longer cause a breakage, this patch will be the starting point
Pratical:
Save patch to seamonkey-source-1.1.11.patch.1 (initial patch with errors)
Patch seamonkey source with the last mozilla patch:
$ dmake patch
Of course if failed, fuzz and offset are ok, when an hunk cannot be applied it is put in a rej file
To find each rej file:
$ find unxlngx6.pro -name "*.rej" -exec \echo {} \;
We need to know the location of each rej file, I save it in a file named index:
$ find unxlngx6.pro -name "*.rej" -exec \echo {} \ > work/rej_hunks/index;
Now move them in a new directory:
$ mkdir work/rej_hunks $ find unxlngx6.pro -name "*.rej" -exec \mv {} work/rej_hunks/ \; (warning: files could have the same name)
Now I edit patch to remove each invalided hunks,
$ emacs seamonkey-source-1.1.11.patch
Save patch to seamonkey-source-1.1.11.patch.2 (initial patch with no errors)
Many hunks are on unfounded files, It's block configure, I move them in a new directory:
$ mkdir work/unfounded_files
Save patch to seamonkey-source-1.1.11.patch.3 (initial patch with no unfounded files)
Ok configure Now
28/07/08 - 31/07/08 Seamonkey And OpenOffice configure:
Now the seamonkey configure is running :
configure: error: --enable-application=APP is required
Need to add --enable-application=suite to the makefile.mk in the MOZ configuration flag section
To go away in the setup we need to replaced all rejected hunks
Need to change the OpenOffice checking in config_office/configure.in
$ cd config_office $ emacs configure.in
Here the diff :
< MOZILLA_VERSION=1.1.11 > MOZILLA_VERSION=1.7.5 < MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source" > MOZILLA_SOURCE_VERSION="mozilla-source-${MOZILLA_VERSION}" < http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/]) > http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla$MOZILLA_VERSION/source/])
To generate the new script:
$ autoconf configure.in > configure
12/07/08 - 22/07/08 Replaced invalided hunks:
Theoretically Plane:
1) remove the old build tree
2) create a new tree, and stop after applying the patch ($ dmake patch)
3) add one, or several hunks, manually (using whatever editor), do once done : ($ dmake create_patch)
4) repeat until all rejected hunks are included
Pratical:
dmake create_patch : Create a new patch (with a diff), rename the older with .bak
$ rm -rf unxlngx6.pro $ dmake patch
Create few folder which help us in our work:
$ mkdir work/hunks_replaced hunks which cannot be applied directly because the code or filename has changed $ mkdir work/already_here hunks already there in new source (hunks concerning syntax, standard, perf ...) $ mkdir work/ask_hunks hunks when we are not sure what to do or how apply them.
The different steps are, understand the hunk, why it cannot be apply, and apply it manually
Each time we need to create new patch:
$ cat one.ex.rej | more (show the different hunks) $ emacs one.ex (edit the concerning file, add hunks manually) $ dmake create_patch (make a new patch with the last hunks) $ diff seamonkey-source-1.1.11.patch seamonkey-source-1.1.11.patch.bak (to be sure of the changed) $ mv work/rej_hunks/one.ex.rej work/hunks_replaced/ (move the rej file in the correct folder)
After each rej file added, make a save of the patch.
QA checking of migration
I report all of hunks, so some of them are useless:
check : no error during build with DSO_LDOPTS (mozilla/security/coreconf/Linux.mk) check : nsAbMD5sum.cpp is found and compile correctly (mozilla/mailnews/addrbook/src) check : there isn't mozilla binary, and less prerequisites (mozilla/xpfe/bootstrap/Makefile.in) check : if problem to a lib which don't found dependancies in the courant folder (mozilla/security/nss/lib/freebl/)(mozilla/security/nss/lib/nss/) with sunOS or USE_64 (mozilla/security/nss/lib/smime/) with sunOS (mozilla/security/nss/lib/softoken/) with sunOS (mozilla/security/nss/lib/ssl/) with sunOS check : if sign.sh is found during build on win95 (mozilla/security/nss/cmd/shlibsign) check : if keep orginals cflags not makes problem (CFLAGS +=) (mozilla/security/coreconf)
check : no problem with the -norunpath flags (mozilla/) check : no problem with missing CYGWIN wrapper on other system that contain GNU_CC (mozilla/) check : if no problem to find CYGWIN-cWRAPPER (mozilla/) check : if no padding problem with MOZ_BUILD_ROOT, MOZ_TOOLS_DIR, _GLIB_PREFIX_DIR, _LIBIDL_PREFIX_DIR (mozilla/)
check : if no need HAVE_MMX_INTEL_MNEMONICS and HAVE_SSE2_INTEL_MNEMONICS on (XP_WIN32 and _M_IX86 and no __GNUC__) (mozilla/jpeg/) check : if no need moz config file in $HOME/ (mozilla/build/autoconf/mozconfig-find) check : if need the exp .uri in prefName string (now use uriPrefName) (mozilla/mailnews/addrbook/src/nsAbLDAPDirectory.cpp) check : if problem with string wPassword (mozilla/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp)
check : if the testMD5sum is ok on XP_PC or XP_MAC and other (mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp) check : if error is ok when getMD5sum failed (mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp)
check : if the string m_dbMd5Sum is found in mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp (mozilla/mailnews/addrbook/src/nsAddrDatabase.h) check : if no problem with WideCharToMultiByte on win32 (mozilla/widget/src/windows/nsDataObj.cpp)(mozilla/xpfe/bootstrap/nsNativeAppSupportWin.cpp)(mozilla/widget/src/windows/nsWindow.cpp x4 in) check : if no problem with wcsncpy on win32 (mozilla/widget/src/windows/nsFilePicker.cpp) check : if FTC_ImageType is found and correct (mozilla/gfx/src/ps/nsFontMetricsPS.h) check : if NS_PTR_TO_INT32(safer on 64bit) work (mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp) check : if no problem with gResolver->resolve on win32 (mozilla/xpcom/io/nsLocalFileWin.cpp) check : if no problem with wcsncpy, wcslen and reinterpret_cast<PRUnichar*> on win32 (mozilla/mailnews/base/src/nsMessengerWinIntegration.cpp) check : if no problem RegQueryValueExW and RegOpenKeyExW on win32 (mozilla/uriloader/exthandler/win/nsOSHelperAppService.cpp)
check : if there are no more redefinition of IMR_RECONVERTSTRING, or APPCOMMAND_BROWSER_BACKWARD (mozilla/widget/src/windows/nsWindow.cpp) check : if WM_IME_REQUEST is not needed (mozilla/widget/src/windows/nsWindow.cpp) check : if no problem on win32 with MultiByteToWideChar (mozilla/widget/src/windows/nsWindow.cpp)
check : if no problem with PRUnichar on win32 (mozilla/xpcom/base/nscore.h) check : if all librabry are find and correctly imported (mozilla/nsprpub/config/rules.mk) check : if no error during MK_PROG or LINK_DLL (mozilla/security/coreconf/rules.mk) check : if isn't conflict with mozabspath (mozilla/security/coreconf/rules.mk x4 in)
Begin build on different OS
Need to download the latest source of SeaMonkey which can be find here:
http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/1.1.11/
Need to place them in moz/download/
I use the next config line:
./configure --with-lang=fr --with-dict=ALL --without-fonts --enable-libsn --with-system-zlib --with-epm=internal --with-use-shell=bash