Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583156 - mail-client/thunderbird[system-sqlite] should call sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0) or switch to FTS5
Summary: mail-client/thunderbird[system-sqlite] should call sqlite3_db_config(db, SQLI...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
: 665196 672068 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-16 10:14 UTC by ascendant512+gentoo
Modified: 2018-12-07 21:04 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info sqlite (sqlite-info,16.03 KB, text/plain)
2016-05-16 10:14 UTC, ascendant512+gentoo
Details
add -DSQLITE_ENABLE_FTS3_TOKENIZER to sqlite-3.12.0.ebuild (ebuild.patch,644 bytes, patch)
2016-05-16 10:16 UTC, ascendant512+gentoo
Details | Diff
emerge --info thunderbird (thunderbird-info,16.65 KB, text/plain)
2016-05-16 10:18 UTC, ascendant512+gentoo
Details
thunderbird-sqlite_custom_fts3_tokenizers.patch (thunderbird-sqlite_custom_fts3_tokenizers.patch,1.19 KB, patch)
2018-11-28 22:25 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
thunderbird-sqlite_custom_fts3_tokenizers.patch (thunderbird-sqlite_custom_fts3_tokenizers.patch,2.95 KB, patch)
2018-11-29 23:23 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
thunderbird-sqlite_custom_fts3_tokenizers.patch (thunderbird-sqlite_custom_fts3_tokenizers.patch,3.30 KB, patch)
2018-12-01 07:46 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ascendant512+gentoo 2016-05-16 10:14:53 UTC
Created attachment 434400 [details]
emerge --info sqlite

Related bugs: https://bugs.archlinux.org/task/48225
https://bugs.archlinux.org/task/48260
From what I can tell, the dev-db/sqlite ebuild already tries to enable FTS3 in general by default, so it seems as though this should just be turned on for everyone.  Perhaps the defines implied it to be enabled previously and upstream changes now require that it be explicitly enabled?
compile options info: https://www.sqlite.org/compile.html
Stderr from Thunderbird before change:
$ thunderbird 

(process:8400): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
[calBackendLoader] Using libical backend at /usr/lib64/thunderbird/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical-manifest
enigmail.js: Registered components
mimeVerify.jsm: module initialized
TypeError: nounDef is undefined
-- Exception object --
*
-- Stack Trace --
gloda_ns_newQuery@resource:///modules/gloda/gloda.js:1897:5
ContactIdentityCompleter@resource://gre/components/glautocomp.js:178:22
nsAutoCompleteGloda@resource://gre/components/glautocomp.js:493:26
XPCOMUtils__getFactory/factory.createInstance@resource://gre/modules/XPCOMUtils.jsm:292:19
glodaSearch_XBL_Constructor@chrome://messenger/content/search.xml:75:13


After change:
$ thunderbird 

(process:17371): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
[calBackendLoader] Using libical backend at /usr/lib64/thunderbird/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical-manifest
enigmail.js: Registered components
mimeVerify.jsm: module initialized

(process:17482): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed


Features affected: search messages.  When searching, a blank tab will open if sqlite3 does not have the required options.
Comment 1 ascendant512+gentoo 2016-05-16 10:16:39 UTC
Created attachment 434402 [details, diff]
add -DSQLITE_ENABLE_FTS3_TOKENIZER to sqlite-3.12.0.ebuild

Attachment added with my solution for this error (patch to sqlite ebuild)
Comment 2 ascendant512+gentoo 2016-05-16 10:18:21 UTC
Created attachment 434404 [details]
emerge --info thunderbird
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2016-05-16 14:39:36 UTC
Already ahead of you on this one.  FTS3_TOKENIZER is needed for 'gloda' (Global Search) support; thunderbird-45.1.0 expressly disables gloda if system-sqlite is set.

Upstream (via my patch submissions, most likely) is working on using runtime-enabled FTS3_TOKENIZER support instead of requiring it to be compile-time enabled, given that a regular system sqlite is likely never going to have it enabled at compile time due to potential security concerns.

It may also become moot after a few versions if/when upstream switches to FTS5, but we'll see what resolves this issue first.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2016-05-17 02:40:42 UTC
Comment on attachment 434402 [details, diff]
add -DSQLITE_ENABLE_FTS3_TOKENIZER to sqlite-3.12.0.ebuild

-DSQLITE_ENABLE_FTS3_TOKENIZER will not be used in dev-db/sqlite because it would re-introduce CVE-2015-7036. See bug #574420.
Comment 5 Beelzebubbie 2016-06-02 12:49:23 UTC
seems now at least mail-client/thunderbird-45.1.0[system-sqlite] is broken – gloda not working at all
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2016-06-02 14:01:35 UTC
(In reply to Beelzebubbie from comment #5)
> seems now at least mail-client/thunderbird-45.1.0[system-sqlite] is broken –
> gloda not working at all

Yes, that is by design.  I've disabled it if system-sqlite is enabled, because if its not disabled then a whole -ton- of other things break too.
Comment 7 INODE64 Sistemas 2016-12-16 07:23:09 UTC
I check whith dev-db/sqlite-3.15.2 and mail-client/thunderbird-45.5.1 and I remove the lines into thunderbird-45.5.1.ebuilt to use system-sqlite and not disable gloda but it's not run, show this message:

--------------------------------------------------------------

TypeError: nounDef is undefined
-- Exception object --
*
-- Stack Trace --
gloda_ns_newQuery@resource:///modules/gloda/gloda.js:1902:5
ContactIdentityCompleter@resource://gre/components/glautocomp.js:179:22
nsAutoCompleteGloda@resource://gre/components/glautocomp.js:494:26
XPCOMUtils__getFactory/factory.createInstance@resource://gre/modules/XPCOMUtils.jsm:326:19
glodaSearch_XBL_Constructor@chrome://messenger/content/search.xml:75:13

--------------------------------------------------------------

I recomended disable flag system-sqlite becose into thunderbird the version of sqlite is different from sqlite standard and break gloda and any plugins
Comment 8 Jory A. Pratt gentoo-dev 2017-08-26 17:55:27 UTC
If you feel I have closed your bug and it is still a current issue, please reopen and update it completely. We will not work bugs that have no ebuild in tree any longer or can not be reproduced with a current system.

Thank You for your support and understanding
The Mozilla Team
Comment 9 Arfrever Frehtes Taifersar Arahesis 2017-08-28 06:43:40 UTC
Upstream bug is still open.

mail-client/thunderbird-52.3.0 still contains workaround:

    # dev-db/sqlite does not have FTS3_TOKENIZER support.
    # gloda needs it to function, and bad crashes happen when its enabled and doesn't work
    if in_iuse system-sqlite && use system-sqlite ; then
        echo "sticky_pref(\"mailnews.database.global.indexer.enabled\", false);" \
            >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die
    fi


'# dev-db/sqlite does not have FTS3_TOKENIZER support.' comment should be rather something like '# Support for two-argument version of fts3_tokenizer() SQL function requires explicit run-time enabling.'.
Comment 10 Steffen Hau 2017-08-30 20:06:35 UTC
May this be the cause for:

Thread 1 "thunderbird" received signal SIGSEGV, Segmentation fault.
0x00007ffff071650b in nsMsgDatabase::Commit(int) () from /usr/lib64/thunderbird/libxul.so

(I recompiled TB with -ggdb to get a better backtrace, but when trying to run TB  again in gdb, I'll get a SUGSEGV of GDB instead of TB. I'll try to get one after my summer holidays).

Even with a new profile, after creating an IMAP account, TB crashes some seconds later.

This issue started after emerge --emptytree because of world recompile with GCC 7.2.0.


emerge --info thunderbird
Portage 2.3.8 (python 3.5.3-final-0, default/linux/amd64/13.0/systemd, gcc-7.2.0, glibc-2.25-r4, 4.12.9-HAUIHAU x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.12.9-HAUIHAU-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.4.1
KiB Mem:    20450804 total,  11039712 free
KiB Swap:   20971516 total,  20971516 free
Timestamp of repository gentoo: Mon, 28 Aug 2017 21:00:01 +0000
Head commit of repository gentoo: e024022f07299defa43eda58572b1f003b3d103c
sh bash 4.4_p12
ld GNU gold (Gentoo 2.28.1 p1.0 2.28.1) 1.14
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.5.3::gentoo
dev-util/cmake:           3.9.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r1::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            7.2.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

hauihau
    location: /usr/local/portage/hauihau
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin -fno-delete-null-pointer-checks -flifetime-dse=1"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --keep-going=y --quiet-build=y --quiet-fail=y --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/home/gentoo/tmp/"
USE="X a52 aac aalib acl alsa amd64 avx avx2 bash-completion berkdb bluetooth bluray branding bzip2 cairo caps cdda cddb cdparanoia cdr cli cracklib crypt cups curl cxx dbus dga dri dts dv dvd egl encode exif ffmpeg flac fontconfig fortran ftp gd gdbm gif gmp gstreamer iconv icu imagemagick imlib ipv6 jpeg jpeg2k lame latex libcaca libnotify libsamplerate lzma lzo mad matroska mmx mmxext mng modules mp3 mpeg mtp multilib musepack ncurses networkmanager nls nptl nsplugin ogg openal opengl openmp pam pcre pdf png policykit pulseaudio qt5 quicktime readline seccomp session sndfile spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 svg syslog systemd tcpd theora threads tiff truetype udev unicode usb v4l vaapi vcd vim-syntax vorbis wavpack wayland webkit x264 xattr xcb xcomposite xinerama xml xmp xorg xosd xpm xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python3_5" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

mail-client/thunderbird-52.3.0::gentoo was built with the following:
USE="custom-cflags custom-optimization dbus jemalloc minimal pulseaudio -bindist -crypt -debug -gtk2 -hardened -ldap -lightning -mozdom (-neon) (-rust) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite -wifi" ABI_X86="(64)" L10N="de -ar -ast -be -bg -bn-BD -br -ca -cs -cy -da -el -en-GB -es-AR -es-ES -et -eu -fi -fr -fy -ga -gd -gl -he -hr -hsb -hu -hy -id -is -it -ja -ko -lt -nb -nl -nn -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -sq -sr -sv -ta-LK -tr -uk -vi -zh-CN -zh-TW"
CFLAGS="-march=native -pipe -flto=5 -fuse-linker-plugin -ggdb -Wno-return-type -w"
CXXFLAGS="-march=native -pipe -flto=5 -fuse-linker-plugin -fno-delete-null-pointer-checks -flifetime-dse=1 -ggdb -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -Wno-return-type -w"
LDFLAGS="-march=native -pipe -flto=5 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe -Wl,-rpath=/usr/lib64/thunderbird,--enable-new-dtags"
Comment 11 Ian Stakenvicius (RETIRED) gentoo-dev 2017-08-31 13:56:58 UTC
I haven't seen any segfauts from this, just internal crashes in various UI components and other parts of Thunderbird(or rather, thrown exceptions in some core javascript code that should never fail)  which make it go -very- wonky.  So it's possible, but I doubt it.

I too am planning to leave this bug open until thunderbird (or all of mozilla) changes how they use sqlite such that these features don't need to be compiled in.  I think that should still happen at some point.
Comment 12 Arfrever Frehtes Taifersar Arahesis 2018-09-04 05:05:15 UTC
*** Bug 665196 has been marked as a duplicate of this bug. ***
Comment 13 Arfrever Frehtes Taifersar Arahesis 2018-11-28 21:16:03 UTC
*** Bug 672068 has been marked as a duplicate of this bug. ***
Comment 14 Arfrever Frehtes Taifersar Arahesis 2018-11-28 22:25:38 UTC
Created attachment 556644 [details, diff]
thunderbird-sqlite_custom_fts3_tokenizers.patch

Untested patch
Comment 15 Thomas Deutschmann (RETIRED) gentoo-dev 2018-11-28 22:28:51 UTC
@ Johannes, could you please test the attached patch and report back if this will fix the problem for you?
Comment 16 Arfrever Frehtes Taifersar Arahesis 2018-11-28 22:38:49 UTC
For better testing, drop this part of mail-client/thunderbird ebuild:

        # dev-db/sqlite does not have FTS3_TOKENIZER support.
        # gloda needs it to function, and bad crashes happen when its enabled and doesn't work
        if use system-sqlite ; then
                echo "sticky_pref(\"mailnews.database.global.indexer.enabled\", false);" \
                        >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die
        fi
Comment 17 Ian Stakenvicius (RETIRED) gentoo-dev 2018-11-29 19:44:49 UTC
This patch with GLODA re-enabled seems to be successful for me, I'm not seeing any of the issues seen previously, and the repeat re-indexing of imap folders I had experienced ( that I believe is what was reported in bug 672068 ) has also stopped.

As thunderbird-60.3.2 release is imminent, I'm planning to include this patch with it.
Comment 18 Arfrever Frehtes Taifersar Arahesis 2018-11-29 23:23:37 UTC
Created attachment 556742 [details, diff]
thunderbird-sqlite_custom_fts3_tokenizers.patch

Patch which should be acceptable for upstream
Comment 19 Larry the Git Cow gentoo-dev 2018-11-30 20:09:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=60d30853f6b82bf9ef5f276bb7ea8cc0c1ab8baa

commit 60d30853f6b82bf9ef5f276bb7ea8cc0c1ab8baa
Author:     Ian Stakenvicius <axs@gentoo.org>
AuthorDate: 2018-11-30 19:49:39 +0000
Commit:     Ian Stakenvicius <axs@gentoo.org>
CommitDate: 2018-11-30 20:09:04 +0000

    thunderbird:  bump to 60.3.2
    
    This bump re-enables Global Search when system-sqlite is used.
    
    Bug: https://bugs.gentoo.org/583156
    Signed-off-by: Ian Stakenvicius <axs@gentoo.org>

 mail-client/thunderbird/Manifest                   |  54 ++
 .../thunderbird/files/sqlite3-fts3-tokenizer.patch |  87 ++++
 mail-client/thunderbird/thunderbird-60.3.2.ebuild  | 562 +++++++++++++++++++++
 3 files changed, 703 insertions(+)
Comment 20 Larry the Git Cow gentoo-dev 2018-11-30 21:12:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e8391d08065f1e1006660fd8289db6cfbf5a974

commit 0e8391d08065f1e1006660fd8289db6cfbf5a974
Author:     Ian Stakenvicius <axs@gentoo.org>
AuthorDate: 2018-11-30 21:09:03 +0000
Commit:     Ian Stakenvicius <axs@gentoo.org>
CommitDate: 2018-11-30 21:11:58 +0000

    mail-client/thunderbird: bump to 60.3.2
    
    This bump re-enables Global Search when system-sqlite is used.
    
    Bug: https://bugs.gentoo.org/583156
    Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.11

 mail-client/thunderbird/Manifest                   | 108 ++++++++++-----------
 .../thunderbird/files/sqlite3-fts3-tokenizer.patch |  87 +++++++++++++++++
 ...ird-60.3.1.ebuild => thunderbird-60.3.2.ebuild} |  10 +-
 3 files changed, 147 insertions(+), 58 deletions(-)
Comment 21 Johannes Buchner 2018-12-01 01:44:50 UTC
I tried to insert the patch and got:

339:53.85 ../../storage/mozStorageConnection.o: In function `mozilla::storage::Connection::initialize()':
339:53.85 mozStorageConnection.cpp:(.text._ZN7mozilla7storage10Connection10initializeEv+0xdb): undefined reference to `sqlite3_db_config'
339:53.85 ../../storage/mozStorageConnection.o: In function `mozilla::storage::Connection::initialize(nsIFile*)':
339:53.85 mozStorageConnection.cpp:(.text._ZN7mozilla7storage10Connection10initializeEP7nsIFile+0x1db): undefined reference to `sqlite3_db_config'
339:53.85 ../../storage/mozStorageConnection.o: In function `mozilla::storage::Connection::initialize(nsIFileURL*)':
339:53.85 mozStorageConnection.cpp:(.text._ZN7mozilla7storage10Connection10initializeEP10nsIFileURL+0x184): undefined reference to `sqlite3_db_config'
339:53.85 collect2: error: ld returned 1 exit status
339:53.85 gmake[4]: *** [/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/config/rules.mk:701: libxul.so] Error 1
339:53.85 gmake[4]: Leaving directory '/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/tbird/toolkit/library'
339:53.85 gmake[3]: *** [/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/config/recurse.mk:73: toolkit/library/target] Error 2
339:53.86 gmake[3]: Leaving directory '/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/tbird'
339:53.86 gmake[2]: *** [/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/config/recurse.mk:33: compile] Error 2
339:53.86 gmake[2]: Leaving directory '/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/tbird'
339:53.86 gmake[1]: *** [/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/config/rules.mk:434: default] Error 2
339:53.86 gmake[1]: Leaving directory '/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/tbird'
339:53.86 gmake: *** [client.mk:168: build] Error 2
Comment 22 Arfrever Frehtes Taifersar Arahesis 2018-12-01 07:32:06 UTC
Probable fix (which should be inserted into the patch):


--- a/db/sqlite3/src/sqlite.symbols     Thu Nov 29 23:02:10 2018 +0000
+++ b/db/sqlite3/src/sqlite.symbols     Sat Dec 01 07:27:15 2018 +0000
@@ -45,6 +45,7 @@
 sqlite3_create_function16
 sqlite3_create_module
 sqlite3_data_count
+sqlite3_db_config
 sqlite3_db_filename
 sqlite3_db_handle
 sqlite3_db_mutex
Comment 23 tt_1 2018-12-01 07:34:48 UTC
Can you please post your full build log and emerge --info etc. pp.? I did a test compile for thunderbird-60.3.2 with USE=system-sqlite and got none of these errors.
Comment 24 Arfrever Frehtes Taifersar Arahesis 2018-12-01 07:46:58 UTC
Created attachment 556800 [details, diff]
thunderbird-sqlite_custom_fts3_tokenizers.patch
Comment 25 Larry the Git Cow gentoo-dev 2018-12-01 11:32:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5d03e308d5fd02e980314641295fbef792311b0

commit d5d03e308d5fd02e980314641295fbef792311b0
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-12-01 10:37:53 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-12-01 11:32:09 +0000

    mail-client/thunderbird: bump sqlite3 FTS3 tokenizer patch
    
    Bug: https://bugs.gentoo.org/583156
    Closes: https://bugs.gentoo.org/672316
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../thunderbird-60-sqlite3-fts3-tokenizer.patch    |  86 ++++
 .../thunderbird/thunderbird-60.3.2-r1.ebuild       | 555 +++++++++++++++++++++
 2 files changed, 641 insertions(+)
Comment 26 Johannes Buchner 2018-12-01 13:24:07 UTC
emerge --info here: https://672068.bugs.gentoo.org/attachment.cgi?id=556460
Unfortunately, I lost the build log. I am trying the updated patch now.
Comment 27 tt_1 2018-12-01 22:31:44 UTC
I guess you've been using clang, and me gcc, hence the error on your side and none on my side. It seems to be ok now, and not broken again on the gcc side, as my build of 60.3.2-r1 with gcc compiled without any error.
Comment 28 Johannes Buchner 2018-12-01 22:40:10 UTC
I don't use clang, I use gcc too. The last command before linking was

339:52.22 Executing: /usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0/x86_64-pc-linux-gnu-g++ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-security -Wformat-overflow=2 -fno-sized-deallocation -pipe -march=native -fstack-check -fstack-protector-all -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns -fno-schedule-insns2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -O2 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,--gc-sections -Wl,-h,libxul.so -o libxul.so /mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/tbird/toolkit/library/tmpNMACd9.list -lpthread -Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib64/thunderbird,--enable-new-dtags -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro ../../../toolkit/library/StaticXULComponents.ld -Wl,-rpath-link,/mnt/data/tmp/portage/mail-client/thunderbird-60.3.1/work/thunderbird-60.3.1/tbird/dist/bin -Wl,-rpath-link,/usr/lib -fdiagnostics-color ../../js/src/build/libjs_static.a ../../js/src/build/libjs_static.a ../../js/src/build/libjs_static.a x86_64-unknown-linux-gnu/release/libgkrust.a ../../comm/ldap/c-sdk/libraries/libldap/libldap60.so ../../comm/ldap/c-sdk/libraries/libldif/libldif60.so ../../comm/ldap/c-sdk/libraries/libprldap/libprldap60.so ../../security/sandbox/linux/libmozsandbox.so ../../config/external/lgpllibs/liblgpllibs.so ../../config/external/sqlite/libmozsqlite3.so ../../widget/gtk/mozgtk/stub/libmozgtk_stub.so -Wl,--version-script,symverscript -ldl -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L/usr/lib64 -lffi -lz -lm -lrt -lX11 -lX11-xcb -lxcb -lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender -lssl3 -lsmime3 -lnss3 -lnssutil3 -lfreetype -lfontconfig -L/usr/lib64 -ljpeg -lpng -lgraphite2 -lharfbuzz -lhunspell-1.6 -lvpx -lpixman-1 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lstartup-notification-1 -lxcb-shm -lpangoft2-1.0 -lXt -lgthread-2.0
Comment 29 Johannes Buchner 2018-12-03 02:36:03 UTC
New patch seems to work for me.
Comment 30 Arfrever Frehtes Taifersar Arahesis 2018-12-03 21:43:37 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9159b311064b20d1b0b3f8aa5723b9a8d7506cd8

commit 9159b311064b20d1b0b3f8aa5723b9a8d7506cd8
Author:     Ian Stakenvicius <axs@gentoo.org>
AuthorDate: 2018-12-03 20:12:33 +0000
Commit:     Ian Stakenvicius <axs@gentoo.org>
CommitDate: 2018-12-03 20:13:18 +0000

    mail-client/thunderbird: drop 60.3.2
    
    Cleaned up the sqlite3 patch for upstream and removed old patch and
    v60.3.2 ebuild in favour of -r1
    
    Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.11

 .../thunderbird/files/sqlite3-fts3-tokenizer.patch |  87 ----
 .../thunderbird-60-sqlite3-fts3-tokenizer.patch    |  53 +-
 mail-client/thunderbird/thunderbird-60.3.2.ebuild  | 562 ---------------------
 3 files changed, 33 insertions(+), 669 deletions(-)
Comment 31 Arfrever Frehtes Taifersar Arahesis 2018-12-03 21:51:39 UTC
(In reply to commit 9159b311064b20d1b0b3f8aa5723b9a8d7506cd8 described in comment #30)

Maybe the patch for upstream should have macro with name starting with "MOZ_"?
I would suggest MOZ_SQLITE_ENABLE_FTS3_TOKENIZER.
Comment 32 Ian Stakenvicius (RETIRED) gentoo-dev 2018-12-03 22:04:01 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #31)
> (In reply to commit 9159b311064b20d1b0b3f8aa5723b9a8d7506cd8 described in
> comment #30)
> 
> Maybe the patch for upstream should have macro with name starting with
> "MOZ_"?
> I would suggest MOZ_SQLITE_ENABLE_FTS3_TOKENIZER.

Possibly.  I want to wait for glandium to leave his comments on the method overall, I expect he'll add a nit on the name at the same time.
Comment 33 Ian Stakenvicius (RETIRED) gentoo-dev 2018-12-07 21:04:25 UTC
I think we're good on this now.  Closing.