如何编译 LibreOffice

发表于

分类:

(于2021-05-22针对最新编译问题进行了更新,在Fedora 33下测试通过)

一、安装编译环境依赖

$ sudo dnf builddep libreoffice

$ sudo dnf install ccache  # 安装 ccache,从而能够在重新编译时复用之前编译的缓存以加速编译。您也可以不用ccache
$ ccache -M 10G  # 将 ccache 缓存大小限制设置为 10G
$ ccache --set-config=cache_dir=</path/to/ccache_dir> # 若空间不足,可将 ccache 的缓存目录设置为其他的位置(比如挂载的其他分区目录)

$ sudo dnf install patch avahi-devel  # builddep 没有安装好这两个编译依赖的包
$ sudo dnf install fakeroot rpm-build # 若您需要 rpm 或 deb 格式的安装包,则需要安装这两个依赖项

二、克隆源代码及子模块(git clone)

首先克隆主代码。此处克隆 libreoffice-7-1 分支。克隆时,因为我只需要最新的源代码(不需要历次的所有commit),因此使用了depth=1选项。

$ git clone --depth=1 --branch libreoffice-7-1 git://go.suokunlong.cn/lo/core ./libreoffice-7-1
正克隆到 './libreoffice-7-1'…
remote: 枚举对象: 120360, 完成.
remote: 对象计数中: 100% (120360/120360), 完成.
remote: 压缩对象中: 100% (86011/86011), 完成.
remote: 总共 120360 (差异 46040),复用 87907 (差异 32504)
接收对象中: 100% (120360/120360), 272.72 MiB | 9.36 MiB/s, 完成.
处理 delta 中: 100% (46040/46040), 完成.
正在更新文件: 100% (120889/120889), 完成.

然后,配置子模块。若不进行如下配置,则若启用中文用户界面选项,会默认去git.libreoffice.org克隆子模块代码,速度较慢并且无法观察克隆进展:

