Author Topic: Building SeaMonkey 2.49.x in 2022 in ArcaOS  (Read 1660 times)

Edmund Wong

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Building SeaMonkey 2.49.x in 2022 in ArcaOS
« 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]

OBJDIR should be in d:/work52/objdir

I have this in my "moz_os2_env.txt":

Code: [Select]
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


Here's my .mozconfig:

Code: [Select]
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


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: [Select]
# 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


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: [Select]
# 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

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

Code: [Select]
# 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))


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

  • Hero Member
  • *****
  • Posts: 4511
  • Karma: +92/-1
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #1 on: December 23, 2022, 04:43:06 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]

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

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":

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: [Select]
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
Typo, set MOZCONFIG=
You installed autoconf213?
Code: [Select]
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


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: [Select]
set DPATH=%UNIXROOT%\include\OS2TK45\msg;%DPATH%
set INCLUDE=%UNIXROOT%\usr\include\os2tk45\inc;%UNIXROOT%\usr\include\os2tk45
Quote

Here's my .mozconfig:

Code: [Select]
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


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]

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: [Select]
# 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


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.


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: [Select]
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

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.
« Last Edit: December 23, 2022, 05:04:11 am by Dave Yeo »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4511
  • Karma: +92/-1
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #2 on: December 23, 2022, 04:51:21 am »
My comm-45ESR tree,
Code: [Select]
git clone https://dyeo@git.code.sf.net/p/cc-os2/code cc-os2-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: [Select]
git clone https://dyeo@git.code.sf.net/p/mozilla-os2/code mozilla-os2-codeThough I think you have it already.

Edmund Wong

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #3 on: December 23, 2022, 05:52:13 am »
My comm-45ESR tree,
Code: [Select]
git clone https://dyeo@git.code.sf.net/p/cc-os2/code cc-os2-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: [Select]
git clone https://dyeo@git.code.sf.net/p/mozilla-os2/code mozilla-os2-codeThough I think you have it already.

Yes, I cloned it off your repo. 

Thanks

Edmund

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4511
  • Karma: +92/-1
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #4 on: December 24, 2022, 04:05:11 am »
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

Edmund Wong

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #5 on: December 28, 2022, 01:32:59 am »

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.

Yes, I  had cloned the dom-inspector and chatzilla to mozilla/extensions. 

Quote
Code: [Select]
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
Typo, set MOZCONFIG=

Ah thanks.  Fixed.

Quote
You installed autoconf213?

Yes, except that I had used "set AUTOCONF=/usr/bin/autoconf213".

I changed that to "set AUTOCONF=c:/usr/bin/autoconf213"

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.

Where would I get the patched configure.in file?   Would it already be in the repo that you linked?

Quote
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.

Did that.

Quote
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.

What is config.site?

Quote
Code: [Select]
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

is what I have.

Pardon my confusion; but where do I put this?  in moz_os2_env.cmd?

Quote
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.

Yes, after fiddling around with ArcaOS, I ended up settling with JFS.

After that, I'm still getting:


