Bug 226659 - fix building editors/libreoffice on powerpc64
Summary: fix building editors/libreoffice on powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-16 15:44 UTC by Curtis Hamilton
Modified: 2018-03-28 07:00 UTC (History)
3 users (show)

See Also:


Attachments
libreoffice ports build patch (7.11 KB, patch)
2018-03-24 00:32 UTC, Justin Hibbits
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Hamilton 2018-03-16 15:44:36 UTC
I'm not sure what has changed, but after many successful builds, using my previously published patches. I'm now unable to build LO 5.3.7.2.

I'm getting the following error:

[LNK] Executable/gengal.bin
S=/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2 && I=$S/instdir && W=$S/workdir &&  /usr/local/bin/ccache g++6    -Wl,-z,origin '-Wl,-rpath,$ORIGIN' -Wl,-rpath-link,$I/program -fstack-protector-strong -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc  -Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -L$W/LinkTarget/StaticLibrary -L$I/sdk/lib  -L$I/program  -L$I/program -L/usr/local/lib -L/usr/local/lib   -L/usr/local/lib -R/usr/local/lib  $W/CxxObject/svx/source/gengal/gengal.o     -Wl,--start-group  $W/LinkTarget/StaticLibrary/libvclmain.a  $W/LinkTarget/StaticLibrary/libglxtest.a   -lpthread -lX11  -Wl,--end-group -Wl,--no-as-needed -lbasegfxlo -luno_sal -ltllo -lsvllo -lsvtlo -lcomphelper -luno_cppu -luno_cppuhelpergcc3 -lutllo -lvcllo -lsvxcorelo -o $I/program/gengal.bin
S=/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2 && I=$S/instdir && W=$S/workdir &&  readelf -d $I/program/libmsformslo.so | grep SONAME > $W/LinkTarget/Library/libmsformslo.so.exports.tmp; nm  --dynamic --extern-only --defined-only --format=posix $I/program/libmsformslo.so | cut -d' ' -f1-2 >> $W/LinkTarget/Library/libmsformslo.so.exports.tmp && if cmp -s $W/LinkTarget/Library/libmsformslo.so.exports.tmp  $W/LinkTarget/Library/libmsformslo.so.exports; then rm $W/LinkTarget/Library/libmsformslo.so.exports.tmp; else mv $W/LinkTarget/Library/libmsformslo.so.exports.tmp  $W/LinkTarget/Library/libmsformslo.so.exports && touch -r $I/program/libmsformslo.so  $W/LinkTarget/Library/libmsformslo.so.exports; fi
TEMPFILE=/usr/ports/editors/libreoffice/work/gbuild.XXXXXX.2sIlfTDo &&  mv ${TEMPFILE} /usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/workdir/LinkTarget/Library/libmsformslo.so.objectlist
/usr/local/bin/ld: warning: libstdc++.so.6, needed by //usr/local/lib/libGLU.so.1, may conflict with libstdc++.so.6.0.22
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::toNativePath(COLLADABU::Utils::SystemType) const'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::getURIString() const'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::getPathFileBase() const'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::getPathExtension() const'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADAFW::UniqueId::toAscii() const'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::getPathDir() const'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::getPathFile() const'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::setPath(std::string const&, std::string const&, std::string const&)'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::Utils::createDirectoryIfNeeded(std::string const&)'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADAFW::UniqueId::UniqueId(std::string const&)'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADAFW::Root::loadDocument(std::string const&)'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::URI(std::string const&, bool)'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libsfxlo.so: undefined reference to `orcus::json::document_tree::load(std::string const&, orcus::json_config const&)'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADABU::URI::setPathDir(std::string const&)'
/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/libavmedialo.so: undefined reference to `COLLADAFW::Texture::getTexcoord() const'
collect2: error: ld returned 1 exit status
gmake[3]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/svx/Executable_gengal.mk:20: /usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2/instdir/program/gengal.bin] Error 1
gmake[3]: Leaving directory '/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2'
gmake[2]: *** [Makefile:265: build] Error 2
gmake[2]: Leaving directory '/usr/ports/editors/libreoffice/work/libreoffice-5.3.7.2'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Justin Hibbits freebsd_committer freebsd_triage 2018-03-16 15:57:08 UTC
Hi Curtis,

I was able to build with your patch from bug 200020 plus the following patch to the port Makefile just the other day:

