OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Laurenz Sommer on June 04, 2017, 04:41:54 pm

Title: How to build Seamonkey?
Post by: Laurenz Sommer on June 04, 2017, 04:41:54 pm
Hello,
I am new to this forum, so I'd like to write a few words about myself:
I am 21 years old and studying mechanical engineering in Aachen, Germany. In my leisure I like to tinker with old Computers and so I found out about OS/2 in 2014. At the moment my main laptop for OS/2 is a HP tc4400 from 2007 running OS/2 Warp 4 Convenience Package 2 with FixPak 6. My knowledge about programming is limited but I wrote a few small programs in Java and REXX.
And now to my Problem:
I am trying to build Seamonkey 2.42 from the sources (in the end i want to create a german version of it, but this may be step two or three). With ANPM I installed everything mentioned in this post https://github.com/bitwiseworks/mozilla-os2/issues/82#issuecomment-59601735 (https://github.com/bitwiseworks/mozilla-os2/issues/82#issuecomment-59601735) except mozftcfgft because I don't know where to get it and was not sure if it is needed for the current version. Additionally I installed the "...-devel" package of every package needed to run Seamonkey. Unfortunately I found no list of build requirements for the current version. I installed mercurial and git and downloaded the sources according to the build.os2 for Seamonkey. I did not find the described mozconfig file so i used the one from https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/OS2_Build_Prerequisites/Building_on_OS2_using_Mercurial (https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/OS2_Build_Prerequisites/Building_on_OS2_using_Mercurial):
Code: [Select]
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj

ac_add_options --enable-application=suite
ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --disable-debug
and set MOZCONFIG to use it.

