Hello, Well, I have to say that finally and after quite a bit of work and not understanding everything ... I succeed compiling the monster :-)
some questions stand unanswered: why do I need microsoft VC++ ? Isn't it possible to compile it just with gcc? Why does all my try to cvs after retrieving the tarball failed? Did I compile it the "best" way? using cl etc...(i'm really unsure) Well that'll be end of part I :-) here is a log of some hours of try/catch/retry/wait/yell... I'm using the cygwin "standard" install (I just installed nearly everything but Apache and MySQL ...) but it can help someone trying to compile xpcom... I'd rather have someone telling me that "it's nearly the way it should have been done"... Content of my .login file : ======================== CVSROOT=:pserver:[EMAIL PROTECTED]:/cvsroot MOZ_TOOLS=/home/JMC/moztools PATH=$MOZ_TOOLS/bin:$PATH export CVSROOT export MOZ_TOOLS export PATH Content of /home/JMC: ======================== $ cd /home/JMC $ ls mozilla_CVS_Backup moztools mozilla_CVS_Backup : contains my previous attempt :-( Content of /home/JMC/moztools : ======================== $ cd moztools $ ls bin include lib $ cd bin $ ls glib-1.2.dll gmodule-1.2.dll libIDL-0.6.dll shmsdos.exe gmake.exe gthread-1.2.dll nsinstall.exe uname.exe What I did - following instructions from http://lxr.mozilla.org/seamonkey/source/xpcom/doc/xpcom-standalone.html Every command was typed in the default cygwyn shell ================================================ $ cvs -z 3 co mozilla/client.mk U mozilla/client.mk $ cd mozilla $ ls CVS client.mk $ make -f client.mk pull_all BUILD_MODULES=xpcom ... (too many lines here. I just kept the end... ...everything in the cvsco.log file) ... U mozilla/xpcom/typelib/xpt/tests/PrimitiveTest.c U mozilla/xpcom/typelib/xpt/tests/SimpleTypeLib.c U mozilla/xpcom/typelib/xpt/tests/makefile.win U mozilla/xpcom/typelib/xpt/tools/.cvsignore U mozilla/xpcom/typelib/xpt/tools/Makefile.in U mozilla/xpcom/typelib/xpt/tools/makefile.win U mozilla/xpcom/typelib/xpt/tools/xpt_dump.c U mozilla/xpcom/typelib/xpt/tools/xpt_link.c U mozilla/xpcom/windbgdlg/.cvsignore U mozilla/xpcom/windbgdlg/Makefile.in U mozilla/xpcom/windbgdlg/makefile.win U mozilla/xpcom/windbgdlg/windbgdlg.cpp cvs server: warning: new-born mozilla/allmakefiles.sh has disappeared cvs server: warning: new-born mozilla/aclocal.m4 has disappeared cvs server: warning: new-born mozilla/configure has disappeared cvs server: warning: new-born mozilla/configure.in has disappeared cvs server: warning: new-born mozilla/Makefile.in has disappeared checkout finish: Tue Jul 30 21:29:43 2002 make[1]: Leaving directory `/home/JMC' I will not even try to do : configure --enable-standalone-modules=xpco since : cvs server: warning: new-born mozilla/configure has disappeared (And I do not have any configure file under /mozilla) So I just retried (to be sure) : $ make -f client.mk pull_all BUILD_MODULES=xpcom checkout start: Tue Jul 30 21:53:45 2002 cvs -q -z 3 co -P mozilla/client.mk mozilla/build/unix/modules.mk make[1]: Entering directory `/home/JMC' cvs -q -z 3 co -P -r NSPRPUB_PRE_4_2_CLIENT_BRANCH mozilla/nsprpub cvs -q -z 3 co -P mozilla/build mozilla/config mozilla/include mozilla/modules/l ibreg mozilla/string mozilla/xpcom mozilla/allmakefiles.sh mozilla/client.mk moz illa/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/Makefile.in cvs server: warning: new-born mozilla/allmakefiles.sh has disappeared cvs server: warning: new-born mozilla/aclocal.m4 has disappeared cvs server: warning: new-born mozilla/configure has disappeared cvs server: warning: new-born mozilla/configure.in has disappeared cvs server: warning: new-born mozilla/Makefile.in has disappeared checkout finish: Tue Jul 30 21:54:13 2002 make[1]: Leaving directory `/home/JMC' no, it seems i'll not retrieve those file easily ... So i started plan B : retrieve the complete mozilla tarball on http://www.mozilla.org/download-mozilla.html and choosed to try the : http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.0/src/mozilla-sourc e-1.0.tar.bz2 I then unziped it : $ bunzip2 mozilla-source-1.0.tar.bz2.tar bunzip2: Can't guess original name for mozilla-source-1.0.tar.bz2.tar -- using m ozilla-source-1.0.tar.bz2.tar.out since I'm not too accustomed to bunzip2 ... $ mv mozilla-source-1.0.tar.bz2.tar.out mozilla-source-1.0.tar $ tar -xvf mozilla-source-1.0.tar Well the amount of source code in there is simply incredible :-) but at least the configure script reappeared... http://www.mozilla.org/cvs.html is quite clear on : # and run ``cvs -z3 checkout -PA mozilla/client.mk'' in the same directory you unpacked the tarball, # then run ``make -f mozilla/client.mk checkout MOZ_CO_FLAGS=-PA'' so : $ pwd /home/JMC $ cvs -z3 checkout -PA mozilla/client.mk U mozilla/client.mk $ make -f mozilla/client.mk checkout MOZ_CO_FLAGS=-PA ... U mozilla/nsprpub/pr/tests/w16gui/poppad.rc U mozilla/nsprpub/pr/tests/w16gui/popprnt0.c U mozilla/nsprpub/pr/tests/w16gui/readme.1st U mozilla/nsprpub/tools/.cvsignore U mozilla/nsprpub/tools/Makefile.in U mozilla/nsprpub/tools/httpget.c U mozilla/nsprpub/tools/tail.c make[1]: *** [real_checkout] Error 1 make[1]: Leaving directory `/home/JMC' make: *** [checkout] Error 2 hum hum... just retried in case ... $ make -f mozilla/client.mk checkout MOZ_CO_FLAGS=-PA checkout start: Wed Jul 31 00:29:18 2002 cvs -q -z 3 co -PA mozilla/client.mk mozilla/build/unix/modules.mk make[1]: Entering directory `/home/JMC' cvs -q -z 3 co -PA -r NSPRPUB_PRE_4_2_CLIENT_BRANCH mozilla/nsprpub ? mozilla/nsprpub/build/cygwin-wrapper cvs checkout: move away mozilla/nsprpub/build/cygwin-wrapper; it is in the way C mozilla/nsprpub/build/cygwin-wrapper make[1]: *** [real_checkout] Error 1 make[1]: Leaving directory `/home/JMC' make: *** [checkout] Error 2 Well... If something is in the way... If one asks to move it so kindly :-) $ pwd /home/JMC/mozilla/nsprpub/build $ rm cygwin-wrapper $ cd /home/JMC $ make -f mozilla/client.mk checkout MOZ_CO_FLAGS=-PA It worked for a while and .... my computer crashed :-( so: $ make -f mozilla/client.mk checkout MOZ_CO_FLAGS=-PA BTW during the process cvs spit quite numerous : xxx is in the way... and finally ... U mozilla/layout/html/forms/public/nsITextControlFrame.h U mozilla/xpfe/global/resources/content/mozilla.xhtml U mozilla/xpfe/global/resources/locale/en-US/about.xhtml make[1]: *** [real_checkout] Error 1 make[1]: Leaving directory `/home/JMC' make: *** [checkout] Error 2 Well just retry, it's probably too long to be done in one time, or perhaps a time out on the socket connexion to the server $ make -f mozilla/client.mk checkout MOZ_CO_FLAGS=-PA cvs [checkout aborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: Pe rmission denied make[1]: *** [real_checkout] Error 1 make[1]: Leaving directory `/home/JMC' make: *** [checkout] Error 2 hum hum... That's the part where computers begin to get on my nerves... retried... some other errors etc... Well just assume that I got enough stuff to try compiling it (after all I retrieved a complete tarball of Mozilla and I'm just trying to compile xpcom)... So just to be sure: $make -f client.mk pull_all BUILD_MODULES=xpcom and try to compile : $ cd mozilla $ make -f client.mk pull_all BUILD_MODULES=xpcom checkout start: Wed Jul 31 09:02:40 2002 cvs -q -z 3 co -P mozilla/client.mk mozilla/build/unix/modules.mk make[1]: Entering directory `/home/JMC' cvs -q -z 3 co -P -r NSPRPUB_PRE_4_2_CLIENT_BRANCH mozilla/nsprpub cvs -q -z 3 co -P mozilla/build mozilla/config mozilla/include mozilla/modules/l ibreg mozilla/string mozilla/xpcom mozilla/allmakefiles.sh mozilla/client.mk moz illa/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/Makefile.in ? mozilla/build/cygwin-wrapper ? mozilla/build/package/mac_osx ? mozilla/build/package/rpm/SOURCES/mozilla-buildid-title.patch ? mozilla/build/package/rpm/SOURCES/mozilla-default-plugin-less-annoying.p atch ? mozilla/build/package/rpm/SOURCES/mozilla-rebuild-databases.pl.in ? mozilla/build/package/rpm/SOURCES/mozilla-redhat-default-bookmarks.html ? mozilla/build/package/rpm/SOURCES/mozilla.sh.in ? mozilla/build/unix/mozilla-nss.pc.in ? mozilla/build/unix/gnu-ld-scripts/components-mapfile ? mozilla/config/asdecode.cpp ? mozilla/config/prebind-address-table ? mozilla/xpcom/components/nsCategoryManager.h ? mozilla/xpcom/components/nsIComponentLoaderManager.idl ? mozilla/xpcom/ds/nsIRecyclingAllocator.idl ? mozilla/xpcom/ds/nsManifestLineReader.h ? mozilla/xpcom/glue/nsIInterfaceRequestorUtils.cpp ? mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp ? mozilla/xpcom/glue/standalone/nsXPCOMGlue.h ? mozilla/xpcom/io/nsNativeCharsetUtils.cpp ? mozilla/xpcom/io/nsNativeCharsetUtils.h ? mozilla/xpcom/proxy/public/nsProxyRelease.h ? mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp ? mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_darwin.s.m4 ? mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp ? mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_gcc_x86_unix.h cvs checkout: move away mozilla/build/cygwin-wrapper; it is in the way C mozilla/build/cygwin-wrapper cvs checkout: move away mozilla/build/package/mac_osx/make-diskimage; it is in t he way C mozilla/build/package/mac_osx/make-diskimage cvs checkout: move away mozilla/build/package/rpm/SOURCES/mozilla-buildid-title. patch; it is in the way C mozilla/build/package/rpm/SOURCES/mozilla-buildid-title.patch cvs checkout: move away mozilla/build/package/rpm/SOURCES/mozilla-default-plugin -less-annoying.patch; it is in the way C mozilla/build/package/rpm/SOURCES/mozilla-default-plugin-less-annoying.p atch cvs checkout: move away mozilla/build/package/rpm/SOURCES/mozilla-rebuild-databa ses.pl.in; it is in the way C mozilla/build/package/rpm/SOURCES/mozilla-rebuild-databases.pl.in cvs checkout: move away mozilla/build/package/rpm/SOURCES/mozilla-redhat-default -bookmarks.html; it is in the way C mozilla/build/package/rpm/SOURCES/mozilla-redhat-default-bookmarks.html cvs checkout: move away mozilla/build/package/rpm/SOURCES/mozilla.sh.in; it is i n the way C mozilla/build/package/rpm/SOURCES/mozilla.sh.in cvs checkout: move away mozilla/build/unix/mozilla-nss.pc.in; it is in the way C mozilla/build/unix/mozilla-nss.pc.in cvs checkout: move away mozilla/build/unix/gnu-ld-scripts/components-mapfile; it is in the way C mozilla/build/unix/gnu-ld-scripts/components-mapfile cvs checkout: move away mozilla/config/asdecode.cpp; it is in the way C mozilla/config/asdecode.cpp cvs checkout: move away mozilla/config/prebind-address-table; it is in the way C mozilla/config/prebind-address-table make[1]: *** [real_checkout] Error 1 make[1]: Leaving directory `/home/JMC' make: *** [checkout] Error 2 Well well well, I wonder if I'll get through it one day :-( since mozilla/build seems to be "in the way" I'll just remove mozilla/build $ rm -r build $make -f client.mk pull_all BUILD_MODULES=xpcom ... cvs checkout: move away mozilla/config/asdecode.cpp; it is in the way ... OK so $rm -r config $make -f client.mk pull_all BUILD_MODULES=xpcom ... checkout finish: Wed Jul 31 09:08:31 2002 make[1]: Leaving directory `/home/JMC' Wouffff .... I'll now try to compile $ pwd /home/JMC/mozilla $ ls CVS client.mak embedding layout security LEGAL client.mk expat lib string LICENSE config extensions mailnews sun-java Makefile.in configure gc makefile.win themes README configure.in gfx modules tools README.txt content gfx2 netwerk uriloader accessible db htmlparser nglayout.mk view aclocal.m4 dbm include nsprpub webshell allmakefiles.sh directory intl other-licenses widget build docshell jpeg plugin xpcom calendar dom js profile xpfe caps editor l10n rdf xpinstall At least I've got a configure script so : $ configure --enable-standalone-modules=xpcom well $ ./configure --enable-standalone-modules=xpcom seems successfull but ended on a warning: configure: warning: Recreating autoconf.mk with updated nspr-config output so go to last step gmake... or make since I'm on windows $ make make export make[1]: Entering directory `/home/JMC/mozilla' make[2]: Entering directory `/home/JMC/mozilla/config' Creating .deps make[3]: Entering directory `/home/JMC/mozilla/config/mkdepend' Creating .deps cppsetup.c cl -Focppsetup.obj -c -DOSTYPE=\"WINNT5.1\" -DOSARCH=\"WINNT\" -DOJI -DI NCLUDEDI R=\"/usr/include\" -DOBJSUFFIX=\".obj\" -I../../dist/include/mkdepend -I../../ dist/include -I../../dist/include/nspr -W3 -nologo -Gy -Fdcppse tup.pdb -DDEBUG -D_DEBUG -DDEBUG_Papa & ACING -Zi -MDd -D_WINDOWS=1 -D_WIN32=1 -DWIN32=1 -DXP_PC=1 -DXP_WIN=1 -DXP_WIN32=1 -DHW_THREADS=1 - DWINVER= 0x400 -DMSVC4=1 -DSTDC_HEADERS=1 -DNO_X11=1 -D_X86_=1 -DD_INO=d_ino -DMO Z_DEFAUL T_TOOLKIT=\"windows\" -DIBMBIDI=1 -DACCESSIBILITY=1 -DMOZ_MATHML=1 -DMOZ _LOGGING =1 -DDETECT_WEBSHELL_LEAKS=1 -DMOZ_USER_DIR=\".mozilla\" -DCPP_THROW_NEW =throw\( \) -DMOZ_XUL=1 -DINCLUDE_XUL=1 -DNS_MT_SUPPORTED=1 -DUSE_IMG2=1 -DMOZ_DL L_SUFFIX =\".dll\" -DXP_PC=1 -DJS_THREADSAFE=1 -DNS_PRINT_PREVIEW=1 -DMOZ_REFLOW_ PERF=1 - DMOZ_REFLOW_PERF_DSP=1 -DMOZILLA_CLIENT ./cppsetup.c cl: not found Maman: not found make[3]: *** [cppsetup.obj] Error 127 make[3]: Leaving directory `/home/JMC/mozilla/config/mkdepend' make[2]: *** [export] Error 2 make[2]: Leaving directory `/home/JMC/mozilla/config' make[1]: *** [export] Error 2 make[1]: Leaving directory `/home/JMC/mozilla' make: *** [all] Error 2 What is cl ??? Seems from configure file that it try using cl.exe as a C compiler? -> google search no... it uses it as a C preprocessor (since cl.exe is the visual C++ preprocessor) but why since I'm using cygwin and make etc... tried adding CC=gcc in my .profile file and rerun configure ... no looking at configure output : checking host system type... i586-pc-msvc checking target system type... i586-pc-msvc checking build system type... i586-pc-msvc if msvc stands for "use the microsoft compiler" i'm in troubles... I want to use cygwin gcc! removed config.cache rerun ./configure retry ... nope modified my cygwin.bat to include msvc path : cygwin.bat now looks like : @echo off rem rem Root of Visual Developer Studio Common files. set VSCommonDir=C:\PROGRA~1\MICROS~3\Common rem rem Root of Visual Developer Studio installed files. rem set MSDevDir=C:\PROGRA~1\MICROS~3\Common\msdev98 rem rem Root of Visual C++ installed files. rem set MSVCDir=C:\PROGRA~1\MICROS~3\VC98 rem rem VcOsDir is used to help create either a Windows 95 or Windows NT specific path. rem set VcOsDir=WIN95 if "%OS%" == "Windows_NT" set VcOsDir=WINNT rem echo Setting environment for using Microsoft Visual C++ tools. rem if "%OS%" == "Windows_NT" set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\%VcOsDir%;%VSCommo nDir%\TOOLS;%PATH% if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDir%\TOOLS\%VcOsDir%";"% VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%" set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%I NCLUDE% set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB% set VcOsDir= set VSCommonDir= @echo off C: chdir C:\cygwin\bin bash --login -i and then $ ./configure --enable-standalone-modules=xpcom $ make didn't work due to a DEBUG flag on the command line referencing a path with space in... I didn't found out why and where that path was set... so I move for $ ./configure --enable-standalone-modules=xpcom --disable-debug $ make ok great go to C:\cygwin\home\JMC\mozilla\dist\bin launch nsTestSample.exe and get : Inital print: initial value Set value to: XPCOM defies gravity Final print : XPCOM defies gravity Test passed. so it work...
