site  contact  subhomenews

SeaMonkey 1.1.19 compiled in EasyOS

November 27, 2021 — BarryK

I posted yesterday about compiling BlueGriffon:

https://bkhome.org/news/202111/bluegriffon-compiled-but-is-broken.html

I received an email from scsijon, about the history of the BlueGriffon releases. He commented that 3.2pre in github is crap and the developers abandoned the project. He also commented that 3.1 has bugs and 3.0.1 is quite good, and either should be OK.

WYSIWYG HTML editors are currently being discussed on the forum:

https://forum.puppylinux.com/viewtopic.php?t=4543

https://forum.puppylinux.com/viewtopic.php?t=4544

As I seem to have settled on Firefox as the main browser in EasyOS, I still want to keep a WYSIWYG HTML editor in the build, builtin. So, my mind turned to considering old versions of SeaMonkey...

Looking at my old notes, the 1.1 series look good. Very old, version 1.1.19 was the last, released, I think, in 2010. The 1.1 series was the last, I think, that can be configured to build a standalone composer.

But, then, with SM you get the browser and composer editor, both, for not much increase in size. So why not build the suite. The browser could be a substitute for the 'surfer' HTML viewer that I am currently using to view local help files in Easy.

Now for the good news: it compiled (but I left out the mail&news module), and the resulting binary package is only 9MB. Compare that with SM 2.53.x package, which is over 51MB!

The EasyOS .img.gz download file is 594MB and I want very much to bring that down. Building with both Firefox and SM has contributed to that huge size. Knocking off 43MB would be great. Well, even more, as would get rid of 'surfer'.

Now for the bad news: it segfaulted at startup.

I am going to put out a request for help on the forum. I will recompile with debug symbols left in, and will trace where the crash is occurring. I used to do crash tracing back in my Windows programming days, but never really got into it with Linux, and the little bit of Linux crash tracing I did attempt was a very long time ago, I cannot recall what I did ...think used the 'gdb' utility.

Anyway, my rough notes are here:

easyos 3.1.11
install python2 pet.

nss pkg compiled on oe:
copy libcrmf.a to /usr/lib

needs libidl:
# tar -xf libIDL-0.8.14.tar.bz2
# cd libIDL-0.8.14
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=x86_64-pc-linux-gnu
# make
# makeinfo --plaintext -o libIDL2.txt libIDL2.texi
# new2dir make install

sm want the old pangox lib:
# ln -s /usr/include/pango-1.0/pango /usr/include/pango
https://github.com/behdad/pangox-compat
# ./autogen.sh
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=x86_64-pc-linux-gnu
# make
# new2dir make install

# tar -xf seamonkey-1.1.19.source.tar.bz2
# cp -a -f mozconfig mozilla/.mozconfig
# cd mozilla

# patch -p1 < ../t2/gtk2-x11-libs.patch
patching file layout/build/Makefile.in
# patch -p1 < ../t2/MOZ_PLUGIN_PATH.patch
patching file xpfe/bootstrap/mozilla.in
Hunk #1 succeeded at 239 with fuzz 2 (offset 120 lines).
# export MOZCONFIG=`pwd`

NO# export CFLAGS+=' -fpermissive'
# export CXXFLAGS+=' -fpermissive'

edit 'configure' script, now have /usr/lib/pkgconfig/pangox.pc:
line 13652:
if $PKG_CONFIG --exists "pangox >= 1.1.0" ; then
line 13658:
_PANGOCHK_CFLAGS=`$PKG_CONFIG --cflags "pangox >= 1.1.0"`
line 13665:
_PANGOCHK_LIBS="`$PKG_CONFIG --libs-only-L \"pangox >= 1.1.0\"` `$PKG_CONFIG --libs-only-l \"pangox >= 1.1.0\"`"
line 13672:
_PANGOCHK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangox >= 1.1.0"`

see below, was getting mailnews extension smime fail.
NONOedit 'configure' unset MOZ_PSM line 13023:
NONO MOZ_PSM=
NOno, that is set or unset by --enable-crypto
NOinstead edit mozilla/mailnews/extensions/Makefile.in line 49:
NOBUILD_SMIME=
instead, for now, disable mailnews

# rm -rf objdir-sm-release
# make -f client.mk build