Then I started
Code: [Select]
make -f client.mk 2>&1 | tee build.log but this failed with
Code: [Select]
configure: error: yasm is a required build tool for this architecture when webm is enabled. You may either install yasm or --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details.
I reread the github thread mentioned above and run the commands posted by dmik in sh.exe to set the environment settings. I did not set CFLAGS="-march=i486 -mtune=i686" and CXXFLAGS="-march=i486 -mtune=i686" because that caused the make command to fail with
Code: [Select]
checking for EMX/OS2 environment... no
checking for executable suffix... configure: error: installation or configuration problem: compiler cannot create executables.
. It still failed because of missing yasm so I set YASM=nasm.exe and LIBJPEG_TURBO_AS=nasm.exe. This worked (at least it didn't fail at this point) but now it fails with the message:
Code: [Select]
configure: error: ECMAScript Internationalization API is not yet supported on this platformI have no clue what this means.

I am pretty sure that I have missed some steps to set up the build environment, so I would be very happy if someone has a step by step instruction or at least a list of required environment settings and development packages.

Many thanks, Laurenz
Title: Re: How to build Seamonkey?
Post by: André Heldoorn on June 04, 2017, 05:56:04 pm
(in the end i want to create a german version of it, but this may be step two or three)

What about just installing SM and a German language package (e.g. https://ftp.mozilla.org/pub/seamonkey/releases/2.40/langpack/ (https://ftp.mozilla.org/pub/seamonkey/releases/2.40/langpack/))?

You may have to edit the langpack text file install.rdf (unzip the XPI file) to support SM 2.42: if 2.42 was no official release, if 2.40 is the latest langpack before 2.42, and if 2.40's langpack supports the range 2.40-2.40.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 04, 2017, 06:29:15 pm
I tried this already,  but the language packages for Seamonkey 2.40 (and 2.46) are not installable on 2.42, when I edit the version number in the file install.rdf inside the package to make it installable this leads to an unusable Browser (menu bar missing, pages don't load).
But a german Seamonkey is not the only reason to build it myself, I am very interested to see how it works, too.
Title: Re: How to build Seamonkey?
Post by: André Heldoorn on June 04, 2017, 06:44:15 pm
IC, I'm not using 2.42 and prefer a non en_US version too.

Regarding DIY: I guess you have contact Dave Yeo, by email. It looks like he's using components which weren't GA yet, like a LIBCX DLL. If anything you can tell him the CRC32-checksum of your compiled EXE, and if there's a match then you can upload yours. :)
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 04, 2017, 08:54:39 pm
Hello,
I am new to this forum, so I'd like to write a few words about myself:
I am 21 years old and studying mechanical engineering in Aachen, Germany. In my leisure I like to tinker with old Computers and so I found out about OS/2 in 2014. At the moment my main laptop for OS/2 is a HP tc4400 from 2007 running OS/2 Warp 4 Convenience Package 2 with FixPak 6. My knowledge about programming is limited but I wrote a few small programs in Java and REXX.
And now to my Problem:
I am trying to build Seamonkey 2.42 from the sources (in the end i want to create a german version of it, but this may be step two or three). With ANPM I installed everything mentioned in this post https://github.com/bitwiseworks/mozilla-os2/issues/82#issuecomment-59601735 (https://github.com/bitwiseworks/mozilla-os2/issues/82#issuecomment-59601735) except mozftcfgft because I don't know where to get it and was not sure if it is needed for the current version. Additionally I installed the "...-devel" package of every package needed to run Seamonkey. Unfortunately I found no list of build requirements for the current version. I installed mercurial and git and downloaded the sources according to the build.os2 for Seamonkey. I did not find the described mozconfig file so i used the one from https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/OS2_Build_Prerequisites/Building_on_OS2_using_Mercurial (https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/OS2_Build_Prerequisites/Building_on_OS2_using_Mercurial):
Code: [Select]
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj

ac_add_options --enable-application=suite
ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --disable-debug
and set MOZCONFIG to use it.

Then I started
Code: [Select]
make -f client.mk 2>&1 | tee build.log but this failed with
Code: [Select]
configure: error: yasm is a required build tool for this architecture when webm is enabled. You may either install yasm or --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details.
I reread the github thread mentioned above and run the commands posted by dmik in sh.exe to set the environment settings. I did not set CFLAGS="-march=i486 -mtune=i686" and CXXFLAGS="-march=i486 -mtune=i686" because that caused the make command to fail with
Code: [Select]
checking for EMX/OS2 environment... no
checking for executable suffix... configure: error: installation or configuration problem: compiler cannot create executables.
. It still failed because of missing yasm so I set YASM=nasm.exe and LIBJPEG_TURBO_AS=nasm.exe. This worked (at least it didn't fail at this point) but now it fails with the message:
Code: [Select]
configure: error: ECMAScript Internationalization API is not yet supported on this platformI have no clue what this means.

I am pretty sure that I have missed some steps to set up the build environment, so I would be very happy if someone has a step by step instruction or at least a list of required environment settings and development packages.

Many thanks, Laurenz

Hi Laurenz, welcome to os2world and Mozilla land.
Sorry for not keeping up with updating the build description, I'll try to update the tree later with more up to date build instructions and mozconfig.
Right now I'm fighting with applying the last patch, our mercurial is buggy :) so the source at bitbucket is one commit behind. I'll fix that soon. I also have a German locale patch that I can give you once you're building.
MZFNTCFGFT is no longer needed we're using the real fontconfig.
Sounds like you have your build environment setup now.
I run this at a cmd prompt before building to finish setting up my environment, call it mozenv.cmd. You'll have to make adjustments to your setup and some stuff such as the toolkit lines probably aren't needed if you used ANPM to install the toolkit.
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%
set MOZCONFIG=/work/cc45esr/.mozconfig
set AUTOCONF=/usr/bin/autoconf213
REM needed to find ilink and rc from the toolkit
set PATH=g:\OS2TK45\bin;%PATH%
set DPATH=g:\OS2TK45\bin;%DPATH%
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
set TEMP=K:\var\temp
set TMP=K:\var\temp
set TMPDIR=K:\var\temp

rem misc stuff
set PYTHON=python.exe
We might need to extend this later for your setup.

My .mozconfig for SeaMonkey is
Code: [Select]
# sh
# Build configuration script
#
# See http://www.mozilla.org/build/unix.html for build instructions
#
# Options for client.mk.
mk_add_options MOZ_CO_PROJECT=suite,browser,mail
mk_add_options MOZ_OBJDIR=/work/cc45esr/obj-sm
mk_add_options AUTOCONF=/usr/bin/autoconf213
#depends on number of cores
mk_add_options MOZ_MAKE_FLAGS="-j3"

# Options for 'configure' (same as command-line options).
ac_add_options --disable-tests
ac_add_options --enable-optimize="-mtune=generic -march=i686 -O3"
ac_add_options --disable-debug
#ac_add_options --disable-debug-symbols
ac_add_options --enable-application=suite
ac_add_options --enable-system-cairo
ac_add_options --enable-calendar
ac_add_options --with-intl-api
ac_add_options --with-system-icu
ac_add_options --with-system-zlib
ac_add_options --with-system-nss
ac_add_options --with-system-nspr
ac_add_options --with-system-libvpx

And to build, I use mach as that is the official way. I use this short command file run in cc45esr
Code: [Select]
set MOZCONFIG=/work/cc45esr/.mozconfig.sm
python mozilla/mach -l build_mach_sm.log build 2>&1 | tee build_sm.log

Other considerations, make sure you have VIRTUALADDRESSLIMIT=3072 in config.sys, we need the full address range to link xul.dll. Need at least 2GBs of ram to avoid excessive swapping. Takes over 5 hours to build here on a 2.4 Ghz C2D.
The binaries will be in obj-sm/dist/bin.
To package, you need lxlite on your path. Need to run the attached cmd file (after adjusting to your environment) from cc45esr to build the xqs files, cd into obj-sm and run make package.

I'm sure I've forgotten something so please post any failures or successes you have.



Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 05, 2017, 01:28:33 am
The Bitbucket tree is now synchronized with mine. Do a hg pull and then a hg update.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 05, 2017, 01:46:56 am
Thank you very much for your answer, Dave. It still fails but with an other error:
I deleted all sources to start at a clean state. Then I opened a command prompt and executed the following commands to pull the sources:
Code: [Select]
[D:\]hg clone https://dryeo@bitbucket.org/dryeo/dry-comm-esr31 /gecko45
[D:\]cd gecko45
[D:\gecko45]git clone https://github.com/bitwiseworks/mozilla-os2.git mozilla/
[D:\gecko45]python client.py --skip-mozilla checkout
Then I set up the environment settings according to your post and set MOZCONFIG to use your mozconfig file. Finally I ran mach to build. It failed with the following message:
Code: [Select]
2:55.60 checking for icu-i18n >= 50.1... yes
 2:55.68 checking MOZ_ICU_CFLAGS...
 2:55.79 checking MOZ_ICU_LIBS... -licuin -licuuc -licudt
 2:56.60 D:/gecko45/mozilla/configure: 31124: D:/gecko45/mozilla/configure: cmp: not found
 2:56.60 updating cache ./config.cache
 2:56.74 creating ./config.status
 2:59.74 js/src/ctypes/libffi> configuring
 2:59.74 js/src/ctypes/libffi> running sh.exe D:/gecko45/mozilla/js/src/ctypes/libffi/configure --build=i386-p
c-os2-emx --host=i386-pc-os2-emx --disable-shared --enable-static --disable-raw-api AS=$(CC) CC=gcc.exe CXX=c+
+ CPP=gcc.exe -E LD=ld AR=emxomfar RANLIB=echo STRIP=lxlite --cache-file=D:/gecko45/obj-sm/js/src/ctypes/libff
i/config.cache
 2:59.92 js/src/ctypes/libffi> sh.exe: 0: Can't open D:/gecko45/mozilla/js/src/ctypes/libffi/configure
 2:59.92
 2:59.99 *** Fix above errors and then restart with\
 2:59.99                "D:/usr/bin/make.EXE -f client.mk build"
 2:59.99 make.EXE[1]: *** [configure] Error 1
 2:59.99 make.EXE: *** [/gecko45/obj-sm/Makefile] Error 2
 3:00.05 0 compiler warnings present.
Obviously a configure file is missing but I found this documentation:https://github.com/bitwiseworks/mozilla-os2/wiki/Developers (https://github.com/bitwiseworks/mozilla-os2/wiki/Developers)
I did the autoconf step as described, but it gave me an error:
Code: [Select]
[D:\gecko45\mozilla]sh
# autoconf213
# (cd js/src && autoconf213)
# (cd js/src/ctypes/libffi && autoconf)
configure.ac:19: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:39: error: possibly undefined macro: AM_PROG_AS
configure.ac:40: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:64: error: possibly undefined macro: AM_MAINTAINER_MODE
configure.ac:68: error: possibly undefined macro: AC_FUNC_MMAP_BLACKLIST
configure.ac:71: error: possibly undefined macro: AM_CONDITIONAL
# (cd nsprpub && autoconf)
# exit
Regardless of this I tried to build again, but this failed with an error which seams to be caused by an corrupted configure file:
Code: [Select]
1:21.12 checking for icu-i18n >= 50.1... yes
 1:21.18 checking MOZ_ICU_CFLAGS...
 1:21.33 checking MOZ_ICU_LIBS... -licuin -licuuc -licudt
 1:22.10 D:/gecko45/mozilla/configure: 31124: D:/gecko45/mozilla/configure: cmp: not found
 1:22.10 updating cache ./config.cache
 1:22.24 creating ./config.status
 1:25.19 js/src/ctypes/libffi> configuring
 1:25.19 js/src/ctypes/libffi> running sh.exe D:/gecko45/mozilla/js/src/ctypes/libffi/configure --build=i386-p
c-os2-emx --host=i386-pc-os2-emx --disable-shared --enable-static --disable-raw-api AS=$(CC) CC=gcc.exe CXX=c+
+ CPP=gcc.exe -E LD=ld AR=emxomfar RANLIB=echo STRIP=lxlite --cache-file=D:/gecko45/obj-sm/js/src/ctypes/libff
i/config.cache
 1:31.38 js/src/ctypes/libffi> configure: WARNING: unrecognized options: --disable-shared, --enable-static
 1:31.38 js/src/ctypes/libffi> configure: creating cache D:/gecko45/obj-sm/js/src/ctypes/libffi/config.cache
 1:31.38 js/src/ctypes/libffi> configure: error: cannot run sh.exe D:/gecko45/mozilla/js/src/ctypes/libffi/con
fig.sub
 1:31.38
 1:31.38 *** Fix above errors and then restart with\
 1:31.38                "D:/usr/bin/make.EXE -f client.mk build"
 1:31.41 make.EXE[1]: *** [configure] Error 1
 1:31.55 make.EXE: *** [/gecko45/obj-sm/Makefile] Error 2
 1:31.55 0 compiler warnings present.

What shall I do next?

PS: I did hg pull and hg update, but I get the same error (as I expected).
PPS: Do I need your ffmpeg 3.3.1 package from Hobbes to build Seamonkey?
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 05, 2017, 01:56:41 am
I knew I'd forget things :) You need to use plain old autoconf on the ctypes configure.in rather then autoconf213. You should be able to recover by running sh /usr/bin/autoconf from D:/gecko45/mozilla/js/src/ctypes/libffi/ (assuming you have installed the latest autoconf and your UNIXROOT is on the same drive)
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 05, 2017, 02:09:21 am
Quote
PPS: Do I need your ffmpeg 3.3.1 package from Hobbes to build Seamonkey?

No, it will dynamically load the needed DLL from that package or an older package such as is installed by ANPM whenyou try to play a H264 video or MP3 .
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 05, 2017, 09:48:55 am
You should be able to recover by running sh /usr/bin/autoconf from D:/gecko45/mozilla/js/src/ctypes/libffi/
I did this and this time it executed without error  :D but the build failed with the same error as before  >:( :
Code: [Select]
js/src/ctypes/libffi> configure: error: cannot run sh.exe D:/gecko45/mozilla/js/src/ctypes/libffi/config.subwhen I looked into the directory D:\gecko45\mozilla\js\src\ctypes\libffi I discovered that configure wasn't changed by autoconf so I deleted it and created it newly with
Code: [Select]
sh /usr/bin/autoconfBut this again returned:
Code: [Select]
[D:\gecko45\mozilla\js\src\ctypes\libffi]sh /usr/bin/autoconf
configure.ac:19: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:39: error: possibly undefined macro: AM_PROG_AS
configure.ac:40: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:64: error: possibly undefined macro: AM_MAINTAINER_MODE
configure.ac:68: error: possibly undefined macro: AC_FUNC_MMAP_BLACKLIST
configure.ac:71: error: possibly undefined macro: AM_CONDITIONAL
My autoconf is version 2.69-5 from netlabs-exp.

PS: I thought it might be caused by the missing automake package, so I installed it but that didn't resolve the problem.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 05, 2017, 10:38:16 am
OK, it seems that I needed the libtool package, now at least autoconf runs without error, but it does not create a config.sub and so the build fails with the same error as before:
Code: [Select]
1:30.67 js/src/ctypes/libffi> configuring
 1:30.67 js/src/ctypes/libffi> running sh.exe D:/gecko45/mozilla/js/src/ctypes/libffi/configure --build=i386-p
c-os2-emx --host=i386-pc-os2-emx --disable-shared --enable-static --disable-raw-api AS=$(CC) CC=gcc.exe CXX=c+
+ CPP=gcc.exe -E LD=ld AR=emxomfar RANLIB=echo STRIP=lxlite --cache-file=D:/gecko45/obj-sm/js/src/ctypes/libff
i/config.cache
 1:36.64 js/src/ctypes/libffi> configure: loading cache D:/gecko45/obj-sm/js/src/ctypes/libffi/config.cache
 1:36.64 js/src/ctypes/libffi> configure: error: cannot run sh.exe D:/gecko45/mozilla/js/src/ctypes/libffi/con
fig.sub
 1:36.64
 1:36.64 *** Fix above errors and then restart with\
 1:36.64                "D:/usr/bin/make.EXE -f client.mk build"
 1:36.80 make.EXE[1]: *** [configure] Error 1
 1:36.80 make.EXE: *** [/gecko45/obj-sm/Makefile] Error 2
 1:36.87 0 compiler warnings present.
I am clueless  :-[
Title: Re: How to build Seamonkey?
Post by: Andreas Kohl on June 05, 2017, 11:35:52 am
OK, it seems that I needed the libtool package, now at least autoconf runs without error, but it does not create a config.sub and so the build fails with the same error as before:

Did you really installed everything from the list?
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/OS2_Build_Prerequisites (https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/OS2_Build_Prerequisites)
The right version of autoconf and m4 is quite important for building under OS/2.

Not all GNU utilities that now come precompiled in RPM packages have the same behaviour. So it would be a good idea to keep working versions of them.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 05, 2017, 01:58:53 pm
Did you really installed everything from the list?
No, I didn't, because I thought RPM/YUM is now the state of art to get the build tools.
The right version of autoconf and m4 is quite important for building under OS/2.
I understand that, but now I do not know which versions to use. For example autoconf: Dave wrote I shouldn't use autoconf213 but the one in your link seems to be that version.
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 05, 2017, 05:09:07 pm
OK, try resetting your Mozilla git tree, by running in your mozilla directory
Code: [Select]
git reset --hard origin/masterThen in your libffi directory, run
Code: [Select]
sh /usr/bin/autoreconf -fi This should run all the autotools and install config.sub.
One other thing, not sure if it is needed but I have this in config.site (create it in /usr/local/share)
Code: [Select]
export CFLAGS=-Zomf
export ASFLAGS=-Zomf

You can look at the top of configure.in/configure.am to see what version of autoconf is needed in the AC-PREREG macro, libffi's configure.ac has AC_PREREQ(2.68) so our 2.69 should work.

Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 05, 2017, 06:10:22 pm
Thank you very much, that worked!  ;D
Right now it building for thirteen minutes without error, I'll tell you when I have any results.
Title: Re: How to build Seamonkey?
Post by: Dmitriy Kuminov on June 05, 2017, 09:24:16 pm
No, I didn't, because I thought RPM/YUM is now the state of art to get the build tools.
This is the right thought.
I understand that, but now I do not know which versions to use. For example autoconf: Dave wrote I shouldn't use autoconf213 but the one in your link seems to be that version.
Dod you read https://github.com/bitwiseworks/mozilla-os2/wiki/Developers#building-from-sources? This instruction is for Firefox and not exactly accurate now (I haven't updated it in a while) but it gives you the right direction. I'd suggest that you first build Firefox as described there and, on success, try Seamonkey.

Note also that I had to do some essential patches in order to build the latest Firefox (e.g. some emxomfld fixes) and some of them are still not released as RPMs but I'm really close to it (a new libc RPM is the only missing thing IIRC).
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 06, 2017, 12:51:25 am
I didn't need to use a patched emxomfld to build either Firefox or SeaMonkey, just the latest nspr and after applying the latest patches to SeaMonkey, I started to get hangs while doing make package so updated libcx to the latest git tip.
We do need a package for lxlite.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 06, 2017, 02:16:36 am
Thank you very much, that worked!  ;D
Right now it building for thirteen minutes without error, I'll tell you when I have any results.
Hm, it failed after three and a half hours because of:
Code: [Select]
148:39.64 In file included from D:/usr/include/os2.h:37:0,
148:39.67                  from D:/gecko45/mozilla/widget/os2/nsAppShell.h:11,
148:39.69                  from D:/gecko45/mozilla/widget/os2/nsAppShell.cpp:6:
148:39.69 D:/usr/include/os2tk.h:11:20: fatal error: os2def.h: No such file or directory
148:39.70  #include <os2def.h>
148:39.71                     ^
148:39.72 compilation terminated.
(at least this is the error I found, I attached the full log)  Although this error occurred it kept going for additional 79 minutes. Is this normal or does it mean the missing os2def.h is not the reason for the failing build process?
The missing os2def.h is strange, because I have the OS/2 toolkit installed and it is in the include path. I'll give the os2tk45 RPM package a try and let my computer work while I sleep  :) (it's 2 am over here).

Dod you read https://github.com/bitwiseworks/mozilla-os2/wiki/Developers#building-from-sources?
Yes, I did. But the autoconf step failed just like I described before and so I tried different methods and finally started this topic.
Note also that I had to do some essential patches in order to build the latest Firefox (e.g. some emxomfld fixes) and some of them are still not released as RPMs but I'm really close to it (a new libc RPM is the only missing thing IIRC).
I didn't need to use a patched emxomfld to build either Firefox or SeaMonkey [...]
I will try  with the RPM OS/2 toolkit and if that fails I'll wait for the updated libc package and then follow the step by step instruction at github.

Thank both of you for your replies, without your knowledge I would be lost.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 06, 2017, 02:46:56 am
I'll give the os2tk45 RPM package a try and let my computer work while I sleep  :) (it's 2 am over here).
Mhm, that didn't work, it fails with the same error, fortunately after only 6 minutes (log attached).
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 06, 2017, 03:45:57 am
Quote
Although this error occurred it kept going for additional 79 minutes. Is this normal or does it mean the missing os2def.h is not the reason for the failing build process?

It's normal if make is invoked with -j2 or higher, it splits make of into 2 processes (or more) which build different directories. You never said how many cores you have but Mozilla recommends using -jx where x is one more then the number of cores. With only one core, don't use the -j flag.

Quote
148:39.69 D:/usr/include/os2tk.h:11:20: fatal error: os2def.h: No such file or directory
148:39.70  #include <os2def.h>

I didn't realize you had a separate toolkit install, the fix for that is to put something like
Code: [Select]
export 'CPPFLAGS=-idirafter g:/OS2TK45/h' in your config.site.
Now that you've used ANPM to install the toolkit, it shouldn't be needed.
Either way, the paths are now hardwired in your obj dir so you need to clobber (delete) your object directory and start over.
 
Title: Re: How to build Seamonkey?
Post by: André Heldoorn on June 06, 2017, 04:34:03 am
the language packages for Seamonkey 2.40 are not installable on 2.42, when I edit the version number in the file install.rdf inside the package to make it installable this leads to an unusable Browser (pages don't load).

Same here, different old langpack. I didn't try to use the browser component without a langpack, but the result of a 2.40 langpack test is negative.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 06, 2017, 12:39:32 pm
It's normal if make is invoked with -j2 or higher, it splits make of into 2 processes (or more) which build different directories. You never said how many cores you have but Mozilla recommends using -jx where x is one more then the number of cores. With only one core, don't use the -j flag.
My Laptop has a CoreDuo at 1.83 GHz. I have
Code: [Select]
mk_add_options MOZ_MAKE_FLAGS="-j3" in my mozconfig file as you suggested, but most of the time only one core was utilised.
I didn't realise you had a separate toolkit install,
My fault, I should have mentioned it.
Either way, the paths are now hardwired in your obj dir so you need to clobber (delete) your object directory and start over.
I deleted the obj-sm directory and started the build again, this time both CPU cores are at 99.9 % although I only have installed the OS/2 toolkit RPM, removed the classic toolkit from include and added SET COMSPEC=C:\OS2\CMD.EXE to my mozenv.cmd (before it referred to 4os2 even though I have SET COMSPEC=C:\OS2\CMD.EXE in my config.sys).
I will report when I have any results.

the language packages for Seamonkey 2.40 are not installable on 2.42, when I edit the version number in the file install.rdf inside the package to make it installable this leads to an unusable Browser (pages don't load).

Same here, different old langpack. I didn't try to use the browser component without a langpack, but the result of a 2.40 langpack test is negative.
Even the 2.42 language packs from Gentoo (https://dev.gentoo.org/~axs/mozilla/patchsets/ (https://dev.gentoo.org/~axs/mozilla/patchsets/)) do not work. By the way: One can recover from the destroyed browser by starting Seamonkey with the argument "-UILocale en-US" (without quotation marks) and uninstalling the language pack from about:addons.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 06, 2017, 03:16:38 pm
I will report when I have any results.
Here I am: I got the exact same error as before:
Code: [Select]
93:24.52 D:/usr/include/os2tk.h:11:20: fatal error: os2def.h: No such file or directory
93:24.55  #include <os2def.h>
93:24.57                     ^
93:24.59 compilation terminated.
At least it took  almost one hour less to come to this point because it used both CPU cores. Obviously I have configured something wrongly because the RPM packages os2tk45-headers, os2tk45-libs and os2tk45-rc are installed. And os2def.h is definitely in the path of the include environment setting. Or do I have to put
Code: [Select]
export 'CPPFLAGS=-idirafter d:/usr/include/os2tk45' in my config.site even when using the RPM package?
Anyway, I will now try Dmitrys instruction step by step. By the way: Thank you very much for the fast update on the libc package!
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 07, 2017, 02:00:20 am
Anyway, I will now try Dmitrys instruction step by step.
Unfortunately this didn't work either. I followed this (https://github.com/bitwiseworks/mozilla-os2/wiki/Developers#building-from-sources) instruction (but I added any set statement  from my mozenv.cmd which wasn't used with export), but at the configure step I got the following error:
Code: [Select]
configure:3754: checking whether the C compiler (gcc.exe -Zomf ) works
configure:3770: gcc.exe -o conftest.exe -Zomf -idirafter D:/usr/include/os2tk45  conftest.c -lmmap -lcx -lkai -Zomf 1>&5
emxomf: No such file or directory
emxomfld: a.out to omf conversion failed for 'D:\usr\bin\..\lib\gcc\i386-pc-os2-emx\4.9.2\..\..\..\mmap.a'.
configure: failed program was:

#line 3765 "configure"
#include "confdefs.h"

main(){return(0);}
configure: error: installation or configuration problem: C compiler cannot create executables.

I started again working with Dave's way to build, now I added
Code: [Select]
export 'CPPFLAGS=-idirafter D:/usr/include/os2tk45' to D:\usr\locale\share\config.site and
Code: [Select]
SET CPPFLAGS=-idirafter D:/usr/include/os2tk45to mozenv.cmd. One of both has to do the trick. And it did  ;D.
But then I got another error:
Code: [Select]
296:24.16     ../../gfx/ots/src/Unified_cpp_gfx_ots_src0.obj
296:24.18     ../../gfx/ots/src/Unified_cpp_gfx_ots_src1.obj
296:24.20     ../../modules/brotli/Unified_c_modules_brotli0.obj
296:24.23     StaticXULComponentsEnd/StaticXULComponentsEnd.obj
296:24.25
296:24.27 weakld: cannot open library file 'D:\TOOLKIT\SOM\LIB\intl_s.a'.
296:24.29 emxomfld: weak prelinker failed. (rc=8)
296:24.30 make.EXE[4]: *** [xul.dll] Error 1
296:24.32 make.EXE[3]: *** [toolkit/library/target] Error 2
296:24.34 make.EXE[2]: *** [compile] Error 2
296:24.36 make.EXE[1]: *** [default] Error 2
296:24.38 make.EXE: *** [build] Error 2
296:24.44 14 compiler warnings present.
That drives me crazy  >:(
What is that "intl_s.a"? And why should it be in "D:\TOOLKIT\SOM\LIB\"? It's nowhere on my hard drive, in no RPM package and googling it I found some makefiles utilising it, but no hint where to get it from. It seems to be related to emx but that's all I found out. I will attach a full dump (set>envset.log) of all environment settings which were set while building, maybe that is of any help.
May I annoy you with another question: When building was interrupted by an error and I fixed it, do I always have to delete obj-sm or may I just start
Code: [Select]
python mozilla/mach -l build_mach_sm.log build and it will proceed were it stopped?
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 07, 2017, 04:04:37 am
Often weakld failures will reference a totally unrelated library such as this reference to gettext.
You're likely missing a library though. At this point, go to $OBJDIR\toolkit\library and look to see if a map file got created and if so look for an error in it, probably close to the beginning or end.
At this point you can run make again in the $OBJDIR\toolkit\library directory to see if it displays an error, copy the list file for later reference and various other troubleshooting ideas. Might be best to run make V=1 2>&1 | tee build.log or such. Once you've succeeded in linking xul.dll, which may take half an hour or more on your system, then go back and run the mach build command again or run make from the top of your obj dir.
Usually you don't need to clobber (delete) the obj dir but for some changes in your environment such as when you changed the location of the toolkit, you should. Same if you've been making lots of changes to the source, or just getting weird errors. Good to start fresh if you're planning on distributing too.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 07, 2017, 02:27:50 pm
Unfortunately no map file has been created. I ran
Code: [Select]
make V=1 2>&1 | tee build.login the library directory but it gave me the same output as before. So I tried
Code: [Select]
make SHELL='sh -x' 2>&1 | tee buildsh-x.log in sh.exe, which should show any command which sh executes. This gave me a little more information (I attached the log), but nothing helpful for me.
You're likely missing a library though.
Yes, but I have no clue which one. Maybe someone who successfully build Firefox or Seamonkey  can help me with a list of all RPM packages he has installed.
Code: [Select]
yum list>rpmpacklist.loggenerates such a list. Thanks in advance.

Usually you don't need to clobber (delete) the obj dir but for some changes in your environment such as when you changed the location of the toolkit, you should. Same if you've been making lots of changes to the source, or just getting weird errors. Good to start fresh if you're planning on distributing too.
Thanks for that info, it will save me a lot of time while chasing for the error.
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 08, 2017, 06:48:48 am
Interesting, I tried to build SeaMonkey on a new ArcaOS install using my regular @UNIXROOT.
The build died creating the resource file, so I switched from using wrc to using rc  (run emxomfld with no parameters to see how). Next the build died somewhere in LDAP, looked like it didn't like a def file. Since this was this morning and I wanted to reply before going to work, I quickly tried to build xul.dll with your
Code: [Select]
make SHELL='sh -x' 2>&1 | tee buildsh-x.logas expected it failed due to mailnews not being built yet.
So I rebooted to my eCS2.1 partition where I've been building and the build finished. I then tried to run the above command and all I got was makes help output. I then set V=1 and ran make 2>&1 | tee build.log which outputted the whole build xul command (attached).
Seems that the eCS build is picking up a different sh as the makeshell at least. It's weird as both environments used the same @UNIXROOT though my eCS environment has a lot more stuff added to it as I was building Mozilla there since before YUM/RPM and Bitwise taking over.
I'm going to have to reboot back to ArcaOS and experiment to trace this down but it seems having the right shell matters.
Title: Re: How to build Seamonkey?
Post by: TeLLie on June 08, 2017, 07:15:42 am
Hello,
You have installed gettext-devel-0.19.8.1-3 ?
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 08, 2017, 07:34:45 am
Tellies right, a dependency on gettext has snuck in.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 08, 2017, 05:44:11 pm
Thanks both of you for your replies.

You have installed gettext-devel-0.19.8.1-3 ?
No I hadn't, thanks for the hint.
But obviously the luck is not on my side: With gettext installed I get the next error:
Code: [Select]
15:16.29     ../../gfx/ots/src/Unified_cpp_gfx_ots_src0.obj
15:16.31     ../../gfx/ots/src/Unified_cpp_gfx_ots_src1.obj
15:16.34     ../../modules/brotli/Unified_c_modules_brotli0.obj
15:16.34     StaticXULComponentsEnd/StaticXULComponentsEnd.obj
15:16.38
15:16.38 weakld: error: Unresolved symbol (UNDEF) '__ZN8ICUUtils24AssignUCharArrayToStringEPtiR18nsAString_internal'.
15:16.44 weakld: info: The symbol is referenced by:
15:16.45     D:\gecko45\obj-sm\netwerk\dns\Unified_cpp_netwerk_dns0.obj
15:16.47 Ignoring unresolved externals reported from weak prelinker.
15:16.51 make.EXE[4]: *** [xul.dll] Error 1
15:16.53 make.EXE[3]: *** [toolkit/library/target] Error 2
15:16.54 make.EXE[2]: *** [compile] Error 2
15:16.56 make.EXE[1]: *** [default] Error 2
15:16.58 make.EXE: *** [build] Error 2
15:16.61 14 compiler warnings present.
At least this time the file xul.map has been created. Here the parts which I consider to be important (I have uploaded the whole file here: https://drive.google.com/file/d/0Bx_GJai__9ZcMWo1djhvNW8zLUE/view?usp=sharing (https://drive.google.com/file/d/0Bx_GJai__9ZcMWo1djhvNW8zLUE/view?usp=sharing)):
At the top:
Code: [Select]
** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 2.0beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Created on:       17/06/08 14:19:35
Executable Image: xul.dll
creating an OS/2 EMX dynamic link library
Error! E2028: __ZN8ICUUtils24AssignUCharArrayToStringEPtiR18nsAString_internal is an undefined reference
Near the bottom:
Code: [Select]
                        +---------------------------+
                        |   Unresolved References   |
                        +---------------------------+

Undefined Symbol                Referenced by
================                =============

__ZN8ICUUtils24AssignUCharArrayToStringEPtiR18nsAString_internal D:\gecko45\obj-sm\netwerk\dns\Unified_cpp_netwerk_dns0.obj(D:\gecko45\obj-sm\netwerk\dns\Unified_cpp_netwerk_dns0.cpp)
What's wrong this time?

Thanks Dave for your package list. There are 105 packages which aren't installed on my system. I installed all which had ...-devel in their name, but that didn't help either. If I have enough time I will install the remaining ones, too.

I then tried to run the above command and all I got was makes help output.
That happens to me when I run this command directly in 4OS2, when I start sh.exe first and execute the command in sh it works.
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 08, 2017, 06:02:12 pm
C++filt.exe is your friend when it comes to these symbols,
Code: [Select]
C:\work\cc45esr>c++filt __ZN8ICUUtils24AssignUCharArrayToStringEPtiR18nsAString_internal
ICUUtils::AssignUCharArrayToString(unsigned short*, int, nsAString_internal&)

Which implies it is something to do with ICU, which is what we use for internationalization. Possibly the lack of gettext being installed screwed something up. Might be a case of needing to clobber your obj dir  :(
Can't find that symbol in my obj dir so perhaps the lack of gettext caused configure to take a different route
Title: Re: How to build Seamonkey?
Post by: TeLLie on June 08, 2017, 10:44:59 pm
Hi,

You have also install the icu-56.1-1.oc00.i686.rpm ?
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 08, 2017, 11:08:03 pm
No, I have not. But Dave hasn't either :-\. At the moment the laptop is building for 260 minutes with a new obj dir and I won't touch it until it fails or succeeds :). In round about 40 minutes I'll know if it passes the critical point.

Edit: No success, same error as before :( I will try again with icu installed.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 09, 2017, 08:55:40 pm
I installed ICU, renamed obj-sm, build, same error.
Then I installed any RPM package which Dave has installed and I hadn't (except for GBM-DEVEL, GBMDLL, libodin, libusb1, libusb1-devel, libusb1-devel-doc, libusbcalls, libusbcalls-devel and odin-exe-tools which interfered with files I had already installed and I considered them to be unrelated to Firefox/Seamonkey), renamed obj-sm, ran auto(re)config(213), build, same error >:(. It seems to me as if the problem is caused either by a missing file which is not installed via RPM or my environment settings are incorrect.
Any thoughts about that? :(
Title: Re: How to build Seamonkey?
Post by: TeLLie on June 09, 2017, 11:54:48 pm
Hi Laurenz,

Look @ https://github.com/bitwiseworks/mozilla-os2/issues/188#issuecomment-294180407 im sure this fix you're problem :)

Faced another strange issue: EMX <sys/param.h> defines BSD on OS/2 (mimics the OS/2 Toolkit header's behaviour). This fools LIBICU's <unicode/platform.h> which starts thinking it's running on a BSD system rather than on OS/2 which results in weird linking errors (because UChar becomes unsigned short rather than wchar_t and this is vital for C++ functions due to different codes these name have in mangling; for example I got an (undefined) reference to __ZN8ICUUtils24AssignUCharArrayToStringEPtiR18nsAString_internal instead of __ZN8ICUUtils24AssignUCharArrayToStringEPwiR18nsAString_internal — go note the difference!).

As this BSD define is not actually used by EMX headers themselves and is only relevant for the version of the TCP/IP API EMX headers define, I guess it's safe to drop it from there. It may affect some old software using this define to decide on the available TCP/IP functionality but I don't think that we are likely to face such a case in real life. I commented out the entire BSD define block in <sys/param.h> and will leave it as is for now — we will see where it gets us. I will release this change as a new kLIBC RPM if nothing bad happens.
Title: Re: How to build Seamonkey?
Post by: Andreas Kohl on June 10, 2017, 12:37:23 am
It seems to me as if the problem is caused either by a missing file which is not installed via RPM or my environment settings are incorrect.
Any thoughts about that? :(
I know the last build instructions are quite outdated. But it's better to start from them IMO. I don't know if MakeOmfLibs.cmd or other stuff will be done automatically during RPM installation. By installing too much untested stuff from the RPM repos which lacks any usable documentation it will not be a working solution.
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 10, 2017, 03:20:39 am
Thanks Tellie, that's exactly the problem and should have been fixed in the latest libc.
Sorry Laurenz, seems my memory is going with age  :-[
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 10, 2017, 05:45:20 am
The best lxlite seems to be this one, http://home.earthlink.net/%7Esteve53/betas/lxlt135-shl-20121201.zip (http://home.earthlink.net/%7Esteve53/betas/lxlt135-shl-20121201.zip)
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 10, 2017, 03:10:01 pm
TeLLie, you are my hero! That was exactly my problem :)
The build did fail again with an error caused by lxlite, but with lxlite 1.3.5 (I had v1.3.8 from Hobbes) suggested by Dave it finally succeeded ;D. Thanks to all of you!
But it's to early to celebrate: After running smxqs.cmd, running make package in obj-sm hung after compressing xul.dll:
Code: [Select]
resource://gre/modules/services-sync/util.js
resource://gre/modules/sqlite/sqlite_internal.js
resource://gre/modules/templateUtils.js
resource://gre/modules/traceHelper.js
resource://gre/modules/virtualFolderWrapper.js
resource://gre/modules/vtt.jsm
resource://gre/modules/workers/PromiseWorker.js
resource://gre/modules/workers/require.js
┌[ lxLite ]─────────────────────────────────┬[ Version 1.3.5 shl ]┐
├ Copyright 1996,97 by FRIENDS software     ├    All rights       ┤
├ Copyright 2001,03 by Max Alekseyev        └     reserved        ┘
├ Modified by Steven H. Levine
├ Current directory ../../dist/seamonkey/
├                     xul.dll initial:79946305 final:42484011 gain: 91.2%
├┤Total gain: 437462294 bytes
└┤Done
I pressed ENTER to see if it's waiting for some input, but no reaction.
Then I pressed CTRL-C  and that gave me:
Code: [Select]
Traceback (most recent call last):
  File "D:/gecko45/mozilla/toolkit/mozapps/installer/packager.py", line 421, in <module>
    main()
  File "D:/gecko45/mozilla/toolkit/mozapps/installer/packager.py", line 417, in main
    copier.copy(args.destination)
  File "D:/gecko45/mozilla/python/mozbuild/mozpack/copier.py", line 384, in copy
    if f.copy(destfile, skip_if_older):
  File "D:/gecko45/mozilla/python/mozbuild/mozpack/files.py", line 267, in copy
    strip(dest)
  File "D:/gecko45/mozilla/python/mozbuild/mozpack/executables.py", line 99, in strip
    if subprocess.call(cmd) != 0:
  File "D:/usr/lib/python2.7/subprocess.py", line 525, in call
    return Popen(*popenargs, **kwargs).wait()
  File "D:/usr/lib/python2.7/subprocess.py", line 1378, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "D:/usr/lib/python2.7/subprocess.py", line 479, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt
make.exe[3]: *** [stage-package] Error 1
make.exe[3]: Leaving directory `D:/gecko45/obj-sm/suite/installer'
make.exe[2]: *** [make-package] Error 2
make.exe[2]: Leaving directory `D:/gecko45/obj-sm/suite/installer'
make.exe[1]: *** [default] Error 2
make.exe[1]: Leaving directory `D:/gecko45/obj-sm/suite/installer'
make.exe: *** [package] Error 2
Help, the curse of Mozilla rests on me :-\

I know the last build instructions are quite outdated. But it's better to start from them IMO. I don't know if MakeOmfLibs.cmd or other stuff will be done automatically during RPM installation. By installing too much untested stuff from the RPM repos which lacks any usable documentation it will not be a working solution.
I don't think installing the old packages would have brought me any further, because only few of them are still usable for Firefox 45. I did compile Mozilla 1.8 some months ago which was indeed pretty easy because of the complete documentation, but installing the Packages via RPM is much more convenient if you know which packages to install (I don't blame the developers, they have a lot to do and do a great job). When I am finally done, I will post a list of needed packages and steps.

Thanks Tellie, that's exactly the problem and should have been fixed in the latest libc.
But it isn't fixed, I have installed the latest (0.6.6-33) libc-devel, but the param.h is dated 10/26/2014 (I  hope this date is formatted correctly, I'm always confused by the american format).
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 10, 2017, 05:45:14 pm
I had this issue for a while, I think that updating libcx fixed it, at least it went away after updating libcx. Once again I thought that the RPM had been updated.
git clone https://github.com/bitwiseworks/libcx.git
yum install kbuild (if you haven't already)
run kmk in the libcx directory
Copy the files in libcx\out\os2.x86\release\stage\lib over the ones in @UNIXROOT/usr/lib, might need to unlock the DLL, unlock libcx0.dll
Reboot
Try running make package again
BTW, you can test your SeaMonkey by running the binary in dist\bin.

Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 10, 2017, 09:44:14 pm
It's working! Right now I'm posting with my own build of SeaMonkey. Thanks to all of you who participated into this thread!
Dave, I built libcx as suggested by you, and replaced the files, but it didn't help. make package hung after compressing plugin-container.exe. I thought it might be possible to finish the packing by restarting again and again until all executables got processed by lxlite, so I opened 4os2, set up the environment, and executed
Code: [Select]
start cmdto get a new command prompt. This was necessary because python didn't terminate properly after pressing CTRL-C and I didn't want to set up the environment for each command prompt. But in that cmd.exe window the remaining executables were compressed without error. To sum it up: Maybe make package failed because I ran it in 4os2 (but I had SET COMSPEC=C:\OS2\CMD.EXE in my environment).

One last question: I compared the build configuration at about:buildconfig of my version with Dave's, and under configure arguments --enable-os2-high-mem was missing. How do I set this option in my own Build environment? Do I have to add the line
Code: [Select]
ac_add_options --enable-os2-high-mem to my mozconfig?

@Dave Shall I send you an email regarding the german locale patch you mentioned before?
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 11, 2017, 01:49:26 am
It's working! Right now I'm posting with my own build of SeaMonkey. Thanks to all of you who participated into this thread!

Good to hear. I stay away from 4os2 just because of issues like this.
Quote
One last question: I compared the build configuration at about:buildconfig of my version with Dave's, and under configure arguments --enable-os2-high-mem was missing. How do I set this option in my own Build environment? Do I have to add the line
Code: [Select]
ac_add_options --enable-os2-high-mem to my mozconfig?

Was that missing in the mozconfig I sent you? I edited mine quite a bit as I had a lot of commented out cruft in mine. Yes add it. I also noticed that
Code: [Select]
ac_add_options --enable-system-pixmanis also missing.
Quote
@Dave Shall I send you an email regarding the german locale patch you mentioned before?

Sure. I'd also suggest moving the discussion to the newsgroup/mailing list as Frank-Rainer Grahl may help with the localization, he gave me the patches, is a SeaMonkey developer, PMMail user and German speaker. I'm interested in how it works as well.
news.mozilla.org --> mozilla.dev.ports.os2 or https://lists.mozilla.org/listinfo/dev-ports-os2 (https://lists.mozilla.org/listinfo/dev-ports-os2)

There's also the patch from https://github.com/bitwiseworks/mozilla-os2/issues/214 (https://github.com/bitwiseworks/mozilla-os2/issues/214). Best to create a git branch to apply the patch to. If you need help doing it, reply here.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 12, 2017, 12:50:13 pm
Best to create a git branch to apply the patch to. If you need help doing it, reply here.
Are you talking about creating a repository at e. g. github or is there a way to create a local repository? My knowledge about git is very limited and I have actually no clue how to do either of this :-\.
At the moment I am reading through mozilla.dev.ports.os2, later I will post there.
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 12, 2017, 04:40:34 pm
Best to create a git branch to apply the patch to. If you need help doing it, reply here.
Are you talking about creating a repository at e. g. github or is there a way to create a local repository? My knowledge about git is very limited and I have actually no clue how to do either of this :-\.
At the moment I am reading through mozilla.dev.ports.os2, later I will post there.

Assuming that you used git clone to download the Bitwise Firefox code, you have a local  git repository in mozilla/
cd into mozilla
Code: [Select]
git help branch | less for help
Code: [Select]
git branch test creates a branch named test, use whatever name you want.
Code: [Select]
git checkout test changes to the new branch
Code: [Select]
git am foo.patch imports a patch. Can also do work in the branch and use git commit to commit.
Code: [Select]
git checkout master to switch back to the main branch
Code: [Select]
git pull to update the master branch
Code: [Select]
git checkout test and then
Code: [Select]
git rebase master will update and merge your branch.

Git is pretty powerful, and so is mercurial with lots of tutorials on the net.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 13, 2017, 03:10:21 am
Thanks for being patient with me :) I followed your instructions and successfully (at least I got no error) applied the patch you mentioned above. The only thing that puzzles me, is it said something like 'patches is up to date' (patches is my working branch; I don't recall the exact term and it was in german) after I executed git rebase master (with the branch patches enabled).
Anyway, I'll open a topic in the Mozilla newsgroup for the further process.
I need to verify which packages are really needed, because I think I installed a few unnecessary ones while searching for the error, but then I will post a short instruction.
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 13, 2017, 04:29:54 am
The message is normal and just means that the rebase was unneeded. You can look at https://github.com/bitwiseworks/mozilla-os2/commits/master (https://github.com/bitwiseworks/mozilla-os2/commits/master) for activity upstream and then do the checkout master & rebase steps to bring your branch to the same level as the master (Bitwise).
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 14, 2017, 12:28:41 am
OK, so I have already added the patch to my repository with git add and git commit?
I see, powerful means confusing me with power :-[ ;D
I will dig through some tutorials and in conjunction with your crash course it hopefully will be enough for me.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 18, 2017, 01:53:52 pm
I have verified my setup on another laptop; in the hope it might be helpful to someone:
The following packages need to be installed either via 'yum install' or ANPM's Quick install:
Code: [Select]
netlabs-exp
nasm gcc gcc-wlink gcc-wrc kbuild-make m4 grep gawk perl python findutils tar pkgconfig perl-PathTools pthread-devel
exceptq exceptq-devel autoconf213 autoconf nspr-devel nss-devel libicu-devel pixman-devel cairo-devel pango-devel
fontconfig-devel freetype-devel libkai-devel libvpx-devel libjpeg-turbo-devel libpng-devel zlib-devel bzip2-devel
hunspell-devel libcx-devel expat-devel python-test ffmpeg-devel libtool libtool-ltdl-devel gettext-devel
git
mercurial
Install the OS/2 Developer's Toolkit, this may be done with yum, too.
In the config.sys set VIRTUALADDRESSLIMIT=3072.
Reboot, so changes applied to your config.sys become active.
Install lxlite from http://home.earthlink.net/%7Esteve53/betas/lxlt135-shl-20121201.zip (http://home.earthlink.net/%7Esteve53/betas/lxlt135-shl-20121201.zip) into your PATH.
Follow Dave's instructions to download the sources: https://bitbucket.org/dryeo/dry-comm-esr31/src/ad7137973e042eb45ca5fb35764ebafb2db40f4c/BUILD.OS2?at=default&fileviewer=file-view-default (https://bitbucket.org/dryeo/dry-comm-esr31/src/ad7137973e042eb45ca5fb35764ebafb2db40f4c/BUILD.OS2?at=default&fileviewer=file-view-default). If you get an 'File or directory not found' error it might be possible that you have to set HOSTNAME in your environment settings.
Download all attached files, edit them  so the paths match your environment. Move config.site to \usr\local\share.
Open a command shell in \cc-31\mozilla, execute sh.exe in this command shell. In sh execute the following:
Code: [Select]
autoconf213
(cd js/src && autoconf213)
(cd js/src/ctypes/libffi && autoreconf -fi)
(cd nsprpub && autoconf)
In /cc-31 open a command shell (use cmd.exe, not 4os2, and pay attention that the environment setting COMSPEC is set to C:\os2\ cmd.exe). Run mozenv.cmd and build_suite.cmd. After the build process completes run smxqs.cmd, cd into obj-sm and execute 'make package'.
The zip package is in \cc-31\obj-sm\dist.
The build process took about 5 and a half hour on a laptop with an Intel CoreDuo 1,83 GHz and 2 GiB RAM; 8 and a half hour with a Pentium M 2,13 GHz and 1280 MiB RAM.

This instruction might be wrong, incomplete or completely useless. Especially it is likely that some of the RPM packages are not necessary.
Thanks to everyone, who helped me finding out the steps.
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 18, 2017, 06:45:46 pm
Thanks Laurenz,
Minor edits, now seem to need
Code: [Select]
autoreconf -f -ito correctly set up js/src/ctypes/libffi
And currently our headers need adjusting as described in https://github.com/bitwiseworks/mozilla-os2/issues/188#issuecomment-294180407 (https://github.com/bitwiseworks/mozilla-os2/issues/188#issuecomment-294180407) which should eventually be fixed.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 18, 2017, 09:09:43 pm
Oh, yes I forgot about autoreconf.
The problem with param.h is fixed, with the up to date libc-devel from netlabs-exp no editing was needed when I built SeaMonkey yesterday.
I'll edit my post obove when I'm home, right now I'm traveling by train and post with my mobile phone made in 2003 :D
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on June 19, 2017, 07:53:22 am
For completeness, here are the files needed to build Thunderbird, Firefox and as a bonus, InstantBird (untested with 45esr, the mozconfig worked for 38)
To build Thunderbird is almost exactly the same process as building SeaMonkey except using the Thunderbird (tb) files instead of the suite ones. Firefox is built the same way except the build_ff.cmd and mozconfig.ff need to be in mozilla/ and run from there. No xqs support in Firefox currently.
Note that at the end, you can do make install instead of make package. Make install will install in \usr\local\lib\$name but can be modified by changing the $PREFIX.
Title: Re: How to build Seamonkey?
Post by: Jochen Schäfer on June 19, 2017, 08:52:22 am
In /cc-31 open a command shell (use cmd.exe, not 4os2, and pay attention that the environment setting COMSPEC is set to C:\os2\ cmd.exe).
What was the problem with 4os2 again? I saw some hints in this thread, but no explanations why one should only use CMD for dev.
Title: Re: How to build Seamonkey?
Post by: Laurenz Sommer on June 19, 2017, 02:00:18 pm
What was the problem with 4os2 again? I saw some hints in this thread, but no explanations why one should only use CMD for dev.
With SET COMSPEC=C:\OS2\4OS2.EXE only one processor core was utilised while building. Another problem with 4os2 in COMSPEC not related to development of Firefox/SeaMonkey: When you start an exe from a REXX program compiled with rexx2exe, 4os2 tries to execute the exe as an REXX script, not as a binary executable and fails of course.
When executing 'make package' in 4os2 it hung after compressing xul.dll with lxlite.
Title: Re: How to build Seamonkey?
Post by: Jochen Schäfer on June 19, 2017, 03:37:39 pm
Thanks for the explanations. I will heed them.  ;D
Title: Re: How to build Seamonkey?
Post by: Dariusz Piatkowski on December 07, 2017, 12:04:35 am
Laurenz & Team,

I am about to attempt the creation of this environment with the goal of building CPU specific version(s) of FF.

The question I have is regarding the utilization of TEMP space during this process: if RAM availability permits, would it makes sense (in terms of speeding up of the process) to use a virtual-disk (mem disk) as the scratch-pad for the final application build process?
Title: Re: How to build Seamonkey?
Post by: Dave Yeo on December 07, 2017, 12:50:11 am
Be worth trying. The build process, especially the configure step uses %TEMPDIR% and/or%TMP% quite a bit.
When I tried, I consistently did get a failure about not being able to find a .S (assembler step) file.