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

Dmitriy Kuminov

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 7
    • View Profile
Re: How to build Seamonkey?
« Reply #15 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).
CPO of bww bitwise works GmbH

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 91
  • Posts: 1173
    • View Profile
Re: How to build Seamonkey?
« Reply #16 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.

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #17 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.

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #18 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).

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 91
  • Posts: 1173
    • View Profile
Re: How to build Seamonkey?
« Reply #19 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.
 

André Heldoorn

  • Full Member
  • ***
  • Thank You
  • -Given: 37
  • -Receive: 8
  • Posts: 235
    • View Profile
Re: How to build Seamonkey?
« Reply #20 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.

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #21 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/) 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.

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #22 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!

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #23 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 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?

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 91
  • Posts: 1173
    • View Profile
Re: How to build Seamonkey?
« Reply #24 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.

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #25 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.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 91
  • Posts: 1173
    • View Profile
Re: How to build Seamonkey?
« Reply #26 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.

TeLLie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 6
  • Posts: 47
    • View Profile
Re: How to build Seamonkey?
« Reply #27 on: June 08, 2017, 07:15:42 am »
Hello,
You have installed gettext-devel-0.19.8.1-3 ?

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 91
  • Posts: 1173
    • View Profile
Re: How to build Seamonkey?
« Reply #28 on: June 08, 2017, 07:34:45 am »
Tellies right, a dependency on gettext has snuck in.

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #29 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):
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.