$ cd libreoffice-7-1/
$ git submodule init
子模组 'dictionaries'(https://git.libreoffice.org/dictionaries)已对路径 'dictionaries' 注册
子模组 'helpcontent2'(https://git.libreoffice.org/help)已对路径 'helpcontent2' 注册
子模组 'translations'(https://git.libreoffice.org/translations)已对路径 'translations' 注册

我们编译时只需要 translations 子模块,没有启用帮助及词典,因此到 .git/config 中将 dictionaries 和 helpcontent2 两个子模块删除。然后,将translations模块的url修改为国内镜像地址(比如 git://go.suokunlong.cn/lo/translations),以加快克隆速度。

然后,抓取子模块。此处使用 –depth=1 选项以只获取最新的翻译字符串,并且使用 –progress 选项以显示克隆进展。

$ git submodule update --progress --depth=1
正克隆到 '/home/suokunlong/build/lo/libreoffice-7-1/translations'...
remote: 枚举对象: 45290, 完成.        
remote: 对象计数中: 100% (45290/45290), 完成.        
remote: 压缩对象中: 100% (11030/11030), 完成.        
remote: 总共 45290 (差异 22278),复用 37455 (差异 14997)        
接收对象中: 100% (45290/45290), 107.72 MiB | 7.20 MiB/s, 完成.
处理 delta 中: 100% (22278/22278), 完成.
remote: 总共 0 (差异 0),复用 0 (差异 0)
remote: 枚举对象: 14403, 完成.
remote: 对象计数中: 100% (14403/14403), 完成.
remote: 压缩对象中: 100% (3316/3316), 完成.
remote: 总共 11565 (差异 5892),复用 9773 (差异 4229)
接收对象中: 100% (11565/11565), 89.61 MiB | 3.06 MiB/s, 完成.
处理 delta 中: 100% (5892/5892), 完成 155 个本地对象.
来自 git://go.suokunlong.cn/lo/translations
 * branch              4a12b40c8751323705d82539be43d04990f934a9 -> FETCH_HEAD
子模组路径 'translations':检出 '4a12b40c8751323705d82539be43d04990f934a9'

最后,获取 external_tarballs. 这是 libreoffice 在编译时使用的第三方库等包,默认是从境外服务器去抓取,速度很慢。我已将常用的包放在了境内服务器,您需要从以下位置下载。可以使用下载器一次性全部下载,或者在下面的 make 阶段根据终端输出再去仅下载需要的文件。下载的文件请放置到下列autogen.input中设定的路径下。

https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs/

三、配置编译选项(autogen.input)

你可以不指定编译选项,直接按照下一部分介绍的 autogen.sh命令生成makefile,这样做就会按照默认的编译选项进行。你也可以将编译选项作为autogen.sh运行时的参数传递给它,这种情况下就会使用命令行参数作为编译选项。

但最方便的是通过autogen.input来设置编译选项。这个文件仅在不存在任何命令行参数时才会生效。在克隆的源代码根目录下建立 autogen.input 文件,内容如下。完整的编译配置选项及其含义,见源代码根目录下的configure文件。

# 我一般直接在线浏览帮助文档,因此将帮助禁用了
--without-help
--without-helppack-integration

# 启用简体及繁体中文用户界面
--with-lang=zh-CN zh-TW

# 自己编译的话在线更新及崩溃报告功能就没啥用了,禁用
--disable-online-update
--disable-breakpad

# 禁用 Office Development Kit。若启用 ODK,则额外需要doxygen依赖项。
--disable-odk
--without-doxygen

# 若编译好之后您需要rpm (或deb)包,则需要启用下列两项:
--enable-epm
--with-package-format=rpm

# 若您需要在多个不同版本的编译之间共享external_tarballs第三方源代码包,则可设置下列选项:
# --with-external-tar=<external_tarballs文件夹路径>

# 现在很多功能都用不到java了,因此我直接将其禁用
--without-java

# 我需要用到firebird数据库,因此启用
--enable-firebird-sdbc
--without-system-firebird

--enable-python=internal

四、编译(autogen.sh && make)

在源代码根目录下运行 autogen.sh。该脚本会调用 autogen.input中定义的编译选项。

./autogen.sh

若提示缺少某个包,则很可能是需要手动安装这个包的devel版本。若看到如下的提示,则表示autogen.sh运行无错误:


****************************************************************************

To build, run:
/usr/bin/make

To view some help, run:
/usr/bin/make help

After the build has finished successfully, you can immediately run what you built using the command:
instdir/program/soffice

If you want to run the smoketest, run:
/usr/bin/make check

*************************************

此时就可以运行 make 命令进行编译了:

make

此时,若提示正在从 dev-www.libreoffice.org 下载各种包,但墙内速度很慢的情况下,可以按下 Ctrl-C键中断,然后手动从我的墙内缓存链接下载,并放入 –with-external-tar 编译选项指定的目录。也可以从其他任何地方下载,比如提示下载 Python-3.7.7.tar.xz 时也可以从 http://npm.taobao.org/mirrors/python/3.7.7/ 下载。

编译比较耗时。按照官方wiki上的说法,首次编译大约耗时约 = 8小时 / cpu核心数,后续更改源代码后增量编译耗时从几秒钟到几小时不等,取决于代码更改的程度。若需要频繁重新编译,则安装ccache包是个不错的选择,autogen.sh若检测到你安装了ccache则会自动启用。你也可以用icecream等分布式编译方式加速编译。

编译完成后,执行 .instdir/program/soffice 即可运行。若在autogen.input 中启用了 “–with-package-format=rpm deb” ,则生成的安装包在 workdir/installation中。

常见错误解决

1. configure: error: The missing Perl modules are: FindBin

解决:安装perl的FindBin包,一般情况下你的Linux发行版包管理器中已经有现成的:$ sudo dnf install perl-FindBin

2. configure: error: could not find function ‘com_err’ required for Kerberos 5

$ sudo apt-get install libkrb5

3. _crypt.cpython-3.8.so has suspicious NEEDED: libcrypt.so.2

Question:

when I run make check (built on the old Fedora 34), I get “instdir/program/python-core-3.8.14/lib/lib-dynload/_crypt.cpython-3.8.so has suspicious NEEDED: libcrypt.so.2” error. What can I do with this error?

Answer:

sberg: (that specific check is only triggered by a non-empty –with-package-format=…), you can silence it with adding to your autogen.input the line: LO_ELFCHECK_ALLOWLIST=libcrypt.so.2
sberg: the error means that the packages you build depend on a lib that’s supposedly not available in LO’s baseline runtime environment (as specified in README.md)

4. configure: error: “patch” not found in $PATH, install it

$ sudo dnf install patch


评论:

《 “如何编译 LibreOffice” 》 有 203 条评论

  1. 殊途

    发布于

    CPU:HUAWEI,Kunpeng 920
    系统:银河麒麟 Kylin V10 SP2
    LibreOffice版本:7.6.7.2
    报错:
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:8:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h: In constructor ‘constexpr SkGlyph::SkGlyph()’:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:346:56: error: temporary of non-literal type ‘SkGlyph’ in a constant expression
    constexpr SkGlyph() : SkGlyph{SkPackedGlyphID()} { }
    ^
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ is not literal because:
    class SkGlyph {
    ^~~~~~~
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ has a non-trivial destructor
    make[1]: *** [/usr/local/src/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:402: /usr/local/src/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/skia/src/core/SkBitmapDevice.o] Error 1
    make[1]: *** Waiting for unfinished jobs….
    In file included from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkScalerContext.h:20:0,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkDevice.h:22,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkCanvasPriv.cpp:11:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h: In constructor ‘constexpr SkGlyph::SkGlyph()’:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:346:56: error: temporary of non-literal type ‘SkGlyph’ in a constant expression
    constexpr SkGlyph() : SkGlyph{SkPackedGlyphID()} { }
    ^
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ is not literal because:
    class SkGlyph {
    ^~~~~~~
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ has a non-trivial destructor
    make[1]: *** [/usr/local/src/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /usr/local/src/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/skia/src/core/SkCanvasPriv.o] Error 1
    In file included from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkScalerContext.h:20:0,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkDevice.h:22,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.h:18,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkCanvas.cpp:28:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h: In constructor ‘constexpr SkGlyph::SkGlyph()’:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:346:56: error: temporary of non-literal type ‘SkGlyph’ in a constant expression
    constexpr SkGlyph() : SkGlyph{SkPackedGlyphID()} { }
    ^
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ is not literal because:
    class SkGlyph {
    ^~~~~~~
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ has a non-trivial destructor
    make[1]: *** [/usr/local/src/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /usr/local/src/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/skia/src/core/SkCanvas.o] Error 1
    In file included from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkScalerContext.h:20:0,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkDevice.h:22,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/gpu/ganesh/Device_v1.h:13,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/gpu/ganesh/GrRecordingContextPriv.h:15,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkBlurMF.cpp:30:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h: In constructor ‘constexpr SkGlyph::SkGlyph()’:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:346:56: error: temporary of non-literal type ‘SkGlyph’ in a constant expression
    constexpr SkGlyph() : SkGlyph{SkPackedGlyphID()} { }
    ^
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ is not literal because:
    class SkGlyph {
    ^~~~~~~
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ has a non-trivial destructor
    make[1]: *** [/usr/local/src/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /usr/local/src/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/skia/src/core/SkBlurMF.o] Error 1
    In file included from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkScalerContext.h:20:0,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkDevice.h:22,
    from /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkChromeRemoteGlyphCache.cpp:15:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h: In constructor ‘constexpr SkGlyph::SkGlyph()’:
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:346:56: error: temporary of non-literal type ‘SkGlyph’ in a constant expression
    constexpr SkGlyph() : SkGlyph{SkPackedGlyphID()} { }
    ^
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ is not literal because:
    class SkGlyph {
    ^~~~~~~
    /usr/local/src/libreoffice-7.6.7.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:343:7: note: ‘SkGlyph’ has a non-trivial destructor
    make[1]: *** [/usr/local/src/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /usr/local/src/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/skia/src/core/SkChromeRemoteGlyphCache.o] Error 1
    make: *** [Makefile:289: build] Error 2

    在autogen.input加上–diable-skia后出现新的报错
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_pushbutton.o] Error 1
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_combobox.o] Error 1
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/fpdf_structtree.o] Error 1
    In file included from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/bytestring.h:23:0,
    from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentmarkitem.h:10,
    from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentmarkitem.cpp:7:
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h: In instantiation of ‘class fxcrt::StringViewTemplate’:
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h:281:23: required from here
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h:56:13: error: no type named ‘type’ in ‘struct std::enable_if’
    constexpr StringViewTemplate(const UnsignedType* ptr, size_t size) noexcept
    ^~~~~~~~~~~~~~~~~~
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h:68:13: error: no type named ‘type’ in ‘struct std::enable_if’
    constexpr StringViewTemplate(
    ^~~~~~~~~~~~~~~~~~
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/fpdf_progressive.o] Error 1
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textfield.o] Error 1
    In file included from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/bytestring.h:23:0,
    from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/fx_string.h:14,
    from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object.h:15,
    from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pattern.h:10,
    from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_colorspace.h:18,
    from /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_colorstate.cpp:11:
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h: In instantiation of ‘class fxcrt::StringViewTemplate’:
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h:281:23: required from here
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h:56:13: error: no type named ‘type’ in ‘struct std::enable_if’
    constexpr StringViewTemplate(const UnsignedType* ptr, size_t size) noexcept
    ^~~~~~~~~~~~~~~~~~
    /cache1/libreoffice-7.6.7.2/workdir/UnpackedTarball/pdfium/core/fxcrt/string_view_template.h:68:13: error: no type named ‘type’ in ‘struct std::enable_if’
    constexpr StringViewTemplate(
    ^~~~~~~~~~~~~~~~~~
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textobject.o] Error 1
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_checkbox.o] Error 1
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_radiobutton.o] Error 1
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/fpdf_editpath.o] Error 1
    make[1]: *** [/cache1/libreoffice-7.6.7.2/solenv/gbuild/LinkTarget.mk:400: /cache1/libreoffice-7.6.7.2/workdir/GenCxxObject/UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_perwindowdata.o] Error 1

    请问各位大佬有遇到过么?如何处理?

  2. 会飞的大象

    发布于

    求助,银河麒麟v10 sp3,龙芯架构cpu Loongson-3A5000LL,autogen.sh 执行完成了make报错
    instdir -c
    make -j 4 -rs -f /home/knowledge/kkFileView/libreoffice-7.6.7.2/Makefile.gbuild build
    [DEP] LNK:Library/libuno_cppuhelpergcc3.so.3.d
    [CXX] cppuhelper/source/macro_expander.cxx
    [CXX] cppuhelper/source/paths.cxx
    [CXX] cppuhelper/source/propertysetmixin.cxx
    [CXX] cppuhelper/source/propshlp.cxx
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for a thread-safe mkdir -p… /usr/bin/mkdir -p
    checking for gawk… gawk
    checking whether make sets $(MAKE)… yes
    checking whether make supports nested variables… yes
    checking whether to enable maintainer-specific portions of Makefiles… no
    checking whether make supports nested variables… (cached) yes
    checking build system type… Invalid configuration `loongarch64-unknown-linux-gnu’: machine `loongarch64-unknown’ not recognized
    configure: error: /bin/sh build-aux/config.sub loongarch64-unknown-linux-gnu failed
    make[1]: *** [/home/knowledge/kkFileView/libreoffice-7.6.7.2/external/libgpg-error/ExternalProject_libgpg-error.mk:37:/home/knowledge/kkFileView/libreoffice-7.6.7.2/workdir/ExternalProject/libgpg-error/build] 错误 1
    make[1]: *** 正在等待未完成的任务….
    make: *** [Makefile:289:build] 错误 2

  3. zhoujuan

    发布于

    你好,我在执行完./autogen.sh后,执行make发生下面的错误是什么原因啊?
    zj@zj-virtual-machine:~/libreoffice$ make
    mkdir -p /home/zj/libreoffice/instdir
    /home/zj/libreoffice/solenv/bin/install-gdb-printers -a /home/zj/libreoffice/instdir -c
    make -j 2 -rs -f /home/zj/libreoffice/Makefile.gbuild build
    [WPE] wiping installation output dir
    [ECH] CustomTarget/instsetoo_native/setup/setuprc
    [ECH] CustomTarget/instsetoo_native/setup/versionrc
    [LOC] top level modules: libreoffice
    [GAL] backgrounds
    [GAL] sounds
    [MOD] postprocess
    Aborted (core dumped)
    terminate called after throwing an instance of ‘com::sun::star::uno::RuntimeException’
    make[1]: *** [/home/zj/libreoffice/solenv/gbuild/Gallery.mk:57: /home/zj/libreoffice/workdir/Gallery/sounds.done] Error 1
    make[1]: *** Waiting for unfinished jobs….
    Aborted (core dumped)
    terminate called after throwing an instance of ‘com::sun::star::uno::RuntimeException’
    make[1]: *** [/home/zj/libreoffice/solenv/gbuild/Gallery.mk:57: /home/zj/libreoffice/workdir/Gallery/backgrounds.done] Error 1
    make: *** [Makefile:290: build] Error 2
    zj@zj-virtual-machine:~/libreoffice$

    1. 看来都快已经编译完成了出现了错误。你make distclean然后重新autogen.sh并make, 还会有错误吗?是什么系统?编译的LibreOffice的哪个版本?

  4. Sakura286

    发布于

    目前本文中提到的 external tarball 国内镜像中的 harfbuzz-8.2.2.tar.xz (md5: f5adf8c047bd6bfd30d37085329be149)应该是有问题的,解压时会报错 xz: (stdin): Compressed data is corrupt

    我用了国外源(https://dev-www.libreoffice.org/src/)的 harfbuzz-8.2.2.tar.xz (md5: a9bdd356798cf1ea68794576429442d4),该文件可以正常解压

    看起来国内源镜像过来的时候还需要再校验一遍?

    1. 有可能是我下载的过程中网络意外中断导致的。我替换一下。

    2. 我这个external_tarball国内镜像目前其实不是真正的镜像,只能说是一个缓存,是我编译是用到的tarball我把它们保留了下来然后共享了一下。要完整镜像的话,我得写一段代码每天去官方连接中看有没有新的文件然后更新,目前没时间写。如果这个东西用的人多的话我花点时间还是值得的,过两天我看看。

  5. zhoujx

    发布于

    android现在so编译有多大?我这边也想裁剪,而且Android的头文件都没有编译的嘛?

  6. 娃哈哈

    发布于

    在鲲鹏ARM架构、麒麟V10 sp3上编译libreoffice-7.5.3.2时,提示如下报错,有人遇到吗?该如何解决呢?

    [CXX] workdir/UnpackedTarball/skia/src/core/SkBitmapProcState.cpp
    [CXX] workdir/UnpackedTarball/skia/src/core/SkBitmapProcState_matrixProcs.cpp
    In file included from /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkGlyphBuffer.h:12:0,
    from /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkGlyphRun.h:22,
    from /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkGlyphRunPainter.h:13,
    from /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.h:19,
    from /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:8:
    /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h: 在构造函数‘constexpr SkGlyph::SkGlyph()’中:
    /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:288:56: 错误:temporary of non-literal type ‘SkGlyph’ in a constant expression
    constexpr SkGlyph() : SkGlyph{SkPackedGlyphID()} { }
    ^
    /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:285:7: 附注:‘SkGlyph’ is not literal because:
    class SkGlyph {
    ^~~~~~~
    /opt/libreoffice-7.5.3.2/workdir/UnpackedTarball/skia/src/core/SkGlyph.h:285:7: 附注: ‘SkGlyph’ has a non-trivial destructor
    [CXX] workdir/UnpackedTarball/skia/src/core/SkBlendMode.cpp
    [CXX] workdir/UnpackedTarball/skia/src/core/SkBlendModeBlender.cpp
    make[1]: *** [/opt/libreoffice-7.5.3.2/solenv/gbuild/LinkTarget.mk:404:/opt/libreoffice-7.5.3.2/workdir/GenCxxObject/UnpackedTarball/skia/src/core/SkBitmapDevice.o] 错误 1
    make[1]: *** 正在等待未完成的任务….
    make: *** [Makefile:289:build] 错误 2

    1. Think Future

      发布于

      楼主解决了吗?俺也遇到这个问题了。

      1. 鱼在锅里游

        发布于

        有解决方案吗

    2. Sakura286

      发布于

      直接 –disable-skia 会咋样

  7. 娃哈哈

    发布于

    我在鲲鹏服务器上,openEuler22.03 LTS上编译7.2.2版本时,出现了这个错误,gcc用的10.3.1, 请教下该如何解决?
    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../conf -I/opt/libreoffice-7.2.2.2/workdir/UnpackedTarball/libassuan/src -I/opt/libreoffice-7.2.2.2/workdir/UnpackedTarball/libgpg-error/src -Os -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div -MT posix-io.lo -MD -MP -MF .deps/posix-io.Tpo -c posix-io.c -fPIC -DPIC -o .libs/posix-io.o
    posix-io.c: In function ‘_gpgme_io_spawn’:
    posix-io.c:580:23: error: void value not ignored as it ought to be
    580 | while ((i = closefrom (fd)) && errno == EINTR)
    | ^
    make[3]: *** [Makefile:974: posix-io.lo] Error 1
    make[2]: *** [Makefile:537: all-recursive] Error 1
    make[1]: *** [/opt/libreoffice-7.2.2.2/external/gpgmepp/ExternalProject_gpgmepp.mk:49: /opt/libreoffice-7.2.2.2/workdir/ExternalProject/gpgmepp/build] Error 1
    make[1]: *** Waiting for unfinished jobs….
    make: *** [Makefile:287: build] Error 2

    1. 请不要用root用户编译libreoffice. 用普通用户。否则肯定会出现各种奇怪的问题。

  8. yl

    发布于

    [CXX] cui/source/options/optjava.cxx
    [CXX] cui/source/options/optjsearch.cxx
    /opt/libreoffice7.6.0/cui/source/options/optjava.cxx: In member function ‘void SvxJavaClassPathDlg::SetClassPath(const rtl::OUString&)’:
    /opt/libreoffice7.6.0/cui/source/options/optjava.cxx:945:29: error: ‘jfw_convertUserPathList’ was not declared in this scope
    945 | std::vector paths = jfw_convertUserPathList(_rPath);
    | ^~~~~~~~~~~~~~~~~~~~~~~
    make[1]: *** [/opt/libreoffice7.6.0/solenv/gbuild/LinkTarget.mk:337: /opt/libreoffice7.6.0/workdir/CxxObject/cui/source/options/optjava.o] Error 1
    make[1]: *** Waiting for unfinished jobs….
    make: *** [Makefile:289: build] Error 2
    请问一下在arm机器编译的时候提示缺少jfw_convertUserPathList方法,有什么办法处理吗?

    1. yl

      发布于

      cp /opt/libreoffice7.6/cui/source/options/optjava.cxx /opt/libreoffice7-6-0/libreoffice-7.6.0.3/cui/source/options/optjava.cxx
      因为之前编译7.6.2DEV的开发版本成功了,所以我试了下把optjava.cxx复制到7.6.0.3的版本里,发现这个问题解决了

  9. 深圳 C++ 陈@雄

    发布于

    请教
    提示 /usr/bin/sh: 行 1: C:/sources/core-libreoffice-7.5.4.2/sources.ver: No such file or directory
    之前有这个错误
    checking for UCRT location… Windows PowerShell 被终止,返回以下错误:
    引发类型为“System.OutOfMemoryException”的异常。
    Windows PowerShell 被终止,返回以下错误:
    引发类型为“System.OutOfMemoryException”的异常。

  10. luka

    发布于

    使用arm64的linux
    编辑libreoffice的7-5分支
    不知道为什么我使用ndk跑gcc会过不了,一定要使用额外安装的clang

    autogen.input:
    CC=/usr/bin/clang
    CXX=/usr/bin/clang++
    –with-jdk-home=/usr/lib/jvm/java-11-openjdk-arm64
    –with-android-ndk=~/Android/Sdk/ndk/android-ndk-r20b
    –with-android-sdk=~/Android/Sdk
    –with-distro=LibreOfficeAndroid
    –enable-sal-log
    –without-junit

    跑make后的错误:
    libtool: link: ~/Android/Sdk/ndk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar cru .libs/liblcms2.a cmscnvrt.o cmserr.o cmsgamma.o cmsgmt.o cmsintrp.o cmsio0.o cmsio1.o cmslut.o cmsplugin.o cmssm.o cmsmd5.o cmsmtrx.o cmspack.o cmspcs.o cmswtpnt.o cmsxform.o cmssamp.o cmsnamed.o cmscam02.o cmsvirt.o cmstypes.o cmscgats.o cmsps2.o cmsopt.o cmshalf.o cmsalpha.o
    ../libtool: line 1102: ~/Android/Sdk/ndk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar: cannot execute binary file: Exec format error
    make[2]: *** [Makefile:463: liblcms2.la] Error 126
    make[1]: *** [/home/chunhao/Desktop/octon/libreoffice/core/external/lcms2/ExternalProject_lcms2.mk:29: /home/chunhao/Desktop/octon/libreoffice/core/workdir/ExternalProject/lcms2/build] Error 1
    make: *** [Makefile:289: build] Error 2

  11. LAI JIFA

    发布于

    你好,我是银河麒麟V10系统,按照这个配置步骤来,出现这个问题怎么解决?
    [UPK] mariadb-connector-c-3.1.8-src.tar.gz
    /home/lai/文档/soft/libreoffice-7-1/officecfg/registry/schema/org/openoffice/Office/DataAccess/Drivers.xcs:19: warning: failed to load external entity “../../../../../component-schema.dtd”

    ^
    /home/lai/文档/soft/libreoffice-7-1/officecfg/registry/schema/org/openoffice/Office/DataAccess/Drivers.xcs:19: warning: failed to load external entity “../../../../../component-schema.dtd”

    ^
    [XCM] connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers-postgresql.xcu
    [XCU] connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu
    Suppression file: /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr
    False positive file: /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.false
    0 new warnings (51 suppressed by /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr, please fix them)
    0 new fatals (1 suppressed by /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr, please fix it)
    18 suppressions unused:
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:4:chart2/uiconfig/ui/dlg_DataLabel.ui://GtkSpinButton[@id=’NF_LABEL_DEGREES’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:6:chart2/uiconfig/ui/dlg_InsertErrorBars.ui://GtkRadioButton[@id=’RB_FUNCTION’] button-no-label
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:7:chart2/uiconfig/ui/dlg_InsertErrorBars.ui://GtkEntry[@id=’ED_RANGE_POSITIVE’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:8:chart2/uiconfig/ui/dlg_InsertErrorBars.ui://GtkEntry[@id=’ED_RANGE_NEGATIVE’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:23:chart2/uiconfig/ui/smoothlinesdlg.ui://GtkComboBoxText[@id=’SplineTypeComboBox’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:24:chart2/uiconfig/ui/titlerotationtabpage.ui://GtkSpinButton[@id=’OrientDegree’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:31:chart2/uiconfig/ui/tp_axisLabel.ui://GtkSpinButton[@id=’OrientDegree’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:35:chart2/uiconfig/ui/tp_AxisPositions.ui://GtkSpinButton[@id=’EDT_CROSSES_OTHER_AXIS_AT’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:39:chart2/uiconfig/ui/tp_DataLabel.ui://GtkSpinButton[@id=’NF_LABEL_DEGREES’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:42:chart2/uiconfig/ui/tp_DataSource.ui://GtkButton[@id=’IMB_RANGE_MAIN’] button-no-label
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:44:chart2/uiconfig/ui/tp_DataSource.ui://GtkButton[@id=’IMB_RANGE_CAT’] button-no-label
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:45:chart2/uiconfig/ui/tp_ErrorBars.ui://GtkRadioButton[@id=’RB_FUNCTION’] button-no-label
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:46:chart2/uiconfig/ui/tp_ErrorBars.ui://GtkEntry[@id=’ED_RANGE_POSITIVE’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:47:chart2/uiconfig/ui/tp_ErrorBars.ui://GtkEntry[@id=’ED_RANGE_NEGATIVE’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:56:chart2/uiconfig/ui/tp_Scale.ui://GtkSpinButton[@id=’MT_MAIN_DATE_STEP’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:57:chart2/uiconfig/ui/tp_Scale.ui://GtkSpinButton[@id=’EDT_STEP_MAIN’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:60:chart2/uiconfig/ui/tp_Scale.ui://GtkSpinButton[@id=’MT_STEPHELP’] no-labelled-by
    /home/lai/文档/soft/libreoffice-7-1/solenv/sanitizers/ui/modules/schart.suppr:62:chart2/uiconfig/ui/tp_Scale.ui://GtkSpinButton[@id=’EDT_ORIGIN’] no-labelled-by
    Explanations are available on https://wiki.documentfoundation.org/Development/Accessibility

    [XCR] driver_postgresql/en-US/org/openoffice/Office/DataAccess/Drivers.xcu
    ERROR: Node ‘/Drivers/Installed’ does not exist in schema!
    no result for /home/lai/文档/soft/libreoffice-7-1/connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu
    make[1]: *** [/home/lai/文档/soft/libreoffice-7-1/solenv/gbuild/Configuration.mk:139:/home/lai/文档/soft/libreoffice-7-1/workdir/XcuDataTarget/connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu] 错误 10
    make[1]: *** 正在等待未完成的任务….
    make: *** [Makefile:282:build] 错误 2

    1. 见wiki上所说:“需要注意的是,目前LibreOffice的代码编译在含有unicode字符的路径下可能会出错”。/home/lai/文档/ 路径中含有中文字符,改为纯英文路径试试。

  12. mahlon

    发布于

    大佬,Ubuntu16.04 arm平台编译的5.4版本,make的时候报这个错误,是怎么回事呢,之前编译的7或者6以上的版本,提示gcc版本太低,所以编译的5版本
    armhelper.s: Assembler messages:
    armhelper.s:26: Error: unknown mnemonic `unwind’ — `unwind .fnstart#start of unwinder entry’
    armhelper.s:28: Error: unknown mnemonic `stmfd’ — `stmfd sp!,{r0-r3}follow other parameters on stack’
    armhelper.s:29: Error: operand 1 should be an integer register — `mov r0,ip#r0 points to functionoffset/vtable’
    armhelper.s:30: Error: operand 1 should be an integer register — `mov r1,sp#r1 points to this and params’
    armhelper.s:34: Error: unknown mnemonic `unwind’ — `unwind .pad#16 throw this data away on exception’
    armhelper.s:36: Error: unknown mnemonic `stmfd’ — `stmfd sp!,{r4,lr}save return address’
    armhelper.s:38: Error: unknown mnemonic `unwind’ — `unwind .save{r4,lr}#restore these regs on exception’
    armhelper.s:40: Error: unexpected characters following instruction at operand 1 — `bl cpp_vtable_call(PLT)’
    armhelper.s:42: Error: unexpected characters following instruction at operand 3 — `add sp,sp,#4 no need to restore r4(we didn116touch it)’
    armhelper.s:43: Error: operand 1 should be an integer register — `ldr pc,[sp],#20 turn,discarding function arguments’
    armhelper.s:45: Error: unknown mnemonic `unwind’ — `unwind .fnend’
    /opt/libreoffice-5.4.7.2/bridges/CustomTarget_gcc3_linux_arm.mk:18: recipe for target ‘/opt/libreoffice-5.4.7.2/workdir/CustomTarget/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.o’ failed
    make[1]: *** [/opt/libreoffice-5.4.7.2/workdir/CustomTarget/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.o] Error 1
    make[1]: *** Waiting for unfinished jobs….
    /opt/libreoffice-5.4.7.2/workdir/LexTarget/unoidl/source/sourceprovider-scanner.cxx: In function ‘int yy_get_next_buffer(yyscan_t)’:
    /opt/libreoffice-5.4.7.2/workdir/LexTarget/unoidl/source/sourceprovider-scanner.cxx:1892:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
    ^
    /opt/libreoffice-5.4.7.2/workdir/LexTarget/unoidl/source/sourceprovider-scanner.cxx: At global scope:
    /opt/libreoffice-5.4.7.2/workdir/LexTarget/unoidl/source/sourceprovider-scanner.cxx:1971:17: warning: ‘void yyunput(int, char*, yyscan_t)’ defined but not used [-Wunused-function]
    static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)

    drbg.c: In function ‘RNG_RandomUpdate’:
    drbg.c:545:38: error: size of array ‘arg’ is negative
    PR_STATIC_ASSERT(sizeof(size_t) <= 4);
    ^
    ../../coreconf/rules.mk:392: recipe for target 'out/Linux_SINGLE_SHLIB/drbg.o' failed
    make[5]: *** [out/Linux_SINGLE_SHLIB/drbg.o] Error 1
    Makefile:638: recipe for target 'libs' failed
    make[4]: *** [libs] Error 2
    ../coreconf/rules.mk:101: recipe for target 'libs' failed
    make[3]: *** [libs] Error 2
    coreconf/rules.mk:101: recipe for target 'libs' failed
    make[2]: *** [libs] Error 2
    /opt/libreoffice-5.4.7.2/external/nss/ExternalProject_nss.mk:42: recipe for target '/opt/libreoffice-5.4.7.2/workdir/ExternalProject/nss/build' failed
    make[1]: *** [/opt/libreoffice-5.4.7.2/workdir/ExternalProject/nss/build] Error 1
    Makefile:268: recipe for target 'build' failed
    make: *** [build] Error 2

    1. 银河麒麟v10sp1编译7.3.7版本

      发布于

      请问在make时出现下面信息,是要如何解决?环境是:银河麒麟v10sp1编译7.3.7版本

      [build CXX] linguistic/source/iprcache.cxx
      [build CXX] linguistic/source/lngopt.cxx
      In file included from /usr/include/c++/7.3.0/vector:64:0,
      from /srv/libreoffice-7.3.7.2/include/i18nlangtag/languagetag.hxx:22,
      from /srv/libreoffice-7.3.7.2/include/unotools/localedatawrapper.hxx:32,
      from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:32:
      /usr/include/c++/7.3.0/bits/stl_vector.h: In instantiation of ‘std::vector::size_type std::vector::size() const [with _Tp = SvcInfo; _Alloc = std::allocator; std::vector::size_type = long unsigned int]’:
      /usr/include/c++/7.3.0/bits/stl_vector.h:327:19: required from ‘std::vector::vector(const std::vector&) [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/bits/stl_vector.h:671:50: 错误:对不完全的类型‘struct SvcInfo’的非法使用
      { return size_type(this->_M_impl._M_finish – this->_M_impl._M_start); }
      ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:42:0:
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:45:8: 附注:forward declaration of ‘struct SvcInfo’
      struct SvcInfo;
      ^~~~~~~
      In file included from /usr/include/c++/7.3.0/vector:64:0,
      from /srv/libreoffice-7.3.7.2/include/i18nlangtag/languagetag.hxx:22,
      from /srv/libreoffice-7.3.7.2/include/unotools/localedatawrapper.hxx:32,
      from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:32:
      /usr/include/c++/7.3.0/bits/stl_vector.h: In instantiation of ‘std::_Vector_base::~_Vector_base() [with _Tp = SvcInfo; _Alloc = std::allocator]’:
      /usr/include/c++/7.3.0/bits/stl_vector.h:328:61: required from ‘std::vector::vector(const std::vector&) [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/bits/stl_vector.h:163:9: 错误:对不完全的类型‘struct SvcInfo’的非法使用
      { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      – this->_M_impl._M_start); }
      ^~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:42:0:
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:45:8: 附注:forward declaration of ‘struct SvcInfo’
      struct SvcInfo;
      ^~~~~~~
      In file included from /usr/include/c++/7.3.0/vector:64:0,
      from /srv/libreoffice-7.3.7.2/include/i18nlangtag/languagetag.hxx:22,
      from /srv/libreoffice-7.3.7.2/include/unotools/localedatawrapper.hxx:32,
      from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:32:
      /usr/include/c++/7.3.0/bits/stl_vector.h: In instantiation of ‘void std::_Vector_base::_M_create_storage(std::size_t) [with _Tp = SvcInfo; _Alloc = std::allocator; std::size_t = long unsigned int]’:
      /usr/include/c++/7.3.0/bits/stl_vector.h:138:26: required from ‘std::_Vector_base::_Vector_base(std::size_t, const allocator_type&) [with _Tp = SvcInfo; _Alloc = std::allocator; std::size_t = long unsigned int; std::_Vector_base::allocator_type = std::allocator]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:328:61: required from ‘std::vector::vector(const std::vector&) [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/bits/stl_vector.h:189:59: 错误:对不完全的类型‘struct SvcInfo’的非法使用
      this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
      In file included from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:42:0:
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:45:8: 附注:forward declaration of ‘struct SvcInfo’
      struct SvcInfo;
      ^~~~~~~
      In file included from /usr/include/c++/7.3.0/memory:65:0,
      from /srv/libreoffice-7.3.7.2/include/rtl/stringconcat.hxx:21,
      from /srv/libreoffice-7.3.7.2/include/rtl/string.hxx:49,
      from /srv/libreoffice-7.3.7.2/include/rtl/ustring.hxx:43,
      from /srv/libreoffice-7.3.7.2/include/cppuhelper/factory.hxx:30,
      from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:25:
      /usr/include/c++/7.3.0/bits/stl_uninitialized.h: In instantiation of ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const SvcInfo*, std::vector >; _ForwardIterator = SvcInfo*]’:
      /usr/include/c++/7.3.0/bits/stl_uninitialized.h:289:37: required from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator&) [with _InputIterator = __gnu_cxx::__normal_iterator<const SvcInfo*, std::vector >; _ForwardIterator = SvcInfo*; _Tp = SvcInfo]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:331:31: required from ‘std::vector::vector(const std::vector&) [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/bits/stl_uninitialized.h:132:12: 错误:对不完全的类型‘std::__iterator_traits<__gnu_cxx::__normal_iterator<const SvcInfo*, std::vector >, void>::value_type {aka struct SvcInfo}’的非法使用
      && __is_trivial(_ValueType2)
      In file included from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:42:0:
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:45:8: 附注:forward declaration of ‘std::__iterator_traits<__gnu_cxx::__normal_iterator<const SvcInfo*, std::vector >, void>::value_type {aka struct SvcInfo}’
      struct SvcInfo;
      ^~~~~~~
      In file included from /usr/include/c++/7.3.0/memory:65:0,
      from /srv/libreoffice-7.3.7.2/include/rtl/stringconcat.hxx:21,
      from /srv/libreoffice-7.3.7.2/include/rtl/string.hxx:49,
      from /srv/libreoffice-7.3.7.2/include/rtl/ustring.hxx:43,
      from /srv/libreoffice-7.3.7.2/include/cppuhelper/factory.hxx:30,
      from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:25:
      /usr/include/c++/7.3.0/bits/stl_uninitialized.h:132:12: 错误:对不完全的类型‘std::iterator_traits::value_type {aka struct SvcInfo}’的非法使用
      && __is_trivial(_ValueType2)
      In file included from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:42:0:
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:45:8: 附注:forward declaration of ‘std::iterator_traits::value_type {aka struct SvcInfo}’
      struct SvcInfo;
      ^~~~~~~
      In file included from /usr/include/c++/7.3.0/bits/stl_tempbuf.h:60:0,
      from /usr/include/c++/7.3.0/bits/stl_algo.h:62,
      from /usr/include/c++/7.3.0/algorithm:62,
      from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:23:
      /usr/include/c++/7.3.0/bits/stl_construct.h: In instantiation of ‘void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = SvcInfo*]’:
      /usr/include/c++/7.3.0/bits/stl_construct.h:206:15: required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator&) [with _ForwardIterator = SvcInfo*; _Tp = SvcInfo]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:434:22: required from ‘std::vector::~vector() [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/bits/stl_construct.h:133:7: 错误:static assertion failed: value type is destructible
      static_assert(is_destructible::value,
      ^~~~~~~~~~~~~
      /usr/include/c++/7.3.0/bits/stl_construct.h:137:11: 错误:对不完全的类型‘std::iterator_traits::value_type {aka struct SvcInfo}’的非法使用
      std::_Destroy_aux::
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      __destroy(__first, __last);
      ~~~~~~~~~^~~~~~~~~~~~~~~~~
      In file included from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:42:0:
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:45:8: 附注:forward declaration of ‘std::iterator_traits::value_type {aka struct SvcInfo}’
      struct SvcInfo;
      ^~~~~~~
      [build CXX] linguistic/source/lngprophelp.cxx
      In file included from /usr/include/c++/7.3.0/aarch64-linux-gnu/bits/c++allocator.h:33:0,
      from /usr/include/c++/7.3.0/bits/allocator.h:46,
      from /usr/include/c++/7.3.0/string:41,
      from /usr/include/c++/7.3.0/bits/locale_classes.h:40,
      from /usr/include/c++/7.3.0/bits/ios_base.h:41,
      from /usr/include/c++/7.3.0/ios:42,
      from /usr/include/c++/7.3.0/istream:38,
      from /usr/include/c++/7.3.0/sstream:38,
      from /srv/libreoffice-7.3.7.2/include/sal/log.hxx:20,
      from /srv/libreoffice-7.3.7.2/linguistic/source/hyphdsp.cxx:21:
      /usr/include/c++/7.3.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator::deallocate(__gnu_cxx::new_allocator::pointer, __gnu_cxx::new_allocator::size_type) [with _Tp = SvcInfo; __gnu_cxx::new_allocator::pointer = SvcInfo*; __gnu_cxx::new_allocator::size_type = long unsigned int]’:
      /usr/include/c++/7.3.0/bits/alloc_traits.h:462:9: required from ‘static void std::allocator_traits<std::allocator >::deallocate(std::allocator_traits<std::allocator >::allocator_type&, std::allocator_traits<std::allocator >::pointer, std::allocator_traits<std::allocator >::size_type) [with _Tp = SvcInfo; std::allocator_traits<std::allocator >::allocator_type = std::allocator; std::allocator_traits<std::allocator >::pointer = SvcInfo*; std::allocator_traits<std::allocator >::size_type = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:180:19: required from ‘void std::_Vector_base::_M_deallocate(std::_Vector_base::pointer, std::size_t) [with _Tp = SvcInfo; _Alloc = std::allocator; std::_Vector_base::pointer = SvcInfo*; std::size_t = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:162:22: required from ‘std::_Vector_base::~_Vector_base() [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:328:61: required from ‘std::vector::vector(const std::vector&) [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/ext/new_allocator.h:119:19: 错误:invalid application of ‘__alignof__’ to incomplete type ‘SvcInfo’
      if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
      /usr/include/c++/7.3.0/ext/new_allocator.h:121:34: 错误:invalid application of ‘__alignof__’ to incomplete type ‘SvcInfo’
      ::operator delete(__p, std::align_val_t(alignof(_Tp)));
      ^~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/c++/7.3.0/ext/new_allocator.h: In instantiation of ‘_Tp* __gnu_cxx::new_allocator::allocate(__gnu_cxx::new_allocator::size_type, const void*) [with _Tp = SvcInfo; __gnu_cxx::new_allocator::pointer = SvcInfo*; __gnu_cxx::new_allocator::size_type = long unsigned int]’:
      /usr/include/c++/7.3.0/bits/alloc_traits.h:436:32: required from ‘static _Tp* std::allocator_traits<std::allocator >::allocate(std::allocator_traits<std::allocator >::allocator_type&, std::allocator_traits<std::allocator >::size_type) [with _Tp = SvcInfo; std::allocator_traits<std::allocator >::pointer = SvcInfo*; std::allocator_traits<std::allocator >::allocator_type = std::allocator; std::allocator_traits<std::allocator >::size_type = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:172:33: required from ‘std::_Vector_base::pointer std::_Vector_base::_M_allocate(std::size_t) [with _Tp = SvcInfo; _Alloc = std::allocator; std::_Vector_base::pointer = SvcInfo*; std::size_t = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:187:33: required from ‘void std::_Vector_base::_M_create_storage(std::size_t) [with _Tp = SvcInfo; _Alloc = std::allocator; std::size_t = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:138:26: required from ‘std::_Vector_base::_Vector_base(std::size_t, const allocator_type&) [with _Tp = SvcInfo; _Alloc = std::allocator; std::size_t = long unsigned int; std::_Vector_base::allocator_type = std::allocator]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:328:61: required from ‘std::vector::vector(const std::vector&) [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/ext/new_allocator.h:105:19: 错误:invalid application of ‘__alignof__’ to incomplete type ‘SvcInfo’
      if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
      /usr/include/c++/7.3.0/ext/new_allocator.h:107:35: 错误:invalid application of ‘__alignof__’ to incomplete type ‘SvcInfo’
      std::align_val_t __al = std::align_val_t(alignof(_Tp));
      ^~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/c++/7.3.0/ext/new_allocator.h:108:58: 错误:invalid application of ‘sizeof’ to incomplete type ‘SvcInfo’
      return static_cast(::operator new(__n * sizeof(_Tp), __al));
      ^
      /usr/include/c++/7.3.0/ext/new_allocator.h:111:54: 错误:invalid application of ‘sizeof’ to incomplete type ‘SvcInfo’
      return static_cast(::operator new(__n * sizeof(_Tp)));
      ^
      /usr/include/c++/7.3.0/ext/new_allocator.h: In instantiation of ‘__gnu_cxx::new_allocator::size_type __gnu_cxx::new_allocator::max_size() const [with _Tp = SvcInfo; __gnu_cxx::new_allocator::size_type = long unsigned int]’:
      /usr/include/c++/7.3.0/ext/new_allocator.h:101:18: required from ‘_Tp* __gnu_cxx::new_allocator::allocate(__gnu_cxx::new_allocator::size_type, const void*) [with _Tp = SvcInfo; __gnu_cxx::new_allocator::pointer = SvcInfo*; __gnu_cxx::new_allocator::size_type = long unsigned int]’
      /usr/include/c++/7.3.0/bits/alloc_traits.h:436:32: required from ‘static _Tp* std::allocator_traits<std::allocator >::allocate(std::allocator_traits<std::allocator >::allocator_type&, std::allocator_traits<std::allocator >::size_type) [with _Tp = SvcInfo; std::allocator_traits<std::allocator >::pointer = SvcInfo*; std::allocator_traits<std::allocator >::allocator_type = std::allocator; std::allocator_traits<std::allocator >::size_type = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:172:33: required from ‘std::_Vector_base::pointer std::_Vector_base::_M_allocate(std::size_t) [with _Tp = SvcInfo; _Alloc = std::allocator; std::_Vector_base::pointer = SvcInfo*; std::size_t = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:187:33: required from ‘void std::_Vector_base::_M_create_storage(std::size_t) [with _Tp = SvcInfo; _Alloc = std::allocator; std::size_t = long unsigned int]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:138:26: required from ‘std::_Vector_base::_Vector_base(std::size_t, const allocator_type&) [with _Tp = SvcInfo; _Alloc = std::allocator; std::size_t = long unsigned int; std::_Vector_base::allocator_type = std::allocator]’
      /usr/include/c++/7.3.0/bits/stl_vector.h:328:61: required from ‘std::vector::vector(const std::vector&) [with _Tp = SvcInfo; _Alloc = std::allocator]’
      /usr/include/c++/7.3.0/type_traits:1406:12: required from ‘struct std::is_trivially_copy_constructible<std::vector >’
      /usr/include/c++/7.3.0/optional:105:8: required from ‘class std::_Optional_base<std::vector >’
      /usr/include/c++/7.3.0/optional:453:11: required from ‘class std::optional<std::vector >’
      /srv/libreoffice-7.3.7.2/linguistic/source/lngsvcmgr.hxx:92:56: required from here
      /usr/include/c++/7.3.0/ext/new_allocator.h:130:35: 错误:invalid application of ‘sizeof’ to incomplete type ‘SvcInfo’
      { return size_t(-1) / sizeof(_Tp); }
      ^
      make[1]: *** [/srv/libreoffice-7.3.7.2/solenv/gbuild/LinkTarget.mk:333:/srv/libreoffice-7.3.7.2/workdir/CxxObject/linguistic/source/hyphdsp.o] 错误 1
      make[1]: *** 正在等待未完成的任务….

  13. ada

    发布于

    作者你好,我在编译libreoffice的时候遇到了下面的问题,咨询下该怎么解决
    msguniq: error while opening “/data/libreoffice-7.3.1.3/translations/source/zh-CN/filter/messages.po” for reading: No such file or directory
    [MO ] forzh-CN
    [MO ] fpszh-CN
    msguniq: error while opening “/data/libreoffice-7.3.1.3/translations/source/zh-CN/forms/messages.po” for reading: No such file or directory
    msguniq: error while opening “/data/libreoffice-7.3.1.3/translations/source/zh-CN/formula/messages.po” for reading: No such file or directory
    msguniq: error while opening “/data/libreoffice-7.3.1.3/translations/source/zh-CN/fpicker/messages.po” for reading: No such file or directory
    [MO ] fwkzh-CN
    msguniq: error while opening “/data/libreoffice-7.3.1.3/translations/source/zh-CN/framework/messages.po” for reading: No such file or directory
    [YAC] idlc/source/parser
    [LEX] idlc/source/scanner
    /data/libreoffice-7.3.1.3/idlc/source/parser.y: warning: 4 shift/reduce conflicts [-Wconflicts-sr]
    [LEX] l10ntools/source/xrmlex
    [BIN] o3tl
    [MOD] onlineupdate
    [MO ] ooxzh-CN
    msguniq: error while opening “/data/libreoffice-7.3.1.3/translations/source/zh-CN/oox/messages.po” for reading: No such file or directory
    [CUS] postprocess/fontconfig
    make[1]: *** No rule to make target ‘/data/libreoffice-7.3.1.3/translations/source/zh-CN/readlicense_oo/docs.po’, needed by ‘/data/libreoffice-7.3.1.3/workdir/CustomTarget/readlicense_oo/readme/readme.xrm’. Stop.
    make[1]: *** Waiting for unfinished jobs….
    make: *** [Makefile:288: build] Error 2

    1. 提示未找到translation子模块的多个文件 你把translation子模块checkout到了什么位置?是通过什么方式checkout的?

  14. 大飞001

    发布于

    arm服务器源码编译的时候报错,执行make的时候报错,Can’t open /data/core-libreoffice-7.3.1.3/sources.ver,找不到sources.ver,参考的帖子的是https://blog.csdn.net/qq_37062422/article/details/123840094,源码是从github中下载的7.3.1.3tag,

    1. 版本太老了,请先尝试编译最新版本:7.4.6或者7.5分支,若再有问题请留言反馈。

  15. 小庆

    发布于

    各位大神有编译好的包么?
    麒麟V10 arm64架构的
    有的话跪求一下连接,,,

  16. lcuwang

    发布于

    操作系统:
    Kylin Linux Advanced Server
    release V10 (SP1) /(Tercel)-mips64el-Build18/20210809
    GCC版本:gcc 版本 8.3.1 20190507 (Kylin 8.3.1-4) (GCC)
    错误信息:
    编译错误
    /opt/libreoffice-7-5/workdir/Dep/LinkTarget/Library/libchartcontrollerlo.so.d:385: *** 遗漏分隔符 遗漏分隔符 %s。 停止。

    1. lcuwang

      发布于

      5 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZPooledConnection.o: $(gb_Helper_PHONY)
      6
      7 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZConnectionPool.o: $(gb_Helper_PHONY)
      8
      9 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZPoolCollection.o: $(gb_Helper_PHONY)
      10
      11 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZConnectionWrapper.o: $(gb_Helper_PHONY)
      12
      13 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZDriverWrapper.o: $(gb_Helper_PHONY)
      14
      15 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZPooledConnection.o: $(gb_Helper_PHONY)
      16
      17 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZConnectionPool.o: $(gb_Helper_PHONY)
      18
      19 /opt/libreoffice-7-4/workdir/CxxObject/connectivity/source/cpool/ZPoolCollection.o: $(gb_Helper_PHONY)
      20
      21 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@@@@
      :set nu 10,0-1

    2. 小庆

      发布于

      编译好了么?

    3. TSN_CJH

      发布于

      我的也是这个错误,怎么处理啊。
      编译libreoffice6.4.x和7.1.x,7.2.x都是以下错误:
      /opt/libreoffice-6.4.7.2/workdir/Dep/LinkTarget/Library/libctllo.so.d:78: *** 遗漏分隔符 遗漏分隔符 %s。 停止
      内核版本:Linux-4.19.90-21.3.ky10.mips64-with-gilbc2.2

      1. Kevin Suo

        发布于

        源代码放在/opt下,莫非你们是在用root账户编译?不要用root用户编译,用普通用户。用root用户编译libreoffice肯定会出错。所有操作都用root用户,这无疑是一个坏习惯。

  17. Qwer

    发布于

    你好,我在编译libreoffice7.2.5.2的过程中,通过了./autogen.sh编译选项,但是在make编译阶段出现了报错,报错信息为如下:
    /home/libreoffice-7.2.5.2/include/svx/xmleohlp.hxx:62:50: required from here
    /home/libreoffice-7.2.5.2/include/rtl/ref.hxx:129:22: 错误:对不完全的类型‘class OutputStorageWrapper_Impl’的非法使用 m_pBody->release();

    In file included from /home/libreoffice-7.2.5.2/svx/source/xml/xmlexport.cxx:32:0: /home/libreoffice-7.2.5.2/include/svx/xmleohlp.hxx:44:7: 附注:forward declaration of ‘class OutputStorageWrapper_Impl

    操作系统版本
    Release: Kylin Linux Advanced Server release V10 (Tercel)
    Kernel: 4.19.90-23.6.v2101.ky10.aarch64
    请问有解决的办法吗?

    1. Kevin Suo

      发布于

      master或者7.4.3.2或者7.3.7.2也有类似错误吗?

      1. Qwer

        发布于

        在7.3.7.2中也会有类似的保错信息,7.4.3.2因为没有在缓存墙内链接找到所以没有试。

        1. Kevin Suo

          发布于

          git clone –branch libreoffice-7-4 https://git.libreofficechina.org/core.git ./libreoffice-7-4

          可以使用–depth=1仅克隆最近的一个提交对应的树。

          1. Qwer

            发布于

            谢谢大佬!那像这种遇到make编译出现报错信息的只能选择换版本来解决了吗??

            1. Kevin Suo

              发布于

              我的理解是,旧版本只在当时的编译环境下能很好地工作,但随着操作系统及编译工具链的版本升级,老版本的代码在新的编译环境中会出错,典型的就是原来标记为depreciated的特性后来被废弃的情况。当然,用新版本编译器编译老代码也会出现问题。

              这种错误并不是用新版本代码就一定能解决的,也有可能是代码中本身就有错误,只是被你不小心发现了而已。

  18. ll

    发布于

    [BIN] top level modules: libreoffice
    [ALL] top level modules: build-non-l10n-only build-l10n-only
    Installing in /usr/local/lib/libreoffice …
    mkdir /usr/local/lib/libreoffice: Permission denied at /home/z

    1. Kevin Suo

      发布于

      还是权限的问题。首先,你必须使用操作系统的创建新用户的方式创建一个新用户。然后,以新用户登录系统,克隆libreoffice源代码,运行autogen.sh,然后make. 也就是说所有的一切都是以普通用户进行的,除非你最后要将编译好的deb包或rpm包安装到系统中时才需要sudo为超级用户。如果你之前的某个步骤(比如创建z文件夹)是以超级用户进行的,那么后续你如果以普通用户运行另一项操作时就会遇到权限问题(比如无法在那个文件夹中新建文件或者修改其中的文件)。

    2. Kevin Suo

      发布于

      Installing in /usr/local/lib/libreoffice …
      mkdir /usr/local/lib/libreoffice: Permission denied at /home/z

      这个你是不是运行了make install之后出现的?如果是的花钱,那原因很简单,普通用户不具有/usr/*目录和文件的写权限。

      你可以把你从克隆到编译以及最后安装的详细命令发上来,然后大家来纠正其中的错误。

      1. Kevin Suo

        发布于

        包括要提供你的操作系统名称及版本、所克隆的libreoffice源代码分支或版本。我看到你好像在编译6.7.4.2,为什么要编译这么老的版本呢?要知道目前最新的版本是7.3.7和7.4.3.

  19. ll

    发布于

    不用root,生成makefile时候报很多错

    1. Kevin Suo

      发布于

      你得从git clone一开始就用普通用户。若git clone时是用root, autogen.sh和make时又是用的普通用户,那不出错材怪 – 普通用户对root用户git clone建立的那些文件夹没有写权限。

  20. 22

    发布于

    大佬们遇到过这个没,开始以为没装python3,但是我装了还是报这个错

    /home/zkfd/code/libreoffice-6.4.7.2/instdir/program/libpyuno.so has suspicious NEEDED: libpython3.5m.so.1.0
    /home/zkfd/code/libreoffice-6.4.7.2/instdir/program/libpythonloaderlo.so has suspicious NEEDED: libpython3.5m.so.1.0
    /home/zkfd/code/libreoffice-6.4.7.2/postprocess/CustomTarget_check_dynamic_objects.mk:20: recipe for target ‘/home/zkfd/code/libreoffice-6.4.7.2/workdir/CustomTarget/postprocess/check_dynamic_objects/check.done’ failed
    make[1]: *** [/home/zkfd/code/libreoffice-6.4.7.2/workdir/CustomTarget/postprocess/check_dynamic_objects/check.done] Error 1
    make[1]: *** 正在等待未完成的任务….
    Makefile:282: recipe for target ‘build’ failed
    make: *** [build] Error 2

  21. ll

    发布于

    Building LibreOffice as root is a very bad idea, use a regular user.

    Makefile:63: recipe for target ‘check-if-root’ failed
    make: *** [check-if-root] Error 1

    1. Kevin Suo

      发布于

      Linux下请不要用root用户编译。请使用常规用户。

      1. Kevin Suo

        发布于

        而且,不只是编译libreoffice不要用root用户,干其他日常的事也别用,root只用来做需要超级管理员特权的事。否则,总有一天你的操作系统会乱掉,这是使用linux的最基本准则。

        1. ll

          发布于

          好的,哥,我正在改正这个习惯

  22. ll

    发布于

    大佬们这个问题啥意思
    正在连接 dev-www.libreoffice.org (dev-www.libreoffice.org)|89.238.68.201|:443… 已连接。
    错误: “dev-www.libreoffice.org” 的证书不可信。
    错误: “dev-www.libreoffice.org” 的证书已经过期。
    /home/zkfd/code/libreoffice-6.4.7.2/Makefile.fetch:100: recipe for target ‘/home/lini/code/libreoffice-6.4.7.2/workdir/download’ failed
    make: *** [/home/zkfd/code/libreoffice-6.4.7.2/workdir/download] Error 1

    1. Kevin Suo

      发布于

      make过程中会联网从dev-www.libreoffice.org下载依赖的第三方库的源代码包。从提示来看,dev-www.libreoffice.org的证书过期了?你用网络浏览器打开这个地址看能不能正常访问?我这里试是正常的,没准你现在试试可能就正常了。

  23. lucky_fd

    发布于

    你好,我在openEuler 21.9 arm64系统上编译时,提示了缺少libcups2-dev,请问有遇到相同问题的吗?本来想去下一个依赖,不过发现依赖下面还有很多依赖,陷入了死循环,有好的解决办法吗

    checking for utime… yes
    checking for utimes… yes
    checking syslog.h usability… yes
    checking syslog.h presence… yes
    checking for syslog.h… yes
    checking whether to turn warnings to errors… no
    checking whether to have assert() failures abort even without –enable-debug… no
    checking whether to use ooenv for the instdir installation… no
    checking whether to build the pagein binaries for oosplash… yes
    checking whether to enable CUPS support… yes
    checking whether cups support is present… checking for cupsPrintFiles in -lcups… no
    checking cups/cups.h usability… no
    checking cups/cups.h presence… no
    checking for cups/cups.h… no
    configure: error: Could not find CUPS. Install libcups2-dev or cups-devel.
    Error running configure at ./autogen.sh line 322.

  24. wsl

    发布于

    oleacc.idl
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.19041.0/um\64 bit oleaccProcessing .idlC:/PROGRA~2/WI3CF2~1/10/I
    nclude/10.0.19041.0/um\oleacc
    .idl
    ocidl.idl
    oleacc.idl
    oleacc.idl
    
    midl : error MIDL9008 : internal compiler problem – See documentation for suggestions on how to find a workaround.
    midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx, line 1023
    make[1]: *** [E:/LibreOfficeComplie/libreoffice-7-3/winaccessibility/CustomTarget_ia2_idl.mk:29: E:/LibreOfficeComplie/
    libreoffice-7-3/build64/workdir/CustomTarget/winaccessibility/ia2/idl/AccessibleKeyBinding.h] Error 48
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.19041.0/um\oleidl.idl
    oleidl.idl

    请问这个问题怎么解决

    1. 我自己不在windows下编译,但在IRC上帮你问了一下,见以下的答复:

      (18时14分56秒) noel_grandin: suokunlong, the only things I see when googling for MIDL9008 suggest that something on that machine is in bad shape
      (18时15分21秒) noel_grandin: sometimes, with windows, all you can do is re-install the machine from scratch
      (18时15分47秒) noel_grandin: used to be, I would re=install my dev machine every year just to keep it clean
      (18时18分36秒) cloph: maybe also solved by installing the windows 10 sdk/uninstalling and reinstalling Visual Studio, guess a little easier than to wipe the whole OS...
      
  25. wsl

    发布于

    这个问题解决了么?

  26. libreoffice学习者

    发布于

    求助:
    在openeuler20.03sp1-aarch64环境按照上面的指导文件编译完成7.1.8.1的版本并生成了rpm包。在autogen.input中设置了该参数“–without-java”。目前在使用calc时,会使用开发人员编写的java扩展插件。在calc的选项工具中有个“高级”配置,可以设置java的运行环境,但是运行环境里已经安装了java11,但是仍然无法自动检测到java环境,该项配置java所有选项都是灰色的。
    问题是:出现此情况的原因是否与在编译生成的rpm包不完整而导致的,是否在编译时需要添加with-java设置?
    还是当前libreoffice的运行环境里java的配置不正确没有被libreoffice检测到。

    1. libreoffice学习者

      发布于

      上面这个问题,我通过修改autogen.input的配置信息,取消without-java参数设置,同时根据configure阶段的提示信息增加了ant和junit配置和依赖包安装,重新编译后生成的rpm包,可以在calc的工具-选项-高级中选择配置java的运行环境。感谢这个论坛和专贴,帮助我完成了libreoffice的手工编译工作。

      1. Kevin Suo

        发布于

        解决了就好。既然之前编译时使用了–without-java,那么你编译得到的软件包当然就不支持Java特性了,也就不会去检测你操作系统中已安装的java运行时环境了。

    2. lucky_fd

      发布于

      你好,我也是在欧拉系统 21.9 arm64上进行liboffice的编译,但是报缺少libcups2-dev的依赖,请问你编译时有这个问题吗。如果有的话能说一下如何解决的吗?感谢

      1. Kevin Suo

        发布于

        在你的系统包管理器中查找libcups2-dev,看看对应的名称是哪个,安装即可。

    3. ada

      发布于

      你好 我编译完成了,但是在相应目录里找不到安装包

      1. Kevin Suo

        发布于

        你的编译选项中是否启用了
        –enable-epm
        –with-package-format=rpm
        或者

        –enable-epm
        –with-package-format=deb

        (取决于你的操作系统包管理器的格式)

  27. Liuyh

    发布于

    重新编译后还有20个连接数的限制吗,需要修改什么配置吗

    1. Kevin Suo

      发布于

      没有听说过20个连接数限制,你是指的什么,能否详细说明?

  28. yzh

    发布于

    在windows10下通过cygwin64编译libreoffice源码时出现该问题,请大家给我指点一下

    midl : error MIDL9008 : internal compiler problem - See documentation for suggestions on how to find a workaround.
    midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx, line 1023
    objidl.idl
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.22000.0/um\unknwn.idl
    unknwn.idl
    make[1]: *** [C:/LibreOffice7.2.6.2/libreoffice-6.4.7.2/winaccessibility/CustomTarget_ia2_idl.mk:28: C:/LibreOffice7.2.6.2/libreoffice-6.4.7.2/buildx64/workdir/CustomTarget/winaccessibility/ia2/idl/AccessibleKeyStroke.h] Error 48
    make[1]: *** Waiting for unfinished jobs....
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.22000.0/shared\wtypes.idl
    wtypes.idl
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.22000.0/shared\wtypesbase.idl
    wtypesbase.idl
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.22000.0/shared\basetsd.h
    basetsd.h
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.22000.0/shared\guiddef.h
    guiddef.h
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.22000.0/um\oaidl.idl
    oaidl.idl
    64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.22000.0/um\oleacc.idl
    oleacc.idl
    
    midl : error MIDL9008 : internal compiler problem - See documentation for suggestions on how to find a workaround.
    midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx, line 1023
    make[1]: *** [C:/LibreOffice7.2.6.2/libreoffice-6.4.7.2/winaccessibility/CustomTarget_ia2_idl.mk:28: C:/LibreOffice7.2.6.2/libreoffice-6.4.7.2/buildx64/workdir/CustomTarget/winaccessibility/ia2/idl/AccessibleKeyBinding.h] Error 48
    make: *** [Makefile:282: build] Error 2
    
    1. Kevin Suo

      发布于

      你编译的到底是7.2.6.2, 还是6.4.7.2版本?你的编译选项是什么?

      1. yzh

        发布于

        我的编译环境是win10+VS2019/VS2022+CYGWIN64+jdk-17.0.2。
        使用的版本是libreoffice7.2.6.2,libreoffice7.3.3.2
        编译选项是:./autogen.sh
        –enable-debug
        –with-visual-studio=2022
        –with-windows-sdk=10.0
        –enable-pch
        –disable-ccache
        #–with-lang=zh-CN
        –enable-symbols
        –host=x86_64-pc-cygwin
        –without-help
        –without-helppack-integration
        –disable-online-update
        –disable-breakpad
        –disable-odk
        –without-doxygen
        –enable-python=internal

        编译命令:make check 2>&1 | tee build.log

    2. wsl

      发布于

      oleacc.idl
      64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.19041.0/um\64 bit oleaccProcessing .idlC:/PROGRA~2/WI3CF2~1/10/I
      nclude/10.0.19041.0/um\oleacc
      .idl
      ocidl.idl
      oleacc.idl
      oleacc.idl

      midl : error MIDL9008 : internal compiler problem – See documentation for suggestions on how to find a workaround.
      midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx, line 1023
      make[1]: *** [E:/LibreOfficeComplie/libreoffice-7-3/winaccessibility/CustomTarget_ia2_idl.mk:29: E:/LibreOfficeComplie/
      libreoffice-7-3/build64/workdir/CustomTarget/winaccessibility/ia2/idl/AccessibleKeyBinding.h] Error 48
      64 bit Processing C:/PROGRA~2/WI3CF2~1/10/Include/10.0.19041.0/um\oleidl.idl
      oleidl.idl

      我也遇到这个问题,请问解决了么?

  29. gcx

    发布于

    make的时候这个报错,请问是怎么回事

    [build DEP] LNK:Library/libepoxy.so
    coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
    make build_nspr
    coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
    mkdir -p ./../nspr/out
    cd ./../nspr/out ; \
    CC="gcc" CXX="g++" sh ../configure \
    --disable-debug --enable-optimize --enable-64bit \
    --with-dist-prefix='/home/logsaas/libreoffice/libreoffice-7.3.2.1/workdir/UnpackedTarball/nss/nss/../dist/out' \
    --with-dist-includedir='/home/logsaas/libreoffice/libreoffice-7.3.2.1/workdir/UnpackedTarball/nss/nss/../dist/out/include'
    make -C ./../nspr/out
    make: *** ../nspr/out: No such file or directory.  Stop.
    make[3]: *** [build_nspr] Error 2
    make[2]: *** [nss_build_all] Error 2
  30. gcx

    发布于

    [build DEP] LNK:Library/libepoxy.so
    coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
    make build_nspr
    coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
    mkdir -p ./../nspr/out
    cd ./../nspr/out ; \
    CC="gcc" CXX="g++" sh ../configure \
    --disable-debug --enable-optimize --enable-64bit \
    --with-dist-prefix='/home/logsaas/libreoffice/libreoffice-7.3.2.1/workdir/UnpackedTarball/nss/nss/../dist/out' \
    --with-dist-includedir='/home/logsaas/libreoffice/libreoffice-7.3.2.1/workdir/UnpackedTarball/nss/nss/../dist/out/include'
    make -C ./../nspr/out
    make: *** ../nspr/out: No such file or directory.  Stop.
    make[3]: *** [build_nspr] Error 2
    make[2]: *** [nss_build_all] Error 2
    

    您好,make的时候报这个错,我尝试mkdir out目录,又报找不到makefile,我感觉是cpu是arm哪里需要配置,但是无从下手

  31. 尔尔

    发布于

    大佬们,make报这个错,有没有遇到过

    make[2]: *** [libharfbuzz_la-hb-face.lo] 错误 1
    make[2]: *** 正在等待未完成的任务....
    make[1]: *** [/opt/libreoffice-7.2.2.2/workdir/ExternalProject/harfbuzz/build] 错误 1
    make[1]: *** 正在等待未完成的任务....
    make: *** [build] 错误 2
    1. gcx

      发布于

      你是arm编译的吗

      1. 尔尔

        发布于

        centos7编译,已经好了

        1. 尔尔

          发布于

          编译出来的包是x86格式,怎么编译arm机可运行的格式

          1. 尔尔

            发布于

            或者是怎么离线编译

          2. gcx

            发布于

            我也在搞arm编译的,但是好像cpu识别有问题,不知道咋搞,你那个x86的肯定没用

          3. 尔尔

            发布于

            兄弟你那个解决了吗

          4. gcx

            发布于

            上面的发的问题没有了,但是不同的函数报这个错,我看说是个bug,我改了还是不行,你编译出来了吗

            ucbstorage.cxx:(.text+0x645b): undefined reference to `non-virtual thunk to cppu::WeakImplHelper::acquire()'
          5. 尔尔

            发布于

            我没有arm环境

          6. gcx

            发布于

            那你咋编译呀

            /home/logsaas/libreoffice-7-1/workdir/CxxObject/xmloff/source/core/xmlimp.o: In function `SvXMLImport::SetAutoStyles(SvXMLStylesContext*)':
            xmlimp.cxx:(.text+0x8b90): undefined reference to `non-virtual thunk to cppu::WeakImplHelper::acquire()'
             
            我加了template class uno::Reference ;这个还是报错,其它的问题加了就可以了
          7. 尔尔

            发布于

            我搞不了了,没有环境,我帮你搜搜你的这个问题吧

          8. gcx

            发布于

            恩,谢谢你看看这两个,感觉bug无解呀,我idev频道聊了,都没能理我,搞出来我提供出来
            https://www.mail-archive.com/libreoffice-bugs@lists.freedesktop.org/msg790573.html
            https://bug-attachments.documentfoundation.org/attachment.cgi?id=172646

          9. gcx

            发布于

            我试了7的所以版本了,我还拉了master分支,问题更多

          10. 尔尔

            发布于

            解决了吗,兄弟

          11. gcx

            发布于

            没呢,太难了,不知道咋搞了

      2. > 我idev频道聊了,都没能理我
        在IRC频道请教时,要有耐心,开发者大多位于欧洲,有时差,可能你在提问时他们正在睡觉呢,你可以换个时间再问。更有效的办法是向开发者邮件列表发邮件询问,这样很多人就能看到并回应。

        1. gcx

          发布于

          大佬,有qq群吗

    2. gcx

      发布于

      兄弟,我终于搞定的,7.3和7.1都不行,7.0.6才行

    3. gcx

      发布于

      兄弟,我终于搞定的,7.0.6才行

      1. 尔尔

        发布于

        可以给下编译的rpm包吗

        1. gcx

          发布于

          可以,但是

          Error: Package: lodevbasis7.0-core-7.0.6.2-2.aarch64 (/lodevbasis7.0-core-7.0.6.2-2.aarch64)
                     Requires: libfreetype.so.6
          Error: Package: lodevbasis7.0-core-7.0.6.2-2.aarch64 (/lodevbasis7.0-core-7.0.6.2-2.aarch64)
                     Requires: libXinerama.so.1
           You could try using --skip-broken to work around the problem
           You could try running: rpm -Va --nofiles --nodigest
          

          装的时候提示这两个,我还看已经安装了,也有这个库,不知道咋解决呢

          1. 尔尔

            发布于

            wh0221-
            麻烦加下我微信可以吗,我这边安装试试

          2. gcx

            发布于

            可以,你的微信多少

          3. 尔尔

            发布于

            wh0221-

          4. 尔尔

            发布于

            老哥,麻烦加下微信,私下咨询一下

          5. gcx

            发布于

            我加你了呀,你没通过

          6. 尔尔

            发布于

            老哥,没收到,18329741629

          7. Kevin Suo

            发布于

            装 libxinerama1 包试试。

            1. gcx

              发布于

              请教下,用arm的centos7.7的自带的或者x86的提供的7版本的libreoffice转换11M的doc几秒钟就可以转换了,但是arm上编译的7.06的得五十分钟,这个是什么原因:
              转换命令为

              [root@1 logsaas]# libreofficedev7.0 --convert-to pdf:writer_pdf_Export ./2.docx
              
              1. “用arm的centos7.7的自带的或者x86的提供的7版本的libreoffice转换11M的doc几秒钟就可以转换了”,自带的版本也是7.0.6版吗,还是更新的版本?

  32. 提醒大家,留言时可以为评论中的源代码、终端输出等内容使用HTML的pre标记,从而使其在网页上原样显示。

    1. gcx

      发布于

      作者能指导下吗,或者把编译的rpm包提供下呗,太难了

    2. gcx

      发布于

      大佬,你知道这个怎么安装吗,我装的时候说缺少依赖,包是不是全在这里,其它地方没有,workdir/installation/LibreOfficeDev/rpm/install/LibreOfficeDev_7.0.6.2_Linux_rpm

      1. 解决了吗,没有的话请提供完整的安装命令。

      2. 另,你在autogen.input中是否设置了–without-fonts之类的参数?请提供你的autogen.input选项。

        1. gcx

          发布于

          设置了的,我就把所以的rpm 执行yum -y install *.rpm,报错如下,我看了
          [root@1 rpm]# rpm -qf /usr/lib64/libXinerama.so.1
          libXinerama-1.1.3-2.1.el7.aarch64
          这个包我也装了,我换了高版本的也不行
          updates | 2.9 kB 00:00:00
          —> Package lodevbasis7.0-draw.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-en-US.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-extension-pdf-import.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-firebird.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-gnome-integration.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-graphicfilter.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-images.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-impress.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-librelogo.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-libreofficekit-data.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-math.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-ogltrans.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-ooofonts.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-ooolinguistic.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-python-script-provider.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-pyuno.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-qtz.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-writer.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-xsltfilter.aarch64 0:7.0.6.2-2 will be installed
          —> Package lodevbasis7.0-zh-CN.aarch64 0:7.0.6.2-2 will be installed
          –> Finished Dependency Resolution
          Error: Package: lodevbasis7.0-core-7.0.6.2-2.aarch64 (/lodevbasis7.0-core-7.0.6.2-2.aarch64)
          Requires: libXinerama.so.1
          You could try using –skip-broken to work around the problem
          You could try running: rpm -Va –nofiles –nodigest
          #安装路径
          –prefix=/opt/office

          #禁用帮助
          –without-help
          –without-helppack-integration
          –disable-postgresql-sdbc

          #启用简体中文用户界面
          –with-lang=zh-CN
          #在线更新及崩溃报告功能禁用
          –disable-odk
          –without-doxygen
          –disable-online-update
          –disable-breakpad
          –enable-epm
          –with-package-format=rpm
          #禁用与JUnit有关的测试
          –without-junit
          #启用libreoffice内置的字体
          –with-fonts
          #禁用Office Development Kit。若启用ODK,则额外需要doxygen依赖项。
          #若编译好之后您需要rpm (或deb)包,则需要启用下列两项,默认不启用:
          #编译之间共享external_tarballs第三方源代码包,为加快编译速度,可以预先在国内镜像下载(https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs/)。
          #设置–with-external-tar选项指定第三方源代码包路径:
          –with-system-nss
          –with-external-tar=/home/logsaas/libreoffice/dl/libreoffice/external_tarballs
          #禁用自带java
          –without-java
          #需要用到firebird数据库则要启用,默认不启用
          –enable-firebird-sdbc
          –without-system-firebird
          –enable-python=internal

          1. Kevin Suo

            发布于

            你运行autogen.sh以及编译make是以root用户进行的吗?随然我没试过,但是我看到过如果以root进行libreoffice编译会出现很多不可预期的问题,不知道会不会跟这个又关。另外,你在邮件列表中提供的代码粘贴链接是无效的,有人已经回复你了让你重新粘贴。

          2. gcx

            发布于

            恩,我现在编译好了,这个问题就是依赖库的问题还可以问他们吗,只是链接无效吗,我只是个小运维,我都不知道怎么和他们聊,我看说root编译,好像没问题,我建了个用户,然后给了sudo权限老是出问题

          3. gcx

            发布于

            试了非root,安装的时候还是依赖这个库报错,你那边怎么弄的呀

            1. 如上所说,装 libxinerama1 包试试。

              1. gcx

                发布于

                哎,说的这个我都装过,devel和libxinerama1

            2. 邮件列表回复让你安装libXinerama-devel包。

            3. Kevin Suo

              发布于

              粘贴Christian Lohmaier在邮件列表中的回复:

              When building packages using the epm method, the dependency gets added by instsetoo_native/inc_openoffice/unix/find-requires-x11.sh – and it looks like it should also add the ()(64bit) marker to the dependency when PLATFORMID is linux_aarch64 and not only for linux_x86_64

              check with rpm -q –provides libXinerama-1.1.3-2.1.el7.aarch64 whether it provides “libXinerama.so.1()(64bit)”

              1. gcx

                发布于

                libXinerama-devel-1.1.3-2.1.el7.aarch64
                libXinerama-1.1.3-2.1.el7.aarch64
                这些东西我都检查过的
                libxinerama1这个叶装了没用,不知道是不是版本有问题,但是不知道装哪个了

                1. Kevin Suo

                  发布于

                  邮件列表仔细看一下回复一下他们。

                  1. Kevin Suo

                    发布于

                    注意回复邮件列表时请“回复全部”,确保邮件列表的地址在收件人中。另外,邮件主题中请删除“Re: 回复:回复:回复:回复:回复:libreoffice-7.3.2 compile in arm system”前面的“回复”,只保留一个Re。

              2. Kevin Suo

                发布于

                以下commit应该能解决你的问题(目前已合并到7.3分支),请测试并反馈到邮件列表:
                https://git.libreofficechina.org/core/commit/?h=libreoffice-7-3&id=5f05b79821699456309a9b7434772cc3eb2dc64a

  33. 小白编译libreoffice

    发布于

    您好,我在欧拉系统上编译6.0.6.1版本,执行autogen.sh时提示:

    checking build system type... aarch64-unknown-linux-gnu
    checking host system type... aarch64-unknown-linux-gnu
    checking for product name... LibreOfficeDev
    checking for package version... 6.0.6.1
    checking for product version... 6.0

    最后提示

    ****************************************************************************
    To build, run:
    /usr/bin/make
    ······

    之后执行了make,出现错误提示:

    drbg.c: 在函数‘RNG_RandomUpdate’中:
    ../../../dist/out/include/prtypes.h:593:38: 错误:数组‘arg’的大小为负
         extern void pr_static_assert(int arg[(condition) ? 1 : -1])
                                          ^
    drbg.c:541:5: 附注:in expansion of macro ‘PR_STATIC_ASSERT’
         PR_STATIC_ASSERT(sizeof(size_t) <= 4);
         ^~~~~~~~~~~~~~~~
    make[5]: *** [../../coreconf/rules.mk:393:out/Linux_SINGLE_SHLIB/drbg.o] 错误 1
    make[4]: *** [Makefile:626:libs] 错误 2
    make[3]: *** [../coreconf/rules.mk:101:libs] 错误 2
    make[2]: *** [coreconf/rules.mk:101:libs] 错误 2
    make[1]: *** [/home/eng/make_libreoffice/libreoffice-6.0.6.1/external/nss/ExternalProject_nss.mk:34:/home/eng/make_libreoffice/libreoffice-6.0.6.1/workdir/ExternalProject/nss/build] 错误 1
    
    ·········
    
    gawk: fatal: cannot use gawk builtin `namespace' as variable name
    make[4]: *** [Makefile:1324:errnos-sym.h] 错误 2
    make[3]: *** [Makefile:474:all-recursive] 错误 1
    make[2]: *** [Makefile:405:all] 错误 2
    make[1]: *** [/home/eng/make_libreoffice/libreoffice-6.0.6.1/external/libgpg-error/ExternalProject_libgpg-error.mk:36:/home/eng/make_libreoffice/libreoffice-6.0.6.1/workdir/ExternalProject/libgpg-error/build] 错误 1
    make: *** [Makefile:269:build] 错误 2

    看了源码drbg.c中提示问题的地方,是走了32位情况的条件编译,怎么能设定64位编译?或者有其他解决办法吗?

    1. 抱歉,你的评论被加入到了垃圾评论队列,刚刚看到。

      你提到的问题我得再想想,但是你能不能先试试编译最新的7.3版本?6.0有点老了,老版本用最新的编译工具不可避免会出现问题。

    2. 比如你提到的libgpg的错误,应该是与https://dev.gnupg.org/T4459中提到的是一样的,这个错误已在https://dev.gnupg.org/rE7865041c77f4f7005282f10f9b6666b19072fbdf中修复,造成问题的原因是libgpg编译时依赖Gawk,而如果系统上的gawk是新版本的Gawk 5.0或更高版本的话就会报错。

      实际上,如果你在现在的操作系统上(基于最新的工具链)来编译libreoffice 3.5,是肯定没法通过的,会有各种错误,而libreoffice 3.5在它当时的各个操作系统下都能编译通过。要想在新系统上顺利编译旧版本,你就需要用老旧的操作系统。

  34. 崔健

    发布于

    CPU:Loongson-3C5000LL
    系统:Loongnix-Server Linux release 8.3
    libreofficeb版本:7.2.5.1

    大佬好,我需要编译安装libreoffice。但是configure最后出了个错误:

    configure: WARNING: You are building 32-bit binaries but the JDK is 64-bit
    configure: error: You should pass the --with-jdk-home option pointing to a (32-bit) JDK

    这是不是由于libreoffice不认识龙芯的cpu,导致错误认为是个32位的cpu?

    之后我configure后面加上–without-java,可以过了。但是后面make过不去,提示:

    /home/user1/libreoffice-7.2.5.1/solenv/gbuild/UnoApiTarget.mk:127: *** gb_UnoApiHeadersTarget_select_variant must be defined by platform. Stop.
    1. Kevin Suo

      发布于

      configure: WARNING: You are building 32-bit binaries but the JDK is 64-bit

      这个很明显,你的CPU是64位的、但编译的libreoffice默认是64位的,而是你的JDK却是64位的。如果要启用java,那么你必须也使用32位的JDK,或者使用–host=x86_64-pc-cygwin或者–host=aarch64-pc-cygwin以启用64位libreoffice编译。其实如果不用数据库功能和求解器的话可以–without-java.
      见:https://wiki.documentfoundation.org/Development/BuildingOnWindows#Selecting_the_host_.2F_target_system

      gb_UnoApiHeadersTarget_select_variant must be defined by platform. Stop.

      这个我也不太确定是哪里的问题,你可以先在–without-java的情况下运行一遍make distclean,然后重新运行autogen.sh,再make,如果这个错误还是出现,请提供较为完整的autogen.sh和make的日至,我可以代为在irc上求助。

      1. 崔健

        发布于

        [user1@514adae7f545 libreoffice-7.2.5.1]$ make 
        mkdir -p /home/user1/libreoffice-7.2.5.1/instdir
        /home/user1/libreoffice-7.2.5.1/solenv/bin/install-gdb-printers -a /home/user1/libreoffice-7.2.5.1/instdir -c
        make -j 32  -rs -f /home/user1/libreoffice-7.2.5.1/Makefile.gbuild build  
        /home/user1/libreoffice-7.2.5.1/solenv/gbuild/UnoApiTarget.mk:127: *** gb_UnoApiHeadersTarget_select_variant must be defined by platform.  Stop.
        make: *** [Makefile:287: build] Error 2

        感谢大佬回复,这是make后的全部信息。应该还是和不认识loongarch64这个架构的cpu有关。。。我其实不需要完整的libreoffice,只要soffice能运行就行。。。龙芯那边据说还在迁移libreoffice,只不过需要时间。我就自己先试试。。

        1. 来自红帽的资深开发者Caolán McNamara回复如下:

          solenv/gbuild/UnoApiTarget.mk at that location has

          ifeq ($(origin gb_UnoApiHeadersTarget_select_variant),undefined)
          $(eval $(call gb_Output_error,gb_UnoApiHeadersTarget_select_variant
          must be defined by platform))
          endif

          I expect that gets set by…

          gb_UnoApiHeadersTarget_select_variant = $(if $(filter
          udkapi,$(1)),comprehensive,$(2))

          in solenv/gbuild/platform/unxgcc.mk

          and for that to be included by

          solenv/gbuild/platform/linux.mk

          and for this architecture that should (I think) be included by
          solenv/gbuild/platform/LINUX_GODSON64_GCC.mk

          so to debug why that might not be happening I’d look into config.log
          and search for the line that starts with
          CPUNAME=
          and see what that is to check that first

          简单翻译如下:

          在源代码的文件 solenv/gbuild/UnoApiTarget.mk 中,有:

          ifeq ($(origin gb_UnoApiHeadersTarget_select_variant),undefined)
          $(eval $(call gb_Output_error,gb_UnoApiHeadersTarget_select_variant
          must be defined by platform))
          endif

          对于你的系统而言,我猜测该变量是由 solenv/gbuild/platform/unxgcc.mk 中的以下代码块设置的:

          gb_UnoApiHeadersTarget_select_variant = $(if $(filter
          udkapi,$(1)),comprehensive,$(2))

          而unxgcc.mk被以下文件包含:
          solenv/gbuild/platform/linux.mk

          而对于你的体系架构而言,我觉得该linux.mk可能被以下文件包含:
          solenv/gbuild/platform/LINUX_GODSON64_GCC.mk

          因此,要调试并找到原因,你可以先看看config.log中的如下行中:
          CPUNAME=
          的值是什么,进而判断哪些代码被调用进而一步步出现最开始提到的错误的。

          因此,我建议你:
          1. 先`make distclean`
          2. 再`./autogen.sh`
          3. 提供源代码根目录下由autogen.sh生成的config.log文件中的CPUNAME=的值,并通过邮件将该config.log文件发送给我(suokunlong at 126.com,或者最好在论坛中发帖上传附件)

    2. Kevin Suo

      发布于

      来自龙芯中科的工程师吴家欢(Wu Jiahuan),近日已向LibreOffice提交了适配龙芯64位处理器架构的代码,且该代码已被接受合并到了master分支。
      见:https://git.libreofficechina.org/core/commit/?id=d3625d968901eb93a9680db8d1165f70de3fd64e

      这项改进预计将在LibreOffice 7.5.0版本中体现。想要在龙芯平台编译LibreOffice的同学,可以克隆当前的master分支进行测试。

  35. squirrel

    发布于

    twaindsm_2.4.1.orig.tar.gz这个文件没有在https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs

    1. 我缓存的都是我在linux下编译实际用到的。如果需要的人比较多的话,我考虑一下是不是有必要把所有的全部镜像下来。

      1. squirrel

        发布于

        希望能有一个全部的镜像,我编译的是windows版,可能和Linux所需的内容有些不同,有些内容即便我通过范强(谐音)还是不能通过https://dev-www.libreoffice.org/src/直接下载,比如twaindsm,https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs下也是没有的,还有https://dev-www.libreoffice.org/extern/虽然这个里面的内容不多

      2. squirrel

        发布于

        希望能够提供全部镜像,还有https://dev-www.libreoffice.org/extern

        1. Kevin Suo

          发布于

          https://dev-www.libreoffice.org/extern 已下载到了https://go.suokunlong.cn:88/dl/libreoffice/extern/。

        2. Kevin Suo

          发布于

          twaindsm已下载到了https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs中。里面内容太多了,全部镜像的话我最近可能没时间写抓取代码,等有时间吧。

    2. 你说的文件我已经添加。这个只有690,151字节,因此在编译时让它自行下载也可以。

  36. 高原之狼

    发布于

    好像那个第三方 tarball 的国内镜像 404 了?
    https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs/

    1. Kevin Suo

      发布于

      我换了一下服务器的机器,忘了配置这个了,马上解决。

    2. 现在好了。

  37. CanoeCat

    发布于

    楼主,你根据collabora公司这篇文章:https://collaboraonline.github.io/post/build-code-android/ ,编译过android吗?我有些问题想要咨询你。

    1. Kevin Suo

      发布于

      没有哦,感觉android下的没有编译的必要,现成的拿来用就行了,手机上无非是偶尔打开个文件看看应应急

  38. 一言若、

    发布于

    楼主,我只想编译其中的calc这一个模块,这个可以实现吗?

    1. Kevin Suo

      发布于

      理论上可以,但是LibreOffice的各个模块之间的依赖关系比较复杂,要单独编译其中一个模块的话你需要自己修改源代码,去除不需要的部分,自己处理依赖关系,得不偿失。

      1. 一言若、

        发布于

        近期从6.1.6版本,再到6.4版本,再到7.1版本,最后make都会报错.

        armhelper.s: Assembler messages:
        armhelper.s:48: Error: junk at end of line, first unrecognized character is `@'
        armhelper.s:50: Error: unknown mnemonic `stmfd' -- `stmfd sp!,{r0-r3}#follow other parameters on stack'
        armhelper.s:51: Error: operand 1 must be an integer register -- `mov r0,ip#r0 points to functionoffset/vtable'
        armhelper.s:52: Error: operand 1 must be an integer register -- `mov r1,sp#r1 points to this and params'
        armhelper.s:56: Error: junk at end of line, first unrecognized character is `@'
        armhelper.s:58: Error: unknown mnemonic `stmfd' -- `stmfd sp!,{r4,lr}#save return address'
        armhelper.s:60: Error: junk at end of line, first unrecognized character is `@'
        armhelper.s:62: Error: unexpected characters following instruction at operand 1 -- `bl cpp_vtable_call(PLT)'
        armhelper.s:64: Error: unexpected characters following instruction at operand 3 -- `add sp,sp,#4#no need to restore r4(we didn116touch it)'
        armhelper.s:65: Error: operand 1 must be an integer register -- `ldr pc,[sp],#20#return,discarding function arguments'
        armhelper.s:67: Error: junk at end of line, first unrecognized character is `@'
        [UIL] basctl/uiconfig/basicide/ui/newlibdialog
        make[1]: *** [/home/unix/Downloads/libreoffice-6.4.7.2/bridges/CustomTarget_gcc3_linux_arm.mk:18: /home/unix/Downloads/libreoffice-6.4.7.2/workdir/CustomTarget/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.o] Error 1
        make[1]: *** Waiting for unfinished jobs....
        make: *** [Makefile:282: build] Error 2
        1. > 一言若、说:
          > 2021-08-12 上午10:08

          > 这个错误,只需要修改armhelper.S文件开头的宏定义部分,把@改为#即可
          > 应该是早期汇编的行注释时@,然而近期@已经不是汇编的注释了

          看来你已经找到原因和解决方案了。

  39. 露神

    发布于

    楼主裁剪搞定了吗?我也遇到很大的这个问题

  40. 哈哈

    发布于

    android so 编译出来160多m 无法裁剪体积

    1. Kevin Suo

      发布于

      应该是启用了debug symbol,你的编译选项是什么。

      1. 哈哈

        发布于

        # ARM Android
        --with-distro=LibreOfficeAndroidAarch64
        --with-android-sdk=/home/haitao/Android/Sdk
        --with-android-ndk=/home/haitao/Android/Sdk/android-ndk-r21
        # 自己编译的话在线更新及崩溃报告功能就没啥用了,禁用
        --disable-online-update
        --disable-breakpad
        
        # 禁用与JUnit有关的测试
        --without-junit
        
        # 我的系统上已经有字体了,禁用libreoffice内置的字体
        #--with-fonts
        
        # 禁用Office Development Kit。若启用ODK,则额外需要doxygen依赖项。
        --disable-odk
        --without-doxygen
        --disable-ext-wiki-publisher
        --without-fonts
        --without-package-format
        --without-omindex
        --disable-debug
        --disable-sal-log
        --disable-symbols
        --disable-compiler-plugins
        --disable-ooenv
        --disable-lto
        --disable-gtk4
        --disable-introspection
        
        --disable-report-builder
        --disable-lpsolve
        --disable-coinmp
        --enable-mergelibs
        --disable-odk
        #--disable-gtk
        --disable-cairo-canvas
        --disable-dbus
        --disable-sdremote
        --disable-sdremote-bluetooth
        --disable-gio
        --disable-randr
        #--disable-gstreamer-1-0
        --disable-cve-tests
        --disable-cups
        --disable-extension-update
        --disable-postgresql-sdbc
        --disable-lotuswordpro
        --disable-firebird-sdbc
        --disable-scripting-beanshell
        --disable-scripting-javascript
        --disable-largefile
        --without-helppack-integration
        --without-system-dicts
        --disable-gtk3
        --disable-dconf
        #--disable-gstreamer-0-10
        --disable-firebird-sdbc
        --without-fonts
        --without-junit
        #--with-theme="no"
        --disable-evolution2
        --disable-avahi
        --without-myspell-dicts
        #--with-galleries="no"
        #--disable-kde4
        --disable-introspection
        --without-krb5
        --disable-python
        --disable-pch
        --disable-ooenv
        --disable-dependency-tracking
        
        --disable-avahi
        --disable-cairo-canvas
        --disable-coinmp
        --disable-cups
        --disable-cve-tests
        --disable-dbus
        --disable-dconf
        --disable-dependency-tracking
        --disable-evolution2
        --disable-dbgutil
        --disable-extension-integration
        --disable-extension-update
        --disable-firebird-sdbc
        --disable-gio
        --disable-gstreamer-1-0
        --disable-gtk3
        --disable-introspection
        --disable-largefile
        --disable-lotuswordpro
        --disable-lpsolve
        --disable-odk
        --disable-ooenv
        --disable-pch
        --disable-postgresql-sdbc
        --disable-python
        --disable-randr
        --disable-report-builder
        --disable-scripting-beanshell
        --disable-scripting-javascript
        --disable-sdremote
        --disable-sdremote-bluetooth
        --without-export-validation
        --without-helppack-integration
        --without-junit
        --without-krb5
        --without-myspell-dicts
        --without-system-dicts
        
        1. 没编译过android下的,不好评论。建议去irc频道 #libreoffice-dev咨询。

    2. Xiaoc

      发布于

      楼主精简了吗?我也想问如何精简so库体积

      1. gurecn

        发布于

        同咨询,资源太大了

  41. 999

    发布于

    你好,我的系统是麒麟V10,make的时候报错如下:

    /usr/bin/ld: /lib64//libpangoft2-1.0.so.0: undefined reference to `FcWeightFromOpenTypeDouble'
    /usr/bin/ld: /lib64//libpangoft2-1.0.so.0: undefined reference to `FcWeightToOpenTypeDouble'
    /usr/bin/ld: /lib64//libpangoft2-1.0.so.0: undefined reference to `FcConfigReference'
    collect2: error: ld returned 1 exit status
    make[1]: *** [/opt/libreoffice-7.0.6.2/solenv/gbuild/LinkTarget.mk:667: /opt/libreoffice-7.0.6.2/workdir/LinkTarget/Executable/gtktiledviewer] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make: *** [Makefile:282: build] Error 2

    我编译的版本是7.0.6.2

    1. 999

      发布于

      已经解决啦

      1. 怎么解决的,能否分享一下?

        1. 999

          发布于

          yum install -y gtk3-devel

      2. gcx

        发布于

        编译的arm包能给我下吗,谢谢

    2. 温暖的阳光

      发布于

      你好,请问可以分享一下吗?

      1. 999

        发布于

        yum install -y gtk3-devel

    3. 尔尔

      发布于

      你好,兄弟,可以分享下你编译后的包吗

        1. 平时普通的操作你大可不必、而且不应该用root用户进行操作,用root用户进行这些操作是一个坏习惯。如果是服务器的话,我猜测你的ssh登录也是用的root用户?被黑客破解登录密码只是个时间问题 。

          下载、配置、编译以普通用户即可,只在安装rpm包时用sudo或root即可。

  42. Kevin Suo

    发布于

    参考:
    https://go.suokunlong.cn:88/cgit/lo/core/commit/external/python3/ExternalPackage_python3.mk?id=8aae3b37a6553d645bfc94855adbbd1859e07692
    Fix build error in Python3 for Raspberry pi4b, 2021-01-02

    对应: makefile external/python3/ExternalPackage_python3.mk

  43. 鱼石头

    发布于

    ############
    # 编译环境
    ############

    NAME="Kylin Linux Advanced Server"
    VERSION="V10 (Tercel)"
    ID="kylin"
    VERSION_ID="V10"
    PRETTY_NAME="Kylin Linux Advanced Server V10 (Tercel)"
    ANSI_COLOR="0;31"

    ############
    # 编译错误(错误具体信息记不清楚了,大概是这个意思)
    ############

    external/python3/ExternalPackage_python3.mk: lines 84: Can't find workdir/UnpackedTarball/python3/LO_lib/_sysconfigdata_m_linux_aarch64-unknown-linux-gnu.py

    ############
    # 错误处理
    ############
    修改源码https://go.suokunlong.cn:88/cgit/lo/core/tree/external/python3/ExternalPackage_python3.mk?h=libreoffice-7-0-5#n143

    LO_lib/_sysconfigdata_m_$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \

    修改为如下:

    LO_lib/_sysconfigdata_m_linux_aarch64-unknown-linux-gnu.py \

    再执行make,编译成功

    1. 鱼石头

      发布于

      编译的源码版本:libreoffice-7-0-5

    2. 温暖的阳光

      发布于

      你好,请问可以分享一下吗?

  44. […] 我的之前一篇文章讲解了如何在 Linux 下编译 LibreOffice。编译完成后,您可以手动运行它,测试一些常见的功能看看是不是能正常工作。但是,手动运行太慢了,而且不能涵盖所有的操作和功能。这时候,“单元测试” (Unit Test) 就很有用了。 […]

  45. 发布于

    configure: error: Package requirements (fontconfig >= 2.4.1) were not met:
    
    No package 'fontconfig' found
    
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables FONTCONFIG_CFLAGS
    and FONTCONFIG_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    Error running configure at ./autogen.sh line 316.
    

    有没有遇到这样的问题

    1. Kevin Suo

      发布于

      你编译的是哪个版本?是在什么host系统中编译的?如果是在Ubuntu上,那么你需要安装 libfontconfig1-dev 包,Fedora下这个包叫fontconfig-devel.

  46. 发布于

    想知道iOS现在如何构建,官方源码下载后按照他提供的一个过时的文档编译,在模拟器那一块出现错误,无法编译通过,也没有形成.a等文件

      1. 发布于

        不是mac环境, 是ios手机端的

        1. Kevin Suo

          发布于

          据我所知,目前用于手机端可用的 LibreOffice 只有 Collabora Office for Android and iOS,见:https://www.collaboraoffice.com/collabora-office-android-ios-release-notes/ 。 可以直接下载已经编译好的安装包。如果要从源代码重新编译,则应当使用 online 仓库的源代码(https://git.libreofficechina.org/online/),编译过程请参考:https://collaboraonline.github.io/post/build-code-ios/

  47. 东域

    发布于

    这个源码有在鲲鹏920服务器上编译通过吗

    1. Kevin Suo

      发布于

      没试过不知道哦。我觉得理论上肯定能,如果出错那肯定是编译器有bug.

    2. gcx

      发布于

      您好,您鲲鹏920上编译过了吗

  48. 福生佳信

    发布于

    在鲲鹏服务器上编译发现如下错误,查阅是汇编上的错误,怎么修改armhelper.s:48: 错误:junk at end of line, first unrecognized character is `@’

    1. Kevin Suo

      发布于

      编译的是哪个版本,master吗?麻烦多复制一些错误提示。

      1. 福生佳信

        发布于

        在鲲鹏服务器上编译,在执行make后,提示这么个信息,编译的版本是5.4版本的,用的gcc是7.3版本的,在形成configure文件时添加的参数是–disable-gtk –without-java –with-package-format=rpm –enable-epm –with-external-tar=/home/libretars –build=arm-linux –without-doxygen –without-junit –without-help –without-helppack-integration,编译参数用的相同的参数

        1. Kevin Suo

          发布于

          试试master或 libreoffice-7-1看看能不能成功编译。

    2. 一言若、

      发布于

      这个错误,只需要修改armhelper.S文件开头的宏定义部分,把@改为#即可
      应该是早期汇编的行注释时@,然而近期@已经不是汇编的注释了

  49. m

    发布于

    checking for bogus pkg-config... configure: error: yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that /usr/local/bin/pkg-config is no longer found by configure scripts.
    configure: error: Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log
    Error running configure at ./autogen.sh line 316.

    你好请问下这个错误的怎么结局

    1. m

      发布于

      config打印是下面

      configure:15119: checking pkg-config is at least version 0.9.0
      configure:15122: result: yes
      configure:15460: checking for ar
      configure:15487: result: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
      configure:15552: checking for nm
      configure:15579: result: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm
      configure:15644: checking for ranlib
      configure:15671: result: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
      configure:15737: checking for objdump
      configure:15753: found /usr/bin/objdump
      configure:15764: result: objdump
      configure:15829: checking for readelf
      configure:15859: result: no
      configure:15921: checking for strip
      configure:15948: result: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip
      configure:16169: checking for bogus pkg-config
      configure:16179: error: yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that /usr/local/bin/pkg-config is no longer found by configure scripts.
      1. Mac下我没编译过,建议去 #libreoffice-dev IRC 频道请教。

        1. gcx

          发布于

          dev里面的都是老外吧,没法聊呀

  50. m

    发布于

    我想问下 有 在 mac下面 的 编译教程或者网址 吗 我是需要开发ios的 ,

    1. 高原之狼

      发布于

      对于 LibreOffice 的编译和构建而言,macOS 和 iOS 是完全不同的两个体系。
      在 macOS 上构建用于台式或笔记本式电脑的 LibreOffice 应用程序,已经很成熟了。官方有支持 macOS 的编译好的软件包可供下载,构建系统方面的支持就在官方源码仓库里,官方维基也有简单的编译指南:https://wiki.documentfoundation.org/Development/BuildingOnMac
      在 iOS 上构建用于手机的 LibreOffice App,是非常新的东西,官方并不支持。目前据我所知只有 Collabora 公司一家在做这件事,他们有相应的 App 供用户下载,但具体构建系统支持的代码在哪里,有没有相应的文档,我都不太清楚。

  51. 蓝天白云

    发布于

    感谢两位的回复

    1. 我刚刚将 wiki 上的在 Windows 下编译的页面主要部分进行了翻译,你可以对照着看一下,也许能找到解决办法。根据我的理解,很可能是 Visual Studio 版本配置的问题。

      1. squirrel

        发布于

        https://dev-www.libreoffice.org/bin/cygwin/make-4.2.1-msvc.exe 即使翻墙也下载不了,能提供一下吗,因为根据编译·wiki说明,windows版在cygwin下只能用这个make,不能用自带的make

        1. 已保存到:https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs/make-4.2.1-msvc.exe

  52. 蓝天白云

    发布于

    
    C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe -arch:SSE /Fotmp32dll\uplink.obj -Iinc32 -Itmp32dll -MD -Ox -O2 -Ob2 -DOPENSSL_THREADS  -DDSO_WIN32 -W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_BN_ASM_
    PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DOPENSSL_USE_APPLINK -I. -DOPENSSL_NO_IDEA -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD
    2 -DOPENSSL_NO_SSL2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_WEAK_SSL_CIPHERS -DOPENSSL_NO_STATIC_ENGINE      /Zi /Fdtmp32dll/lib -D_WINDLL  -c ms\uplink.c
    uplink.c
    ms\uplink.c(12): fatal error C1083: □޷□□򿪰 □□□□ļ□: □□windows.h□□: No such file or directory
    NMAKE : fatal error U1077: □□C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe□□: □□□ش□□롰0x2□□
    Stop.
    D:/LibreOfficeComplie/5.4.7.2/external/openssl/ExternalProject_openssl.mk:59: recipe for target 'D:/LibreOfficeComplie/5.4.7.2build/workdir/ExternalProject/openssl/build' failed
    make[1]: *** [D:/LibreOfficeComplie/5.4.7.2build/workdir/ExternalProject/openssl/build] Error 1
    make[1]: *** Waiting for unfinished jobs....
        [javac] D:\LibreOfficeComplie\5.4.7.2build\workdir\UnpackedTarball\beanshell\build.xml:182: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] □□□□: Դ□□□а□ 1.6 □□ҪĿ□귢□а□ 1.6
    
    BUILD FAILED
    D:\LibreOfficeComplie\5.4.7.2build\workdir\UnpackedTarball\beanshell\build.xml:182: Compile failed; see the compiler error output for details.
    
    Total time: 1 second
    D:/LibreOfficeComplie/5.4.7.2/external/beanshell/ExternalProject_beanshell.mk:17: recipe for target 'D:/LibreOfficeComplie/5.4.7.2build/workdir/ExternalProject/beanshell/build' failed
    make[1]: *** [D:/LibreOfficeComplie/5.4.7.2build/workdir/ExternalProject/beanshell/build] Error 1
        [javac] D:\LibreOfficeComplie\5.4.7.2build\workdir\UnpackedTarball\hsqldb\build\build.xml:143: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    <...>
    
    BUILD FAILED
    D:\LibreOfficeComplie\5.4.7.2build\workdir\UnpackedTarball\hsqldb\build\build.xml:353: Compile failed; see the compiler error output for details.
    
    Total time: 6 seconds
    D:/LibreOfficeComplie/5.4.7.2/external/hsqldb/ExternalProject_hsqldb.mk:17: recipe for target 'D:/LibreOfficeComplie/5.4.7.2build/workdir/ExternalProject/hsqldb/build' failed
    make[1]: *** [D:/LibreOfficeComplie/5.4.7.2build/workdir/ExternalProject/hsqldb/build] Error 1
    
    1. 我只在Linux下编译过,Windows下不熟。你贴的错误提示太多太乱,能否从出错的地方整理一下发出来?另外,重要的是,你在编译时使用了什么样的编译选项(autogen.input 或 autogen.sh后的选项)?

      1. 蓝天白云

        发布于

        我的编译选项是

        ../5.4.7.2/autogen.sh \
        --with-external-tar=/cygdrive/d/LibreOfficeComplie/lo-externalsrc \
        --with-junit=/cygdrive/d/LibreOfficeComplie/Junit/junit-4.10.jar \
        --with-ant-home=/cygdrive/d/LibreOfficeComplie/apache-ant-1.9.5 \
        --with-visual-studio=2015 \
        --with-windows-sdk=7.1A \
        --with-jdk-home=/cygdrive/e/Java/jdk-11.0.9.1+1 \
        --enable-pch --disable-debug --disable-ccache --disable-odk --without-helppack-integration
        

        不过在配置完以后会有个WARNING : No –with-ucrt-dir not specified or dlls not found – installer will have runtime dependency
        make的时候报错是ms\uplink.c(12): fatal error C1083:windows.h: No such file or directory

    2. 高原之狼

      发布于

      > D:/LibreOfficeComplie/5.4.7.2/[…]

      你这是在编译 git HEAD 还是在编译 5.4.7.2 版本?

      1. 蓝天白云

        发布于

        编译5.4.7.2版本的,想生成vs2015工程

        1. 高原之狼

          发布于

          那这篇文章的内容并不适合你。理论上来说发布版的源码里有生成好的 configure 等脚本,不需要再运行 autogen.sh。

          而且 5.4.7 版本也太旧了,如果有符合要求的 Windows 7 和 Visual Studio 2019 version 16.4 以上版本的编译系统,建议还是从 git HEAD 或是最新版本 7.1.x 开始尝试。

          1. 据我所知,LibreOffice是通过autogen.sh脚本生成编译所在机器的configure文件,因此编译前必须运行autogen.sh,否则make找不到需要编译的目标。只不过,我没有在win下编译过,因此帮不上忙。如果有谁试过可以看一下。也可以去看看wiki页面,或者到开发者irc频道寻求帮助。

            也可以试试libreoffice-7-1分支能否成功编译,这个分支已经很稳定了而且有很多性能提升。

  53. 蓝天白云

    发布于

    你好,我在执行完./autogen.sh后,执行make build-nocheck,make发生错误

  54. 张琦

    发布于

    感谢分享!

    1. 不客气,编译时遇到问题可以随时沟通。

      1. sd

        发布于

        官方没有个微信或qq群什么的吗?arm架构编译有点难搞呀,能否支持下,给个群号

      2. sd

        发布于

        “编译完成后,执行 .instdir/program/soffice 即可运行。若在autogen.input 中启用了 “–with_package_format=rpm deb” ,则生成的安装包在 workdir/installation中。”
        上面这句话不是很理解是什么意思,能否仔细说明下

        1. Kevin Suo

          发布于

          你编译完成后,生成的可执行二进制程序位于你编译所在的源代码根目录下名为instdir的文件夹中,若在这个目录下执行./imstdir/program/soffice,就能直接运行。

          如果你想编译生成RPM或DEB安装包(从而能像下载安装已发布的版本一样在你的linux操作系统上安装,而不是在编译所在源代码目录下通过命令行执行./imstdir/program/soffice来运行),那么在编译时你需要在autogen.input文件中(或者以autogen.sh之后所带的参数的形式)加上”–with_package_format=rpm deb”编译选项,这样在编译完成之后就会生成DEB包或RPM包,这些包位于编译所在源代码根目录下的workdir/installation文件夹中。

          如果还是不理解,那么你确实需要动手一步一步实践一下,在哪一步出了问题就问具体的问题。

          你可以在社区论坛中发帖提出问题,别人看到后懂的话一般都会回复你。确实有个QQ群的,但不是官方的,而是中文社区志愿者建的。我平时不上QQ,群里人多所以即使上了也不会去翻历史聊天记录,所以我觉得还是论坛里问或者回复这个博文问会好一些。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注