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

Dave Yeo

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

TeLLie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 6
  • Posts: 47
    • View Profile
Re: How to build Seamonkey?
« Reply #31 on: June 08, 2017, 10:44:59 pm »
Hi,

You have also install the icu-56.1-1.oc00.i686.rpm ?

Laurenz Sommer

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 3
  • Posts: 32
    • View Profile
Re: How to build Seamonkey?
« Reply #32 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.
« Last Edit: June 09, 2017, 12:59:05 am by Laurenz Sommer »

Laurenz Sommer

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

TeLLie

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

Andreas Kohl

  • Full Member
  • ***
  • Thank You
  • -Given: 6
  • -Receive: 9
  • Posts: 203
    • View Profile
    • warpserver.de
Re: How to build Seamonkey?
« Reply #35 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.

Dave Yeo

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

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 91
  • Posts: 1171
    • View Profile
Re: How to build Seamonkey?
« Reply #37 on: June 10, 2017, 05:45:20 am »

Laurenz Sommer

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

Dave Yeo

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


Laurenz Sommer

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

Dave Yeo

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

There's also the patch from 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.

Laurenz Sommer

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

Dave Yeo

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

Laurenz Sommer

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