/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/xpcom/glue/nsBaseHashtable.h:145:30: error: ‘PutEntry’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
145 | EntryType* ent = PutEntry(aKey);
| ~~~~~~~~^~~~~~
line 145:
EntryType* ent = this->PutEntry(aKey);
line 159:
void Remove(KeyType aKey) { this->RemoveEntry(aKey); }
line 126:
EntryType* ent = this->GetEntry(aKey);

/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/xpcom/glue/nsClassHashtable.h:101:13: error: ‘GetEntry’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
101 | GetEntry(aKey);
| ~~~~~~~~^~~~~~
line 101:
this->GetEntry(aKey);

../../dist/include/xpcom/nsInterfaceHashtable.h:114:13: error: ‘GetEntry’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
114 | GetEntry(aKey);
| ~~~~~~~~^~~~~~
mozilla/xpcom/glue/nsInterfaceHashtable.h line 114:
this->GetEntry(aKey);
line 142:
this->GetEntry(aKey);

NOc++ -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O -o regxpcom regxpcom.o -L../../../dist/bin -L../../../dist/lib ../../../dist/lib/libxpcomglue.a -L../../../dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm
NO/usr/lib/gcc/x86_64-poky-linux/9.3.0/../../../../x86_64-poky-linux/bin/ld: ../../../dist/bin/libnspr4.so: undefined reference to `_PR_x86_64_AtomicIncrement'
NO/usr/lib/gcc/x86_64-poky-linux/9.3.0/../../../../x86_64-poky-linux/bin/ld: ../../../dist/bin/libnspr4.so: undefined reference to `_PR_x86_64_AtomicDecrement'
NO/usr/lib/gcc/x86_64-poky-linux/9.3.0/../../../../x86_64-poky-linux/bin/ld: ../../../dist/bin/libnspr4.so: undefined reference to `_PR_x86_64_AtomicSet'
NO/usr/lib/gcc/x86_64-poky-linux/9.3.0/../../../../x86_64-poky-linux/bin/ld: ../../../dist/bin/libnspr4.so: undefined reference to `_PR_x86_64_AtomicAdd'
NOcollect2: error: ld returned 1 exit status

../../../dist/include/system_wrappers/pango/pangox.h:3:15: fatal error: pango/pangox.h: No such file or directory
3 | #include_next <pango/pangox.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
...want older 1.0 pango. try this hack:
ALREADY DONE# ln -s /usr/include/pango-1.0/pango /usr/include/pango
NO# ln -s pangoxft.h /usr/include/pango-1.0/pango/pangox.h
...found pangox-compat library, see above.

../../../dist/include/xpcom/nsRefPtrHashtable.h:143:13: error: ‘GetEntry’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
143 | GetEntry(aKey);
| ~~~~~~~~^~~~~~
mozilla/xpcom/glue/nsRefPtrHashtable.h line 143:
this->GetEntry(aKey);

/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/layout/forms/../xul/base/src/nsStackFrame.h:55:19: error: friend declaration of ‘nsresult NS_NewStackFrame(nsIPresShell*, nsIFrame**, nsIBoxLayout*)’ specifies default arguments and isn’t a definition [-fpermissive]
55 | friend nsresult NS_NewStackFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame, nsIBoxLayout* aLayout = nsnull);
| ^~~~~~~~~~~~~~~~
trying with -fpermissive, see above.

make[4]: Entering directory '/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/security/coreconf'
/usr/bin/make -j1: *** No rule to make target ../coreconf/Linux5.10.mk. Stop.
../coreconf/config.mk:71: ../coreconf/Linux5.10.mk: No such file or directory
make[4]: *** [../coreconf/rules.mk:913: ../coreconf/Linux5.10.mk] Error 1
...this is because it wants to compile inbuilt nss.
i should go for system nss, but for now, just to find out what happens,
copy mozilla/security/coreconf/Linux2.6mk to Linux5.10.mk

/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/security/manager/ssl/src/nsPKCS11Slot.cpp:425:52: error: unable to find string literal operator ‘operator""fips’ with ‘const char [136]’, ‘long unsigned int’ arguments
425 | SECMOD_CreateModule(NULL,SECMOD_INT_NAME, NULL,SECMOD_INT_FLAGS);
| ^~~~~~~~~~~~~~~~
edit configure, unset MOZ_PSM -- see above.

have apended to mozconfig:
ac_add_options --with-system-nss
ac_add_options --with-system-nspr