Index: /usr/local/poudriere/ports/default/editors/libreoffice/Makefile
===================================================================
--- /usr/local/poudriere/ports/default/editors/libreoffice/Makefile     (revision 463728)
+++ /usr/local/poudriere/ports/default/editors/libreoffice/Makefile     (working copy)
@@ -298,6 +295,9 @@
 post-patch:
        ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
            ${WRKSRC}/shell/source/unix/exec/shellexec.cxx
+.if ${COMPILER_FEATURES:Mlibstdc++}
+       ${REINPLACE_CMD} -e 's/gb_CC/gb_CXX/' ${WRKSRC}/solenv/gbuild/platform/unxgcc.mk
+.endif
 
 pre-configure:
        @${TOUCH} ${WRKSRC}/autogen.lastrun
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2018-03-17 09:41:46 UTC
Hi Justin, is it possible for you to check if this also works for 6.0.2?
Comment 3 Curtis Hamilton 2018-03-20 23:40:26 UTC
I've given up my attempts to build LO 5.3.7.2 and turned my attention to 6.0.2.1.  However, I'm experiencing the below build error:

[LNK] Library/libtest-setupvcl.so
S=/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1 && I=$S/instdir && W=$S/workdir &&  /usr/local/bin/ccache g++5 -shared -Wl,-z,noexecstack   -Wl,-z,origin '-Wl,-rpath,$ORIGIN/../Library' -Wl,-rpath-link,$I/program -fstack-protector-strong -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc  -Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -L$W/LinkTarget/StaticLibrary -L$I/sdk/lib  -L$I/program  -L$I/program  -L$W/LinkTarget/Library -L/usr/local/lib -lboost_locale -Wl,-rpath,/usr/local/lib   -L/usr/local/lib -R/usr/local/lib  $W/CxxObject/test/source/setupvcl.o      -Wl,--start-group    -Wl,--end-group -Wl,--no-as-needed -lcomphelper -luno_cppu -li18nlangtag -luno_sal -ltllo -lutllo -lvcllo  -o $W/LinkTarget/Library/libtest-setupvcl.so 
[LNK] Executable/ui-previewer
S=/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1 && I=$S/instdir && W=$S/workdir &&  readelf -d $W/LinkTarget/Library/libtest-setupvcl.so | grep SONAME > $W/LinkTarget/Library/libtest-setupvcl.so.exports.tmp; nm  --dynamic --extern-only --defined-only --format=posix $W/LinkTarget/Library/libtest-setupvcl.so | cut -d' ' -f1-2 >> $W/LinkTarget/Library/libtest-setupvcl.so.exports.tmp && if cmp -s $W/LinkTarget/Library/libtest-setupvcl.so.exports.tmp  $W/LinkTarget/Library/libtest-setupvcl.so.exports; then rm $W/LinkTarget/Library/libtest-setupvcl.so.exports.tmp; else mv $W/LinkTarget/Library/libtest-setupvcl.so.exports.tmp  $W/LinkTarget/Library/libtest-setupvcl.so.exports && touch -r $W/LinkTarget/Library/libtest-setupvcl.so  $W/LinkTarget/Library/libtest-setupvcl.so.exports; fi
TEMPFILE=/usr/ports/editors/libreoffice/work/gbuild.XXXXXX.xaODbV3U &&  mv ${TEMPFILE} /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/LinkTarget/Library/libtest-setupvcl.so.objectlist
S=/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1 && I=$S/instdir && W=$S/workdir &&  /usr/local/bin/ccache g++5    -Wl,-z,origin '-Wl,-rpath,$ORIGIN' -Wl,-rpath-link,$I/program -fstack-protector-strong -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc  -Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -L$W/LinkTarget/StaticLibrary -L$I/sdk/lib  -L$I/program  -L$I/program -L/usr/local/lib -lboost_locale -Wl,-rpath,/usr/local/lib   -L/usr/local/lib -R/usr/local/lib  $W/CxxObject/vcl/source/uipreviewer/previewer.o      -Wl,--start-group $W/LinkTarget/StaticLibrary/libvclmain.a $W/LinkTarget/StaticLibrary/libglxtest.a   -lm  -lpthread -lX11  -Wl,--end-group -Wl,--no-as-needed -lcomphelper -luno_cppu -luno_cppuhelpergcc3 -luno_sal -ltllo -lucbhelper -lvcllo  -o $I/program/ui-previewer 
[LNK] Executable/outdevgrind
S=/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1 && I=$S/instdir && W=$S/workdir &&  /usr/local/bin/ccache g++5    -Wl,-z,origin '-Wl,-rpath,$ORIGIN/../Library' -Wl,-rpath-link,$I/program -fstack-protector-strong -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc  -Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -L$W/LinkTarget/StaticLibrary -L$I/sdk/lib  -L$I/program  -L$I/program  -L$W/LinkTarget/Library -L/usr/local/lib -lboost_locale -Wl,-rpath,/usr/local/lib   -L/usr/local/lib -R/usr/local/lib  $W/CxxObject/vcl/workben/outdevgrind.o      -Wl,--start-group    -Wl,--end-group -Wl,--no-as-needed -ltllo -luno_sal -lvcllo -luno_cppu -luno_cppuhelpergcc3 -lcomphelper  -o $W/LinkTarget/Executable/outdevgrind 
[LNK] Executable/vcldemo
/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/instdir/program/libutllo.so: undefined reference to `boost::locale::generator::generate(std::string const&) const'
/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/instdir/program/libutllo.so: undefined reference to `boost::locale::generator::add_messages_domain(std::string const&)'
/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/instdir/program/libutllo.so: undefined reference to `boost::locale::generator::add_messages_path(std::string const&)'
collect2: error: ld returned 1 exit status
/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/instdir/program/libutllo.so: undefined reference to `boost::locale::generator::generate(std::string const&) const'
/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/instdir/program/libutllo.so: undefined reference to `boost::locale::generator::add_messages_domain(std::string const&)'
/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/instdir/program/libutllo.so: undefined reference to `boost::locale::generator::add_messages_path(std::string const&)'
collect2: error: ld returned 1 exit status
gmake[3]: *** [/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/solenv/gbuild/LinkTarget.mk:627: /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/LinkTarget/Executable/outdevgrind] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/vcl/Executable_ui-previewer.mk:10: /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/instdir/program/ui-previewer] Error 1
rm /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_prepostdash.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_he.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/count_word.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/sent.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/line.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/edit_word.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_nodash.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_he.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/edit_word_he.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/edit_word_hu.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_prepostdash.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/count_word.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/line.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/edit_word_he.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/edit_word_hu.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/sent.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/char.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/edit_word.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/char_in.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_hu.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_nodash.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/char_in.txt /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/dict_word_hu.brk /usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1/workdir/CustomTarget/i18npool/breakiterator/char.brk
gmake[3]: Leaving directory '/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1'
gmake[2]: *** [Makefile:268: build] Error 2
gmake[2]: Leaving directory '/usr/ports/editors/libreoffice/work/libreoffice-6.0.2.1'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Any idea on what's broken?

