OS/2, eCS & ArcaOS - Technical > Programming

Building SeaMonkey 2.49.x in 2022 in ArcaOS

(1/3) > >>

Edmund Wong:
Hi,

I'm opting to create a new topic (as opposed to posting to the old thread "how to build SeaMonkey" as it's 5 years down the road and I think some things have changed somewhat.

Anyway, I think I have everything I need to build SeaMonkey 2.49.x (minus my memory of building it when it was released some time ago). 

Code setup is the following:

Main root dir is d:/work52.

Comm-esr52 is in d:/work52/build  [using SEAMONKEY_2_49_RELBRANCH]
Mozilla-esr52 is in d:/work52/build/mozilla   [using SEAMONKEY_2_49_RELBRANCH]

OBJDIR should be in d:/work52/objdir

I have this in my "moz_os2_env.txt":


--- Code: ---set SHELL=sh.exe
set EMXSHELL=sh.exe
set CONFIG_SHELL=sh.exe
set MAKESHELL=SH.EXE
set EXECSHELL=SH.EXE
set LANG=en_US
set MOZOCONFIG=d:/work52/build/.mozconfig
set AUTOCONF=/usr/bin/autconf213
set YASM=nasm
set LIBJPEG_TURBO_AS=nasm
set RANLIB=echo
set LIBS=-lcx -lkai
set EMXOMFLD_RC_TYPE=WRC
set EMXOMFLD_RC=wrc.exe

set TEMP=d:\temp
set TMP=d:\temp
set TMPDIR=d:\temp


--- End code ---

Here's my .mozconfig:


--- Code: ---mk_add_options MOZ_OBJDIR=d:/work52/objdir
mk_add_options MOZ_BUILD_PROJECT=suite
# mk_add_options MOZ_CO_PROJECT=suite
# mk_add_options MOZ_PGO=0
mk_add_options MOZ_MAKE_FLAGS="-j2"
ac_add_options --enable-application=suite

ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --disable-debug


--- End code ---

here is what I did:

1) cd d:/work52/build
2) make -f client.mk   [also tried python2.7 mozilla/mach build]

Got the following:


--- Code: ---# make -f client.mk
echo 0
SYS1041: The name MOZ_PGO is not recognized as an internal or external command, operable program or batch file.
SYS0003: The system cannot find the path specified.
client.mk:204: d:/work52/objdir/.mozconfig.mk: No such file or directory
mkdir -p 'd:/work52/objdir/'
SYS1003: The syntax of the command is incorrect.
make: *** [d:/work52/objdir/.mkdir.done] Error 1


--- End code ---

I am guessing my confusion (again) is with what type of path to use.

So I changed the "d:/work52" to "/work52" and tried again.  Similar result.


--- Code: ---# make -f client.mk
SYS1041: The name MOZ_PGO is not recognized as an internal or external command, operable program or batch file.
SYS0003: The system cannot find the path specified.
client.mk:204: /work52/objdir/.mozconfig.mk: No such file or directory
mkdir -p '/work52/objdir/'
SYS1003: The syntax of the command is incorrect.
make: *** [/work52/objdir/.mkdir.done] Error 1

--- End code ---

From my initial check, that MOZ_PGO comes from client.mk's line. 


--- Code: ---# Also, make MOZ_PGO available to mozconfig when passed on make command line.
MOZCONFIG_CONTENT := $(subst ||,$(CR),$(subst || ,$(CR),$(shell MOZ_PGO=$(MOZ_PGO) $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) | sed 's/$$/||/')))
$(eval $(MOZCONFIG_CONTENT))


--- End code ---

Setting MOZ_PGO=0 in the .mozconfig makes no difference.  I still get this error. 

I'm thinking it might be something related to that "$(shell MOZ_PGO=..." part.  Though  I don't know why.

Any help appreciated.

Edmund

Dave Yeo:

--- Quote from: Edmund Wong on December 23, 2022, 02:33:13 am ---Hi,

I'm opting to create a new topic (as opposed to posting to the old thread "how to build SeaMonkey" as it's 5 years down the road and I think some things have changed somewhat.

Anyway, I think I have everything I need to build SeaMonkey 2.49.x (minus my memory of building it when it was released some time ago). 

Code setup is the following:

Main root dir is d:/work52.

Comm-esr52 is in d:/work52/build  [using SEAMONKEY_2_49_RELBRANCH]
Mozilla-esr52 is in d:/work52/build/mozilla   [using SEAMONKEY_2_49_RELBRANCH]

--- End quote ---

Is that the patched version? There are a lot of OS/2 specific patches including reversing all the OS/2 stuff that Mozilla removed. Plus patches to build with GCC 9.2.0
Also need,
mozilla/extensions/inspector
mozilla/extensions/irc #Chatzilla
client.py with the right arguments can pull them in if mercurial behaves or just get the URL's from client.py or, it's been awhile, maybe I ended up commiting them to my tree.
I haven't built in a while.


--- Quote ---OBJDIR should be in d:/work52/objdir

--- End quote ---

Good there is a subtle bug when using relative paths. Also need the drive letter as the linker was originally written for DOS and uses / and - for arguments, the drive letter says it is a path.


--- Quote ---I have this in my "moz_os2_env.txt":

--- End quote ---

make it "moz_os2_env.cmd" so you can run it. OS/2 uses .cmd for batch (and REXX) files, .bat for DOS batch files.

