首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁Build onlyoffice”︁的源代码
←
Build onlyoffice
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
Only office requires old version of qt <ref>https://github.com/ONLYOFFICE/build_tools/issues/807</ref> == Linux build == Linux Mint 21.3 <syntaxhighlight lang="bash"> + /home/riguz/Documents/office/build_tools/tools/linux/qt-everywhere-opensource-src-5.9.9/qtbase/configure -top-level -opensource -confirm-license -release -shared -accessibility -prefix ./../qt_build/Qt-5.9.9/gcc_64 -qt-zlib -qt-libpng -qt-libjpeg -qt-xcb -qt-pcre -no-sql-sqlite -no-qml-debug -gstreamer 1.0 -nomake examples -nomake tests -skip qtenginio -skip qtlocation -skip qtserialport -skip qtsensors -skip qtxmlpatterns -skip qt3d -skip qtwebview -skip qtwebengine Creating qmake... ........................................In file included from /home/riguz/Documents/office/build_tools/tools/linux/qt-everywhere-opensource-src-5.9.9/qtbase/src/corelib/tools/qbytearray.cpp:42: /home/riguz/Documents/office/build_tools/tools/linux/qt-everywhere-opensource-src-5.9.9/qtbase/src/corelib/tools/qbytearraymatcher.h: In static member function ‘static QStaticByteArrayMatcherBase::Skiptable QStaticByteArrayMatcherBase::generate(const char*, uint)’: /home/riguz/Documents/office/build_tools/tools/linux/qt-everywhere-opensource-src-5.9.9/qtbase/src/corelib/tools/qbytearraymatcher.h:103:38: error: ‘numeric_limits’ is not a member of ‘std’ 103 | const auto uchar_max = (std::numeric_limits<uchar>::max)(); | ^~~~~~~~~~~~~~ /home/riguz/Documents/office/build_tools/tools/linux/qt-everywhere-opensource-src-5.9.9/qtbase/src/corelib/tools/qbytearraymatcher.h:103:58: error: expected primary-expression before ‘>’ token 103 | const auto uchar_max = (std::numeric_limits<uchar>::max)(); | ^ /home/riguz/Documents/office/build_tools/tools/linux/qt-everywhere-opensource-src-5.9.9/qtbase/src/corelib/tools/qbytearraymatcher.h:103:61: error: ‘::max’ has not been declared; did you mean ‘std::max’? 103 | const auto uchar_max = (std::numeric_limits<uchar>::max)(); | ^~~ | std::max .... </syntaxhighlight> Workaround: <syntaxhighlight lang="bash"> vim qt-everywhere-opensource-src-5.9.9/qtbase/src/corelib/tools/qbytearraymatcher.h # add #include <limits> </syntaxhighlight> Another error: <syntaxhighlight lang="bash"> ... Everything is Ok Folders: 4 Files: 68 Size: 381880513 Compressed: 92162613 delete warning [file not exist]: ./cef_binary.7z.data Traceback (most recent call last): File "/home/riguz/Documents/office/build_tools/./make.py", line 70, in <module> make_common.make() File "/home/riguz/Documents/office/build_tools/scripts/core_common/make_common.py", line 41, in make icu.make() AttributeError: module 'icu' has no attribute 'make' </syntaxhighlight> Workaround: <syntaxhighlight lang="bash"> pip3 uninstall pyicu rm -rf /usr/lib/python3/dist-packages/icu/ </syntaxhighlight> New error: <syntaxhighlight lang="bash"> ../../src/heap/cppgc/heap-base.h:8:10: fatal error: 'memory' file not found #include <memory> ^~~~~~~~ 1 error generated. </syntaxhighlight> <syntaxhighlight lang="bash"> dpkg -l | grep -e cpp -e c++ -e clang; clang -v; which clang ii cpp 4:11.2.0-1ubuntu1 amd64 GNU C preprocessor (cpp) ii cpp-11 11.4.0-1ubuntu1~22.04 amd64 GNU C preprocessor ii cpp-12 12.3.0-1ubuntu1~22.04 amd64 GNU C preprocessor ii libjsoncpp25:amd64 1.9.5-3 amd64 library for reading and writing JSON for C++ ii libpcrecpp0v5:amd64 2:8.39-13ubuntu0.22.04.1 amd64 Old Perl 5 Compatible Regular Expression Library - C++ runtime files ii libpoppler-cpp0v5:amd64 22.02.0-2ubuntu0.4 amd64 PDF rendering library (CPP shared library) ii libsigc++-2.0-0v5:amd64 2.10.4-2ubuntu3 amd64 type-safe Signal Framework for C++ - runtime ii libstdc++-11-dev:amd64 11.4.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3 (development files) ii libstdc++6:amd64 12.3.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3 ii libuno-cppu3 1:7.3.7-0ubuntu0.22.04.4 amd64 LibreOffice UNO runtime environment -- CPPU public library ii libuno-cppuhelpergcc3-3 1:7.3.7-0ubuntu0.22.04.4 amd64 LibreOffice UNO runtime environment -- CPPU helper library zsh: command not found: clang </syntaxhighlight> Workaround:<ref>https://github.com/apple/swift-nio-ssl/issues/105</ref> <syntaxhighlight lang="bash"> sudo apt install libstdc++-12-dev </syntaxhighlight> Error: <syntaxhighlight lang="bash"> src/qvideoslider.cpp: In member function ‘virtual void QVideoSlider::resizeEvent(QResizeEvent*)’: src/qvideoslider.cpp:85:13: error: ‘fabs’ was not declared in this scope; did you mean ‘labs’? 85 | if (fabs(dDpi - m_dDpi) > 0.01) | ^~~~ | labs </syntaxhighlight> <syntaxhighlight lang="bash"> vim ./desktop-sdk/ChromiumBasedEditors/videoplayerlib/src/qtimelabel.cpp # vim ./desktop-sdk/ChromiumBasedEditors/videoplayerlib/qwidgetutils.h #include <math.h> </syntaxhighlight> == Docker build (failed) == <syntaxhighlight lang="bash"> git clone https://github.com/ONLYOFFICE/build_tools cd build_tools cat version 8.1.0 </syntaxhighlight> Modifty the dockerfile: <syntaxhighlight lang="Dockerfile"> FROM ubuntu:16.04 ENV TZ=Etc/UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \ sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \ apt-get -y update && \ apt-get -y install software-properties-common && \ add-apt-repository ppa:openjdk-r/ppa && \ apt-get -y update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install python \ python3 \ sudo \ openjdk-11-jdk \ openjdk-11-jdk-headless \ openjdk-11-jre \ openjdk-11-jre-headless \ git \ build-essential \ openssh-client RUN rm /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python ADD . /build_tools WORKDIR /build_tools CMD ["bash"] </syntaxhighlight> <syntaxhighlight lang="bash"> docker build --tag onlyoffice-document-editors-builder . docker run -it -v $PWD/out:/build_tools/out onlyoffice-document-editors-builder cd tools/linux python3 automate.py </syntaxhighlight> Error: <syntaxhighlight lang="bash"> ERROR: The OpenGL functionality tests failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform. ERROR: Feature 'gstreamer_1_0' was enabled, but the pre-condition 'libs.gstreamer_1_0' failed. </syntaxhighlight>
返回
Build onlyoffice
。