BTW, the patch I developed works with LO 6.0.2
Comment 4 Justin Hibbits freebsd_committer freebsd_triage 2018-03-23 15:26:14 UTC
(In reply to Curtis Hamilton from comment #3)

It looks to me that there's a missing "-lboost_locale" in the link line.  I'm also test building LibreOffice 6 in poudriere, and can report my findings later.
Comment 5 Justin Hibbits freebsd_committer freebsd_triage 2018-03-24 00:32:26 UTC
Created attachment 191765 [details]
libreoffice ports build patch

With the attached patch (apply it against your ports tree) I can build editors/libreoffice (6.0.2).

The patch against files/patch-solenv_gbuild_platform_unxgcc.mk may be unnecessary, but I don't want to spend another 13 hours to find out.
Comment 6 Curtis Hamilton 2018-03-24 23:04:07 UTC
I verify I was able to build 6.0.2 with your patch. 

I will run another build to check if the patch against files/patch-solenv_gbuild_platform_unxgcc.mk is unnecessary.  Build time approx. 6 hrs with my G5 Quad.
Comment 7 Curtis Hamilton 2018-03-25 11:09:52 UTC
I've verified that the patch to files/patch-solenv_gbuild_platform_unxgcc.mk is unnecessary.
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-03-28 06:59:40 UTC
A commit references this bug:

Author: lwhsu
Date: Wed Mar 28 06:59:31 UTC 2018
New revision: 465781
URL: https://svnweb.freebsd.org/changeset/ports/465781

Log:
  - Fix build on powerpc64

  PR:		200020 [1], 226659 [2]
  Submitted by:	gmbroome@vcu.edu [1]
  		Curtis Hamilton <hamiltcl@verizon.net> [2]
  		jhibbits

Changes:
  head/editors/libreoffice/Makefile
  head/editors/libreoffice/files/patch-powerpc64