mailnews: build x86_64, crashes on start (#8494)

This commit is contained in:
Jérôme Duval
2023-05-06 16:17:20 +02:00
committed by GitHub
parent 87f0eb728d
commit 78d1cd4a4a
2 changed files with 156 additions and 30 deletions

View File

@@ -5,7 +5,7 @@ needs of both casual and power users. So does its fork MailNews."
HOMEPAGE="https://github.com/mmadia/bezilla"
COPYRIGHT="1995-2009 Mozilla Developers and Contributors"
LICENSE="MPL v1.1"
REVISION="2"
REVISION="3"
srcGitRev="6862542e81d0407f8fbdb8cf96a48fdc3156e902"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="ecdb6e15bd3a48e4b3e036e7fe3c12341c36ddef621403c558a15441cf364d79"
@@ -93,6 +93,7 @@ BUILD()
export MOZ_APP_DISPLAYNAME=MailNews
export AUTOCONF='autoconf-2.13'
export BUILD_OPT=1
export CXXFLAGS="-std=gnu++03"
if [ $effectiveTargetArchitecture == x86_64 ]; then
opt_flags='--enable-optimize=-O3 -fno-strict-aliasing -fpermissive'
@@ -138,6 +139,7 @@ BUILD()
INSTALL()
{
mkdir -p $developDir $libDir $binDir $dataDir
cd mozilla
make install
@@ -151,7 +153,7 @@ INSTALL()
# arranging the files in lib and add-ons directories
cd $appsDir/MailNews
mv libnspr4.so libnss3.so libnssutil3.so libplc4.so libplds4.so \
mv libnss3.so libnssutil3.so \
libsmime3.so libsoftokn3.so libsqlite3.so libssl3.so libxpcom.so \
libxpcom_compat.so libxpcom_core.so libldap50.so libmozjs.so \
libprldap50.so lib
@@ -170,7 +172,6 @@ INSTALL()
packageEntries devel \
$developDir \
$dataDir/idl \
$dataDir/aclocal \
$binDir/thunderbird-config
# TODO: fix $dist_bin/$MOZILLA_BIN in cmd:thunderbird script

View File

@@ -1,11 +1,11 @@
From e6304426ad2434592cef1c142deb6defbaf2bf31 Mon Sep 17 00:00:00 2001
From b15243a63d4938e81fdff9927d9926027db50438 Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Fri, 12 Dec 2014 13:45:46 +0200
Subject: Enable Haiku support in configure.in
diff --git a/mozilla/configure.in b/mozilla/configure.in
index 23cc7e7..9bd8cb5 100644
index 23cc7e7..9bd8cb5 100755
--- a/mozilla/configure.in
+++ b/mozilla/configure.in
@@ -885,12 +885,8 @@ if test -n "$CROSS_COMPILE"; then
@@ -24,17 +24,17 @@ index 23cc7e7..9bd8cb5 100644
else
OS_TARGET=`uname -s`
--
2.15.1
2.37.3
From 7ec730aacb0949bf310a32518a65db6dbb779452 Mon Sep 17 00:00:00 2001
From 5c285d71fff93c94cc5a13933cdd560ed2c2bd32 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sun, 19 Apr 2015 20:59:27 +0300
Subject: gcc5 fixes
diff --git a/mozilla/config/rules.mk b/mozilla/config/rules.mk
index bb8b09a..2b030ee 100644
index bb8b09a..2b030ee 100755
--- a/mozilla/config/rules.mk
+++ b/mozilla/config/rules.mk
@@ -669,7 +669,7 @@ ifdef IS_COMPONENT
@@ -56,7 +56,7 @@ index bb8b09a..2b030ee 100644
endif # IS_COMPONENT
endif # SHARED_LIBRARY
diff --git a/mozilla/configure.in b/mozilla/configure.in
index 9bd8cb5..f6dba31 100644
index 9bd8cb5..f6dba31 100755
--- a/mozilla/configure.in
+++ b/mozilla/configure.in
@@ -1499,7 +1499,7 @@ case "$target" in
@@ -69,7 +69,7 @@ index 9bd8cb5..f6dba31 100644
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
TK_LIBS='-lbe -lroot'
diff --git a/mozilla/directory/c-sdk/config/BeOS.mk b/mozilla/directory/c-sdk/config/BeOS.mk
index 881e644..01c3062 100644
index 881e644..01c3062 100755
--- a/mozilla/directory/c-sdk/config/BeOS.mk
+++ b/mozilla/directory/c-sdk/config/BeOS.mk
@@ -66,7 +66,7 @@ CC = gcc
@@ -82,7 +82,7 @@ index 881e644..01c3062 100644
ifdef BUILD_OPT
OPTIMIZER = -O2
diff --git a/mozilla/directory/c-sdk/configure.in b/mozilla/directory/c-sdk/configure.in
index ab471a1..1c3b91f 100644
index ab471a1..1c3b91f 100755
--- a/mozilla/directory/c-sdk/configure.in
+++ b/mozilla/directory/c-sdk/configure.in
@@ -824,7 +824,7 @@ case "$target" in
@@ -95,7 +95,7 @@ index ab471a1..1c3b91f 100644
MDCPUCFG_H=_beos.cfg
USE_BTHREADS=1
diff --git a/mozilla/modules/libpref/src/prefapi.cpp b/mozilla/modules/libpref/src/prefapi.cpp
index b772070..155219b 100644
index b772070..155219b 100755
--- a/mozilla/modules/libpref/src/prefapi.cpp
+++ b/mozilla/modules/libpref/src/prefapi.cpp
@@ -78,9 +78,6 @@
@@ -109,7 +109,7 @@ index b772070..155219b 100644
#define BOGUS_DEFAULT_INT_PREF_VALUE (-5632)
#define BOGUS_DEFAULT_BOOL_PREF_VALUE (-2)
diff --git a/mozilla/modules/libreg/src/vr_stubs.c b/mozilla/modules/libreg/src/vr_stubs.c
index f7f5a6f..94ec266 100644
index f7f5a6f..94ec266 100755
--- a/mozilla/modules/libreg/src/vr_stubs.c
+++ b/mozilla/modules/libreg/src/vr_stubs.c
@@ -619,7 +619,7 @@ long BUILDNUM = NS_BUILD_ID;
@@ -122,7 +122,7 @@ index f7f5a6f..94ec266 100644
#ifdef STANDALONE_REGISTRY
extern XP_File vr_fileOpen (const char *name, const char * mode)
diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
index 9d427da..f15c296 100644
index 9d427da..f15c296 100755
--- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
+++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
@@ -702,7 +702,7 @@ ns4xPlugin::CreatePlugin(nsIServiceManagerObsolete* aServiceMgr,
@@ -144,7 +144,7 @@ index 9d427da..f15c296 100644
// Makoto Hamanaka <VYA04230@nifty.com>
diff --git a/mozilla/nsprpub/pr/src/misc/prnetdb.c b/mozilla/nsprpub/pr/src/misc/prnetdb.c
index f758841..df83cb3 100644
index f758841..df83cb3 100755
--- a/mozilla/nsprpub/pr/src/misc/prnetdb.c
+++ b/mozilla/nsprpub/pr/src/misc/prnetdb.c
@@ -90,7 +90,7 @@ PRLock *_pr_dnsLock = NULL;
@@ -157,7 +157,7 @@ index f758841..df83cb3 100644
#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT)) \
diff --git a/mozilla/security/coreconf/BeOS.mk b/mozilla/security/coreconf/BeOS.mk
index b42b71d..ff5269b 100644
index b42b71d..ff5269b 100755
--- a/mozilla/security/coreconf/BeOS.mk
+++ b/mozilla/security/coreconf/BeOS.mk
@@ -59,7 +59,7 @@ else
@@ -170,7 +170,7 @@ index b42b71d..ff5269b 100644
OPTIMIZER = -O2
endif
diff --git a/mozilla/widget/src/beos/nsAppShell.cpp b/mozilla/widget/src/beos/nsAppShell.cpp
index fdcd236..49f26fb 100644
index fdcd236..49f26fb 100755
--- a/mozilla/widget/src/beos/nsAppShell.cpp
+++ b/mozilla/widget/src/beos/nsAppShell.cpp
@@ -464,7 +464,7 @@ void *nsAppShell::GetNextEvent()
@@ -183,7 +183,7 @@ index fdcd236..49f26fb 100644
}
}
diff --git a/mozilla/xpcom/build/nsXPCOMPrivate.h b/mozilla/xpcom/build/nsXPCOMPrivate.h
index 9fdb996..304d84f 100644
index 9fdb996..304d84f 100755
--- a/mozilla/xpcom/build/nsXPCOMPrivate.h
+++ b/mozilla/xpcom/build/nsXPCOMPrivate.h
@@ -207,6 +207,8 @@ NS_GetFrozenFunctions(XPCOMFunctions *entryPoints, const char* libraryPath);
@@ -196,7 +196,7 @@ index 9fdb996..304d84f 100644
#define XUL_DLL "libxul"MOZ_DLL_SUFFIX
diff --git a/mozilla/xpcom/glue/nsGREGlue.cpp b/mozilla/xpcom/glue/nsGREGlue.cpp
index 752b2ca..dd21a21 100644
index 752b2ca..dd21a21 100755
--- a/mozilla/xpcom/glue/nsGREGlue.cpp
+++ b/mozilla/xpcom/glue/nsGREGlue.cpp
@@ -158,7 +158,7 @@ GRE_GetGREPathWithProperties(const GREVersionRange *versions,
@@ -209,7 +209,7 @@ index 752b2ca..dd21a21 100644
return NS_OK;
#elif XP_WIN
diff --git a/mozilla/xpcom/io/SpecialSystemDirectory.cpp b/mozilla/xpcom/io/SpecialSystemDirectory.cpp
index c3c7066..5807117 100644
index c3c7066..5807117 100755
--- a/mozilla/xpcom/io/SpecialSystemDirectory.cpp
+++ b/mozilla/xpcom/io/SpecialSystemDirectory.cpp
@@ -82,8 +82,9 @@
@@ -224,7 +224,7 @@ index c3c7066..5807117 100644
#include <FindDirectory.h>
#include <fs_info.h>
diff --git a/mozilla/xpcom/io/nsDirectoryServiceDefs.h b/mozilla/xpcom/io/nsDirectoryServiceDefs.h
index de28282..b2bfcb4 100644
index de28282..b2bfcb4 100755
--- a/mozilla/xpcom/io/nsDirectoryServiceDefs.h
+++ b/mozilla/xpcom/io/nsDirectoryServiceDefs.h
@@ -189,7 +189,8 @@
@@ -238,7 +238,7 @@ index de28282..b2bfcb4 100644
#define NS_BEOS_HOME_DIR NS_OS_HOME_DIR
#define NS_BEOS_DESKTOP_DIR NS_OS_DESKTOP_DIR
diff --git a/mozilla/xpcom/obsolete/nsSpecialSystemDirectory.cpp b/mozilla/xpcom/obsolete/nsSpecialSystemDirectory.cpp
index 0288d4a..63d2a12 100644
index 0288d4a..63d2a12 100755
--- a/mozilla/xpcom/obsolete/nsSpecialSystemDirectory.cpp
+++ b/mozilla/xpcom/obsolete/nsSpecialSystemDirectory.cpp
@@ -70,7 +70,8 @@
@@ -261,7 +261,7 @@ index 0288d4a..63d2a12 100644
{
char path[MAXPATHLEN];
diff --git a/mozilla/xpcom/threads/plevent.c b/mozilla/xpcom/threads/plevent.c
index 3d89f28..07da841 100644
index 3d89f28..07da841 100755
--- a/mozilla/xpcom/threads/plevent.c
+++ b/mozilla/xpcom/threads/plevent.c
@@ -169,8 +169,6 @@ struct PLEventQueue {
@@ -383,17 +383,17 @@ index 43bac3b..a1058df 100644
# Read below for some history on how the above string was devised.
#
--
2.15.1
2.37.3
From 97982f850464d4822c1ae57fe25994e75db12ec7 Mon Sep 17 00:00:00 2001
From 8f03d0906bdeccebcc27f8adf0d17b192d3ee7f3 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 12 Jan 2018 02:21:03 +0300
Subject: Fix build with newer png
diff --git a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp
index 22947c1..ee4abfe 100644
index 22947c1..ee4abfe 100755
--- a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp
+++ b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp
@@ -171,7 +171,7 @@ static NS_METHOD ReadDataOut(nsIInputStream* in,
@@ -460,7 +460,7 @@ index 22947c1..ee4abfe 100644
diff --git a/mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp b/mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp
index 473fbbf..1934ada 100644
index 473fbbf..1934ada 100755
--- a/mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp
+++ b/mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp
@@ -111,9 +111,7 @@ NS_IMETHODIMP nsPNGEncoder::InitFromData(const PRUint8* aData,
@@ -475,10 +475,10 @@ index 473fbbf..1934ada 100644
return NS_ERROR_OUT_OF_MEMORY;
png_info* info_ptr = png_create_info_struct(png_ptr);
--
2.15.1
2.37.3
From 207233d6d8837083f36506f1e8a3fcfdce0f5c64 Mon Sep 17 00:00:00 2001
From 807c9f571c201519e9e1fd0470ad7047cc99782e Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Wed, 22 Apr 2015 10:05:15 +0300
Subject: mozconfig clean-up
@@ -527,4 +527,129 @@ index a49ad60..98b123a 100644
# ----------------------------------------------------------------------------
--
2.15.1
2.37.3
From 340871885a1281fed481767c3306f4a8df820536 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 23 Apr 2023 16:49:44 +0200
Subject: c++ standard
diff --git a/mozilla/security/nss/lib/softoken/secmodt.h b/mozilla/security/nss/lib/softoken/secmodt.h
index 59fdca0..2256fb6 100755
--- a/mozilla/security/nss/lib/softoken/secmodt.h
+++ b/mozilla/security/nss/lib/softoken/secmodt.h
@@ -338,7 +338,7 @@ typedef PRUint32 PK11AttrFlags;
#define SECMOD_SLOT_FLAGS "slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]"
#define SECMOD_MAKE_NSS_FLAGS(fips,slot) \
-"Flags=internal,critical"fips" slotparams=("#slot"={"SECMOD_SLOT_FLAGS"})"
+"Flags=internal,critical" fips" slotparams=("#slot"={" SECMOD_SLOT_FLAGS"})"
#define SECMOD_INT_NAME "NSS Internal PKCS #11 Module"
#define SECMOD_INT_FLAGS SECMOD_MAKE_NSS_FLAGS("",1)
diff --git a/mozilla/xpcom/build/nsXPCOMPrivate.h b/mozilla/xpcom/build/nsXPCOMPrivate.h
index 304d84f..5fa01d0 100755
--- a/mozilla/xpcom/build/nsXPCOMPrivate.h
+++ b/mozilla/xpcom/build/nsXPCOMPrivate.h
@@ -209,12 +209,12 @@ NS_GetFrozenFunctions(XPCOMFunctions *entryPoints, const char* libraryPath);
#define GRE_CONF_PATH "/boot/home/config/settings/GRE/gre.conf"
#define GRE_CONF_DIR "/boot/home/config/settings/GRE/"
#define GRE_USER_CONF_DIR "/boot/home/config/settings/GRE/"
-#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
-#define XUL_DLL "libxul"MOZ_DLL_SUFFIX
+#define XPCOM_DLL "libxpcom" MOZ_DLL_SUFFIX
+#define XUL_DLL "libxul" MOZ_DLL_SUFFIX
#else // Unix
-#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
+#define XPCOM_DLL "libxpcom" MOZ_DLL_SUFFIX
// you have to love apple..
#ifdef XP_MACOSX
--
2.37.3
From c2bba1b93d080922b7d0bd1eb3c089efc635e06f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 23 Apr 2023 17:48:44 +0200
Subject: haiku x86_64
diff --git a/mozilla/build/autoconf/config.guess b/mozilla/build/autoconf/config.guess
index da83314..c718e86 100755
--- a/mozilla/build/autoconf/config.guess
+++ b/mozilla/build/autoconf/config.guess
@@ -1248,7 +1248,10 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
- SX-4:SUPER-UX:*:*)
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
diff --git a/mozilla/directory/c-sdk/config/autoconf/config.guess b/mozilla/directory/c-sdk/config/autoconf/config.guess
index da83314..c718e86 100755
--- a/mozilla/directory/c-sdk/config/autoconf/config.guess
+++ b/mozilla/directory/c-sdk/config/autoconf/config.guess
@@ -1248,7 +1248,10 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
- SX-4:SUPER-UX:*:*)
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
diff --git a/mozilla/nsprpub/build/autoconf/config.guess b/mozilla/nsprpub/build/autoconf/config.guess
index da83314..c718e86 100755
--- a/mozilla/nsprpub/build/autoconf/config.guess
+++ b/mozilla/nsprpub/build/autoconf/config.guess
@@ -1248,7 +1248,10 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
- SX-4:SUPER-UX:*:*)
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
--
2.37.3
From cbe0116875aa8f5f80fe6901f3b54c32df9b5016 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 23 Apr 2023 18:13:56 +0200
Subject: hack to not regenerate dependencies
diff --git a/mozilla/config/rules.mk b/mozilla/config/rules.mk
index 2b030ee..df4ea68 100755
--- a/mozilla/config/rules.mk
+++ b/mozilla/config/rules.mk
@@ -1754,7 +1754,7 @@ ifneq (,$(OBJS)$(SIMPLE_PROGRAMS))
MDDEPEND_FILES := $(strip $(wildcard $(MDDEPDIR)/*.pp))
ifneq (,$(MDDEPEND_FILES))
-ifdef PERL
+ifndef PERL
# The script mddepend.pl checks the dependencies and writes to stdout
# one rule to force out-of-date objects. For example,
# foo.o boo.o: FORCE
--
2.37.3