Code: [Select]
[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


Note: the "echo 0" is a test line that I added to client.mk to show what MOZ_PGO is.

Thanks

Edmund

Edmund Wong

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #6 on: December 28, 2022, 02:17:44 am »
Feeling somehow that I'm screwing up the environment, I closed all my command prompts
and re-ran moz_os2_env.cmd.

Then in the command prompt (not sh.exe), I ran "make -f client.mk" and got somewhere.

Code: [Select]
echo
Adding client.mk options from /work52/build2/.mozconfig:
    MOZ_OBJDIR=d:/work52/objdir
    MOZ_CO_PROJECT=suite
    MOZ_MAKE_FLAGS=-j2
    FOUND_MOZCONFIG := /work52/build2/.mozconfig
echo
make[1]: Entering directory `D:/work52/build2'
cd d:/work52/objdir
D:/work52/build2/configure
D:/work52/build2/configure: 26: D:/work52/build2/configure: which: not found
D:/work52/build2/configure.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Traceback (most recent call last):
  File "D:/work52/build2/configure.py", line 14, in <module>
    from mozbuild.configure import ConfigureSandbox
  File "D:/work52/build2/mozilla/python/mozbuild/mozbuild/configure/__init__.py", line 31, in <module>
    from mozbuild.util import (
  File "D:/work52/build2/mozilla/python/mozbuild/mozbuild/util.py", line 155
    except OSError, error:
                  ^
SyntaxError: invalid syntax
*** Fix above errors and then restart with\
               "make -f client.mk build"
make[1]: *** [configure] Error 1
make[1]: Leaving directory `D:/work52/build2'
make: *** [d:/work52/objdir/Makefile] Error 2

I'm confused as this kind of error typically means I'm using python3 on python2 code.

The even more confusing thing is while I can run "python -V"  (which outputs 3.9.13) in a command window (not using sh.exe),  I can't use python2.7 (outputs : SYS0193: C:\USR\BIN\PYTHON2.7.exe cannot be run in an OS/2 session).

Should I be using 'sh.exe'?   Further should I have upgraded python to 3?  I'm feeling this might be an issue.

Any help appreciated.

Thanks

Edmund

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4511
  • Karma: +92/-1
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #7 on: December 28, 2022, 03:18:58 am »
I think your environment is still screwed up. On OS/2 make defaults to using cmd.exe for its shell, SET MAKESHELL=sh.exe changes it. SET MAKESHELL by itself will display it. We need to use sh.exe as the makeshell.
45 ESR configure doesn't use Python, and mach is ran as sh mach, it will find Python2. I haven't built on my partition with Python3 for quite a while, there was a crash in the resources wrapper but mach would then succeed and then recrash while exiting. Getting resources doesn't work anyways.
Config.site is a file that gets read at the beginning of a configure run to set up the environment etc. By default it should be on your build volume in /usr/local/share/config.site or $PREFIX/share/config.site with /usr/local being the default prefix.
Lets start over, here's my mozenv.cmd,
Code: [Select]
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
rem make sure to use an absolute pathname for %MOZCONFIG%
rem set MOZCONFIG=/work/cc45esr/.mozconfig
rem set AUTOCONF=/usr/bin/autoconf213
REM needed to find ilink and rc from the toolkit

set DPATH=%UNIXROOT%\include\OS2TK45\msg;%DPATH%
set INCLUDE=%UNIXROOT%\usr\include\os2tk45\inc;%UNIXROOT%\usr\include\os2tk45
set YASM=nasm
set LIBJPEG_TURBO_AS=nasm
set RANLIB=echo
set LIBS=-lcx -lkai
REM Wlink stuff
set EMXOMFLD_TYPE=WLINK
set EMXOMFLD_LINKER=wl.exe DISA 121,58

REM Wrc stuff
set EMXOMFLD_RC_TYPE=WRC
set EMXOMFLD_RC=wrc.exe

rem tmp files
rem set TEMP=K:\var\temp
rem set TMP=K:\var\temp
rem set TMPDIR=K:\var\temp

rem misc stuff
set PYTHON=python2.7.exe
set PATH=%UNIXROOT%\usr\libexec\bin;%PATH%
SET GCCOPT=-static-libgcc

Open a cmd prompt and run mozenv, set MOZCONFIG or add it to mozenv.cmd, I have ones for Thunderbird etc, then make -f client.mk and see how it goes. Pretty sure everything is in the repo's.
You will find more stuff that you haven't installed such as which, so "YUM install which"


Edmund Wong

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #8 on: December 28, 2022, 05:52:28 am »
45 ESR configure doesn't use Python, and mach is ran as sh mach, it will find Python2. I haven't built on my partition with Python3 for quite a while, there was a crash in the resources wrapper but mach would then succeed and then recrash while exiting. Getting resources doesn't work anyways.


I think this and a previous note finally clued into what I might be doing wrong.   I thought I was building ESR52. 

Sorry for being stupid.   Now, it's finally doing the configuring.

So to build ESR52, I need to merge the actual ESR52 repos with the current one I have?

Thanks

Edmund

Edmund Wong

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #9 on: December 28, 2022, 06:07:47 am »
There were mentions of ilink in your message and have come across the fact that I don't have it on my system.

I have installed the OS2tk45 packages; but no ilink.exe. 

I did a "yum whatprovides ilink"  but got nothing. 

Any help appreciated.

Thanks

Edmund


Dave Yeo

  • Hero Member
  • *****
  • Posts: 4511
  • Karma: +92/-1
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #10 on: December 28, 2022, 06:43:41 am »
Hi Edmund, yes 52ESR has a different build system. It is master in my Mozilla repo and you need to check out 45ESR or such, check the branches.
Dmitriy merged in 52.4 IIRC so basically the 45ESR patches are merged in but there were lots of changes. I managed to patch the old.configure.in's and configure.py's enough to start compiling, they need work such as sound support and short DLL names (or just change the long dll names), DLL's have to be in 8.3 format.
For SeaMonkey, there is only the 45ESR (and older) in the repo. Getting Firefox 52ESR to build should be the next step after building SeaMonkey. I guess I need to revisit applying the patches for Comm-central.

As for ilink, it is the IBM linker, IBM released it, and licensed it, for building Mozilla. Around Firefox 4-10 debug xul.dll became too big for ilink to link so we switched to wlink (wl.exe), which we have the source and a maintainer. Wlink also needed fixing to link xul. For a while, needed the whole address space to link.

Edmund Wong

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #11 on: December 28, 2022, 10:38:58 am »
Hi Edmund, yes 52ESR has a different build system. It is master in my Mozilla repo and you need to check out 45ESR or such, check the branches.
Dmitriy merged in 52.4 IIRC so basically the 45ESR patches are merged in but there were lots of changes. I managed to patch the old.configure.in's and configure.py's enough to start compiling, they need work such as sound support and short DLL names (or just change the long dll names), DLL's have to be in 8.3 format.
For SeaMonkey, there is only the 45ESR (and older) in the repo. Getting Firefox 52ESR to build should be the next step after building SeaMonkey. I guess I need to revisit applying the patches for Comm-central.

I apologize for being so confused.   I took a look at the version.txt in both comm and mozilla/browser/config and
noticed that they were indeed based on 52esr.  (2.49.9esr and 52.4.x respectively).

sh mozilla\mach build outputs :

Code: [Select]
0:05.62 C:/USR/BIN/make.EXE -f client.mk MOZ_PARALLEL_BUILD=2 -s configure
 0:05.78 test
 0:05.88 echo
 0:06.84 cd d:/work52/objdir
 0:06.84 D:/work52/build/configure
Configure complete!
Be sure to run |mach build| to pick up any changes
 0:07.03 C:/USR/BIN/make.EXE -f client.mk MOZ_PARALLEL_BUILD=2 -s
 0:07.14 test
 0:07.26 echo
 0:08.05 Adding client.mk options from /work52/build/.mozconfig:
 0:08.05     MOZ_OBJDIR=d:/work52/objdir
 0:08.05     MOZ_CO_PROJECT=suite
 0:08.05     MOZ_MAKE_FLAGS=-j2
 0:08.05     FOUND_MOZCONFIG := /work52/build/.mozconfig
 0:08.09 test
 0:08.22 echo
 0:09.05 cd d:/work52/objdir
 0:09.05 D:/work52/build/configure
 0:09.09 make.EXE[1]: *** No targets.  Stop.
 0:09.09 make.EXE: *** [build] Error 2
 0:09.09 0 compiler warnings present.

So I should use "mozilla\mach build"; but I get:

Code: [Select]
[D:\work52\build]mozilla\mach build
SYS1041: The name mozilla\mach is not recognized as an
internal or external command, operable program or batch file.

Looking at the mozilla\mach code, it does make sense to use "sh mozilla\mach build".

Quote
As for ilink, it is the IBM linker, IBM released it, and licensed it, for building Mozilla. Around Firefox 4-10 debug xul.dll became too big for ilink to link so we switched to wlink (wl.exe), which we have the source and a maintainer. Wlink also needed fixing to link xul. For a while, needed the whole address space to link.

How do I get the build process to use wl instead of ilink?   

Thanks

Edmund

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4408
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #12 on: December 28, 2022, 03:36:49 pm »
Hi Edmund.

ILink: There are several version on hobbes: https://hobbes.nmsu.edu/?search=ilink

WLink: Is on "yum install watcom-wlink-hll" I don't know if there is another source.
         FYI: I found it by running "yum whatprovides */wl.exe"

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4511
  • Karma: +92/-1
    • View Profile
Re: Building SeaMonkey 2.49.x in 2022 in ArcaOS
« Reply #13 on: December 28, 2022, 07:28:31 pm »
Hi Edmund, sorry to say, I guess we've both been confused. I thought the idea was that you would start out by building SeaMonkey 2.42.9 to get your environment straightened out and learn a bit about building on OS/2.
Obviously there was a miscommunication somewhere including the need to pull and checkout ESR45 or perhaps I screwed up in my understanding of git pull.
I just pulled mozilla-os2, and yes, it was the 52esr branch. I did this, the checkout takes a while and hopefully doesn't run out of memory.
Code: [Select]
G:\sourceforge\mozilla-os2>git branch
* master

G:\sourceforge\mozilla-os2>git branch esr45

G:\sourceforge\mozilla-os2>git checkout esr45
Switched to branch 'esr45'

G:\sourceforge\mozilla-os2>git branch
* esr45
  master

I thought this was enough, but
Code: [Select]
G:\sourceforge\mozilla-os2>cat browser/config/version.txt
52.4.0

So,

Code: [Select]
G:\sourceforge\mozilla-os2>git reset --hard origin/esr45
Checking out files: 100% (76258/76258), done.
HEAD is now at 35467cfcff Merge branch 'gcc' into esr45

G:\sourceforge\mozilla-os2>cat browser/config/version.txt
45.9.0

So don't know if this is normal or a flaw in our git port.
Cc-os2 master should be at the 45.8 (SM2.42.9) level
For building with mach, I have little cmd files, for SeaMonkey, build_sm.cmd,
Code: [Select]
set MOZCONFIG=/work/cc45-git/.mozconfig.sm
sh mozilla/mach -l build_mach_sm.log build 2>&1 | tee build_sm.log

Which almost works perfectly, there's a bug shown up where ffi.lib isn't built so I manually run make after the configure step is over in $OBJDIR/mozilla/js/src/ctypes/libffi.
Once again, sorry for not being clear.
As for choice in linkers, with -Zomf, GCC calls emxomfld which reads the environment. If you run emxomfld (perhaps piping though less), you get the environment variables that need set,
Code: [Select]
Environment variables:
  EMXOMFLD_TYPE:
    The type of linker we're using. Values: WLINK, VAC365, VAC308, LINK386.
        WLINK    wlink.exe from Open Watcom v1.5 or later.
        VAC365   ilink.exe from IBM C and C++ Compilers for OS/2 v3.6 or later.
        VAC308   ilink.exe from Visual Age for C++ v3.08.
        LINK386  link386 form OS/2 install or DDK.
  EMXOMFLD_LINKER:
    Name of the linker to use and optionally extra parameters. Spaces in the
    linker name or path is not supported. Quotes are not supported either.
The default values for these two variables are VAC365 and ilink.exe.
  EMXOMFLD_RC_TYPE:
    The type of resource compiler we're using. Values: RC,WRC.
        RC       rc.exe as shipped with OS/2 or found in the Toolkit
        WRC      wrc.exe from Open Watcom v1.6 or later.
  EMXOMFLD_RC:
    Name of the resource compiler to use and optionally extra parameters.
    Spaces or quotes in the name or path are not supported.
The default values for these two variables are RC and rc.exe.

Yum installs wl.exe which started out as a patched version of wlink.exe, patched to support HLL debug symbols. Now the changes have been committed to OpenWatcom so installing the latest OpenWatcom wlink would also work fine.