getting link error with --enable-shared:
NOalso changed:
NOac_add_options --disable-static
NObut must have one of these enabled:
NOac_add_options --enable-shared

these are still broken (sqlite compile fail):
NOyeh, let's go for it, change these also, to enabled:
NOac_add_options --enable-storage
NOac_add_options --enable-places

recompiling...

make[6]: Entering directory '/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/objdir-sm-release/mailnews/extensions/smime/build'
Makefile:83: *** missing separator. Stop.

have decided to --disable-mailnews for now, to hopefully
get it to finish compiling.

why is this here?
ac_add_options --enable-module=psm
...comment it out.

c++ -o seamonkey-bin -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fpermissive -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O -DWIDGET_DLL=\"libwidget_gtk2.so\" -DGFXWIN_DLL=\"libgfx_gtk2.so\" -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 nsAppRunner.o showOSAlert.o nsSigHandlers.o nsStackFrameUnix.o nsStaticComponents.o nsNativeAppSupportGtk.o nsNativeAppSupportBase.o -L../../dist/bin -L../../dist/lib -L../../dist/lib/components ../../widget/src/xremoteclient/libxremote_client_s.a -L../../dist/bin -lxpcom -lxpcom_core -L../../dist/bin -lmozjs -L/usr/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lX11 -lgthread-2.0 -ldl -lm ../../dist/lib/components/libxpcom_compat_c.a ../../dist/lib/components/libxpconnect.a ../../dist/lib/components/libuconv.a ../../dist/lib/components/libi18n.a ../../dist/lib/components/libmork.a ../../dist/lib/components/libnecko.a ../../dist/lib/components/libnecko2.a ../../dist/lib/components/libpref.a ../../dist/lib/components/libcaps.a ../../dist/lib/components/librdf.a ../../dist/lib/components/libhtmlpars.a ../../dist/lib/components/libgfxps.a ../../dist/lib/components/libgfx_gtk.a ../../dist/lib/components/libimglib2.a ../../dist/lib/components/libgkplugin.a ../../dist/lib/components/libwidget_gtk2.a ../../dist/lib/components/libgklayout.a ../../dist/lib/components/libdocshell.a ../../dist/lib/components/libembedcomponents.a ../../dist/lib/components/libwebbrwsr.a ../../dist/lib/components/libeditor.a ../../dist/lib/components/libtxmgr.a ../../dist/lib/components/libcomposer.a ../../dist/lib/components/libnsappshell.a ../../dist/lib/components/liboji.a ../../dist/lib/components/libchrome.a ../../dist/lib/components/libprofile.a ../../dist/lib/components/libnsprefm.a ../../dist/lib/components/libmozfind.a ../../dist/lib/components/libappcomps.a ../../dist/lib/components/libfileview.a ../../dist/lib/components/libxremoteservice.a ../../dist/lib/components/libremoteservice.a ../../dist/lib/components/libpipboot.a ../../dist/lib/components/libpipnss.a ../../dist/lib/components/libpippki.a ../../dist/lib/components/libcookie.a ../../dist/lib/components/libtransformiix.a ../../dist/lib/components/libwallet.a ../../dist/lib/components/libwalletviewers.a ../../dist/lib/components/libxmlextras.a ../../dist/lib/components/libautoconfig.a ../../dist/lib/components/libsystem-pref.a ../../dist/lib/components/libuniversalchardet.a ../../dist/lib/components/libpermissions.a ../../dist/lib/components/libtypeaheadfind.a ../../dist/lib/components/libsearchservice.a ../../dist/lib/libunicharutil_s.a ../../dist/lib/libucvutil_s.a ../../dist/lib/libgtkxtbin.a ../../dist/lib/libgfxshared_s.a ../../dist/lib/libgfxpsshar.a ../../dist/lib/libgkgfx.a ../../dist/lib/libjsj.a -L../../dist/lib -lmozpng -ljpeg -lz -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lcrmf -lcairo -lXinerama -lXt -lXft -L../../dist/lib -lxpcom_compat
/usr/lib/gcc/x86_64-poky-linux/9.3.0/../../../../x86_64-poky-linux/bin/ld: /usr/lib/libcairo.so: undefined reference to symbol 'XRenderFindStandardFormat'
/usr/lib/gcc/x86_64-poky-linux/9.3.0/../../../../x86_64-poky-linux/bin/ld: /usr/lib/libXrender.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/config/rules.mk:816: seamonkey-bin] Error 1
make[3]: Leaving directory '/mnt/sda1/downloads/downloads2/input589/seamonkey-1.1.19/mozilla/objdir-sm-release/xpfe/bootstrap'

