Author Topic: How to build Seamonkey?  (Read 44511 times)

Laurenz Sommer

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
How to build Seamonkey?
« 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 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:
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

xynixme

  • Guest
Re: How to build Seamonkey?
« Reply #1 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/)?

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.

Laurenz Sommer

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: How to build Seamonkey?
« Reply #2 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.

xynixme

  • Guest
Re: How to build Seamonkey?
« Reply #3 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. :)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: How to build Seamonkey?
« Reply #4 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 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:
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.




Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: How to build Seamonkey?
« Reply #5 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.

Laurenz Sommer

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: How to build Seamonkey?
« Reply #6 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
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?
« Last Edit: June 05, 2017, 01:54:19 am by Laurenz Sommer »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: How to build Seamonkey?
« Reply #7 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)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: How to build Seamonkey?
« Reply #8 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 .

Laurenz Sommer

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: How to build Seamonkey?
« Reply #9 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.
« Last Edit: June 05, 2017, 09:57:13 am by Laurenz Sommer »

Laurenz Sommer

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: How to build Seamonkey?
« Reply #10 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  :-[

ak120

  • Guest
Re: How to build Seamonkey?
« Reply #11 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
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.

Laurenz Sommer

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: How to build Seamonkey?
« Reply #12 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.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: How to build Seamonkey?
« Reply #13 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.


Laurenz Sommer

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: How to build Seamonkey?
« Reply #14 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.