--- Quote ---
--- Code: ---set SHELL=sh.exe
set EMXSHELL=sh.exe
set CONFIG_SHELL=sh.exe
set MAKESHELL=SH.EXE
set EXECSHELL=SH.EXE
set LANG=en_US
set MOZOCONFIG=d:/work52/build/.mozconfig

--- End code ---
Typo, set MOZCONFIG=
You installed autoconf213?

--- Code: ---set AUTOCONF=/usr/bin/autconf213
set YASM=nasm
set LIBJPEG_TURBO_AS=nasm
set RANLIB=echo
set LIBS=-lcx -lkai
set EMXOMFLD_RC_TYPE=WRC
set EMXOMFLD_RC=wrc.exe

set TEMP=d:\temp
set TMP=d:\temp
set TMPDIR=d:\temp


--- End code ---

--- End quote ---

OK, I also have, (not sure if still needed, I usually use rc.exe rather then wrc.exe)
You need the toolkit installed as well for some multimedia stuff , os2tk45-*

--- Code: ---set DPATH=%UNIXROOT%\include\OS2TK45\msg;%DPATH%
set INCLUDE=%UNIXROOT%\usr\include\os2tk45\inc;%UNIXROOT%\usr\include\os2tk45

--- End code ---

--- Quote ---
Here's my .mozconfig:


--- Code: ---mk_add_options MOZ_OBJDIR=d:/work52/objdir
mk_add_options MOZ_BUILD_PROJECT=suite
# mk_add_options MOZ_CO_PROJECT=suite
# mk_add_options MOZ_PGO=0
mk_add_options MOZ_MAKE_FLAGS="-j2"
ac_add_options --enable-application=suite

ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --disable-debug


--- End code ---

--- End quote ---

I'll attach my mozconfig, it is a lot more involved plus I was abusing the ac_add_options --enable-optimize.


--- Quote ---here is what I did:

1) cd d:/work52/build
2) make -f client.mk   [also tried python2.7 mozilla/mach build]

--- End quote ---

sh mozilla/mach build or python2.7.exe mozilla/mach build
cmd gets confused sometimes with multiple dots in a name


--- Quote ---Got the following:


--- Code: ---# make -f client.mk
echo 0
SYS1041: The name MOZ_PGO is not recognized as an internal or external command, operable program or batch file.
SYS0003: The system cannot find the path specified.
client.mk:204: d:/work52/objdir/.mozconfig.mk: No such file or directory
mkdir -p 'd:/work52/objdir/'
SYS1003: The syntax of the command is incorrect.
make: *** [d:/work52/objdir/.mkdir.done] Error 1


--- End code ---

I am guessing my confusion (again) is with what type of path to use.

So I changed the "d:/work52" to "/work52" and tried again.  Similar result.


--- End quote ---

d:/work52 is correct.
Don't remember that error but if you aren't using a patched configure.in, it won't get far. client.mk should recreate the 2.13 configure's, might have to delete the three. parent, mozilla and mozilla/js.
You will have to also run autoconf (not autoconf213) in mozilla/nsprpub so configure is OS/2 friendly. And autoreconf -sfy in mozilla\js\src\ctypes\libffi. Need OS/2 libtool used as well as configure.
I also found the need for a config.site as well, in usr/local/share  or $PREFIX/share, or IIRC $CONFIG_SITE  Mostly needed to pull in some toolkit includes after the libc ones. Toolkit has its own ancient libc.

--- Code: ---export CFLAGS=-Zomf
export CXXFLAGS=-Zomf
export ASFLAGS=-Zomf
# K: is @unixroot here
export 'CPPFLAGS=-idirafter K:/usr/include/os2tk45'
export 'LIBS=-lcx'
export ranlib=echo

--- End code ---

is what I have.

I'm sure I'm forgetting stuff.
Edit, needed to rename mozconfig for here.
Edit: fix typos, also make sure you are using JFS as the file systems, the build creates tmp files over 2GB and dies with tmp* on a HPFS partition.

Dave Yeo:
My comm-45ESR tree,

--- Code: ---git clone https://dyeo@git.code.sf.net/p/cc-os2/code cc-os2-code
--- End code ---

Never finished adding 52ESR, now being lazy I would simply diff it against the official tree and start there without history, the history would still be in 45ESR.
And

--- Code: ---git clone https://dyeo@git.code.sf.net/p/mozilla-os2/code mozilla-os2-code
--- End code ---
Though I think you have it already.

Edmund Wong:

--- Quote from: Dave Yeo on December 23, 2022, 04:51:21 am ---My comm-45ESR tree,

--- Code: ---git clone https://dyeo@git.code.sf.net/p/cc-os2/code cc-os2-code
--- End code ---

Never finished adding 52ESR, now being lazy I would simply diff it against the official tree and start there without history, the history would still be in 45ESR.
And

--- Code: ---git clone https://dyeo@git.code.sf.net/p/mozilla-os2/code mozilla-os2-code
--- End code ---
Though I think you have it already.

--- End quote ---

Yes, I cloned it off your repo. 

Thanks

Edmund

Dave Yeo:
Eventually, when the build succeeds, you will need more packages for "make package" (done in $OBJDIR).
lxtite, zip, perhaps unzip and make always seems happy to find tar and wget though I don't think they're show stoppers.
lxlite strips and packs the exe and dlls

Navigation

[0] Message Index

[#] Next page

Go to full version