...it needs these extras:
-lX11 -lXrender -lxcb -lXau -lXdmcp
i have done it manually:
i edited mozilla/objdir-sm-release/config/autoconf.mk line 267:
XLDFLAGS = -lX11 -lXrender -lxcb -lXau -lXdmcp
...works, but need to find original place to do this.
so now have mozilla/objdir-sm-release/xpfe/bootstrap/seamonkey-bin

# make -f client.mk install

Here is gtk2-x11-libs.patch:

--- mozilla/layout/build/Makefile.in.orig	2006-07-17 21:05:13.000000000 +0200
+++ mozilla/layout/build/Makefile.in 2007-06-19 16:36:01.000000000 +0200
@@ -226,6 +226,7 @@

ifdef MOZ_ENABLE_GTK2
EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) \
+ $(XLDFLAGS) -lX11 -lXrender \
$(NULL)
endif

Here is MOZ_PLUGIN_PATH.patch:

--- ./xpfe/bootstrap/mozilla.in.vanilla	2005-09-21 12:45:56.000000000 +0200
+++ ./xpfe/bootstrap/mozilla.in 2005-09-21 12:48:39.000000000 +0200
@@ -119,6 +119,17 @@
fi
fi

+#
+## Make sure that we set the plugin path for backwards compatibility
+##
+if [ "$MOZ_PLUGIN_PATH" ]
+then
+ MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:/usr/lib/mozilla/plugins
+else
+ MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
+fi
+export MOZ_PLUGIN_PATH
+
script_args=""
moreargs=""
debugging=0
Here is the .mozconfig:
mk_add_options MOZ_CO_PROJECT=suite
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-sm-release
ac_add_options --localstatedir=/var
ac_add_options --sysconfdir=/etc
ac_add_options --prefix=/usr
ac_add_options --host=x86_64-pc-linux-gnu
ac_add_options --enable-application=suite
ac_add_options --with-extensions
#ac_add_options --enable-module=psm
ac_add_options --disable-accessibility
ac_add_options --disable-calendar
ac_add_options --disable-dbus
ac_add_options --disable-debug
ac_add_options --disable-mathml
ac_add_options --disable-gnomeui
ac_add_options --disable-gnomevfs
ac_add_options --disable-jsd
ac_add_options --disable-ldap
ac_add_options --disable-logging
ac_add_options --disable-parental-controls
ac_add_options --disable-shared
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --disable-xprint
ac_add_options --enable-composer
ac_add_options --enable-cookies
ac_add_options --enable-crypto
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-extensions=cookie,transformiix,wallet,xmlextras,pref,spellcheck,universalchardet,permissions,typeaheadfind
ac_add_options --disable-mailnews
ac_add_options --enable-necko-protocols=all
ac_add_options --enable-plugins
ac_add_options --enable-postscript
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --enable-strip
ac_add_options --enable-svg
ac_add_options --enable-system-hunspell
ac_add_options --enable-xinerama
ac_add_options --with-default-mozilla-five-home=/usr/lib/seamonkey
ac_add_options --with-distribution-id=org.bkhome
ac_add_options --with-pthreads
ac_add_options --with-system-bz2
ac_add_options --with-system-jpeg
ac_add_options --with-system-mng
ac_add_options --without-system-png
ac_add_options --with-system-zlib
ac_add_options --enable-xft
ac_add_options --enable-canvas
ac_add_options --enable-system-cairo
ac_add_options --disable-storage
ac_add_options --disable-places
ac_add_options --with-system-nss
ac_add_options --with-system-nspr

Note, was fixing a lot of errors due to having gcc 9.3.0, until got to one that I didn't understand, then introduced CXXFLAGS=' -fpermissive', which got around the errors, but in the long term do need to be able to compile without that option.

Tonight, I will do another compile, this time disable pango and use the internal cairo, and leave in debugging symbols.

Ah, I am one of those old-timers who still loves small applications. Just love that size reduction 51MB -> 9MB!

If anyone wants to have a go at compiling, I can upload the patched source so-far.

EDIT:
Have started a forum thread:

https://forum.puppylinux.com/viewtopic.php?t=4580      

Tags: easy