When start libreoffice it exit with error: /usr/local/lib/libreoffice/program/libvclplug_gtklo.so: Undefined symbol "__cxa_thread_atexit"
Which version of freebsd are you building on, what options?
(In reply to Baptiste Daroussin from comment #1) FreeBSD Version: 10.2-RELEASE Libreoffice Version: 5.2.3_1 Libreoffice Options: CUPS : on GNOME : off GTK2 : on GTK3 : off JAVA : off KDE4 : off MMEDIA : off PGSQL : off SDK : off SYSTRAY : off TEST : off VERBOSE : off WEBDAV : off
Are you forcing build with gcc?
No, use default settings. Also attached build log of libreoffice.
Created attachment 176955 [details] Poudriere build log.
Is the problem still happening after disabling ccache?
I will disabling ccache, build libreoffice again and reporting result.
With disabled ccache, it is the same result.
Created attachment 176957 [details] replace thread_local with __thread
Created attachment 176958 [details] replace thread_local with __thread
I have added 2 patches to be added in editors/libreoffice/files can you try them?
Error build: ---------- snap ----------- [build CXX] connectivity/source/drivers/file/FCatalog.cxx [build CXX] connectivity/source/drivers/file/FColumns.cxx [build CXX] connectivity/source/drivers/file/FConnection.cxx [build CXX] connectivity/source/drivers/file/FDatabaseMetaData.cxx [build CXX] connectivity/source/drivers/file/FDateFunctions.cxx [build CXX] connectivity/source/drivers/file/FDriver.cxx [build CXX] connectivity/source/drivers/file/FNoException.cxx [build CXX] connectivity/source/drivers/file/FNumericFunctions.cxx [build CXX] connectivity/source/drivers/file/FPreparedStatement.cxx [build CXX] connectivity/source/drivers/file/FResultSet.cxx [build CXX] connectivity/source/drivers/file/FResultSetMetaData.cxx [build CXX] connectivity/source/drivers/file/FStatement.cxx [build CXX] connectivity/source/drivers/file/FStringFunctions.cxx [build CXX] connectivity/source/drivers/file/FTable.cxx /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.2.3.3/vcl/unx/gtk/gtkinst.cxx:301:49: error: type of thread-local variable has non-trivial destruction __thread std::stack<sal_uIntPtr> GtkYieldMutex::yieldCounts; ^ /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.2.3.3/vcl/unx/gtk/gtkinst.cxx:301:49: note: use 'thread_local' to allow this 1 error generated. gmake[2]: *** [/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.2.3.3/solenv/gbuild/LinkTarget.mk:191: /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.2.3.3/workdir/CxxObject/vcl/unx/gtk/gtkinst.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... gmake[2]: Leaving directory '/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.2.3.3' gmake[1]: *** [Makefile:258: build] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.2.3.3' ===> Compilation failed unexpectedly.
Created attachment 176967 [details] revert thread_local addition
Created attachment 176968 [details] revert thread_local addition
My first approach was wrong. I have reverted (with the 2 new patches) the commit that happen during 5.2 dev which introduced usage of thread_local which makes build require __cxa_thread_atexit Can you test them? With my testing it seems ok, but I would prefer a double check
Works on 10.3-RELEASE-amd64. Thanks.
A commit references this bug: Author: bapt Date: Sun Nov 13 22:38:16 UTC 2016 New revision: 426069 URL: https://svnweb.freebsd.org/changeset/ports/426069 Log: Fix runtime issues related to thread_locale __cxa_thread_atexit which is needed when building c++11 program using thread_locale is only defined on FreeBSD 11-STABLE and 12-CURRENT Backout the change in libreoffice which happened during the 5.2 dev phase adding thread_locale PR: 214473 Reported by: Du?an Vejnovi? <freebsd@dussan.org> Tested by: Du?an Vejnovi? <freebsd@dussan.org> Changes: head/editors/libreoffice/Makefile.common head/editors/libreoffice/files/patch-Makefile.in head/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx head/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx
A commit references this bug: Author: jkim Date: Wed Feb 8 22:22:21 UTC 2017 New revision: 433677 URL: https://svnweb.freebsd.org/changeset/ports/433677 Log: Do not apply the kludge for PR214473 on all supported FreeBSD versions. These patches actually reintroduced an upstream bug. https://gerrit.libreoffice.org/22291 PR: 214473 Changes: head/editors/libreoffice/Makefile head/editors/libreoffice/files/extrapatch-vcl_inc_unx_gtk_gtkinst.hxx head/editors/libreoffice/files/extrapatch-vcl_unx_gtk_gtkinst.cxx head/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx head/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx