ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.64k stars 1.06k forks source link

Build system lacks OpenPOWER (ppc64le) support #859

Open madscientist159 opened 4 years ago

madscientist159 commented 4 years ago

Do you want to request a feature or report a bug?

Report a bug

What is the current behavior?

When compiling on a ppc64le system, ONLYOFFICE tries to build for 32-bit Linux. This is wrong and leads to a build failure.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

root@devbox:~/ONLYOFFICE/DocumentServer/core/Common/3dParty# ./make.sh
boost/
cef/
cryptopp/
icu/
openssl/
pole/
v8/
root@devbox:~/ONLYOFFICE/DocumentServer/core/Common/3dParty# cd ../../
root@devbox:~/ONLYOFFICE/DocumentServer/core# make
mkdir -p /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/AllFontsGen/AllFontsGen.build/ && \
cd /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/AllFontsGen/AllFontsGen.build/ && \
PUBLISHER_NAME="Ascensio System SIA" \
PRODUCT_VERSION=0.0.0 \
BUILD_NUMBER=0 \
qmake -r /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/AllFontsGen/AllFontsGen.pro
Info: creating stash file /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/AllFontsGen/AllFontsGen.build/.qmake.stash
Project MESSAGE: linux-32
Project MESSAGE: linux_32/release
mkdir -p /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/graphics/pro/graphics.build/ && \
cd /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/graphics/pro/graphics.build/ && \
PUBLISHER_NAME="Ascensio System SIA" \
PRODUCT_VERSION=0.0.0 \
BUILD_NUMBER=0 \
qmake -r /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/graphics/pro/graphics.pro
Info: creating stash file /root/ONLYOFFICE/DocumentServer/core/DesktopEditor/graphics/pro/graphics.build/.qmake.stash
Project MESSAGE: linux-32
Project MESSAGE: linux_32/release
mkdir -p /root/ONLYOFFICE/DocumentServer/core/UnicodeConverter/UnicodeConverter.build/ && \
cd /root/ONLYOFFICE/DocumentServer/core/UnicodeConverter/UnicodeConverter.build/ && \
PUBLISHER_NAME="Ascensio System SIA" \
PRODUCT_VERSION=0.0.0 \
BUILD_NUMBER=0 \
qmake -r /root/ONLYOFFICE/DocumentServer/core/UnicodeConverter/UnicodeConverter.pro
Info: creating stash file /root/ONLYOFFICE/DocumentServer/core/UnicodeConverter/UnicodeConverter.build/.qmake.stash
Project MESSAGE: linux-32
Project MESSAGE: linux_32/release
Project MESSAGE: core_static_link_libstd
cd /root/ONLYOFFICE/DocumentServer/core/UnicodeConverter/UnicodeConverter.build/ && make;
make[1]: Entering directory '/root/ONLYOFFICE/DocumentServer/core/UnicodeConverter/UnicodeConverter.build'
g++ -c -pipe -fvisibility=hidden -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DINTVER=0.0.0.0 -DLINUX -D_LINUX -DUNICODECONVERTER_USE_DYNAMIC_LIBRARY -DQT_NO_DEBUG -DQT_PLUGIN -I../../UnicodeConverter -I. -I/root/ONLYOFFICE/DocumentServer/core/Common/3dParty/icu/linux_32/usr/local/include -I/usr/lib/powerpc64le-linux-gnu/qt5/mkspecs/linux-g++ -o ../core_build/linux_32/release/obj/UnicodeConverter.o ../UnicodeConverter.cpp
../UnicodeConverter.cpp: In member function ‘std::__cxx11::wstring NSUnicodeConverter::CUnicodeConverter_Private::toUnicode(const char*, const unsigned int&, int, bool)’:
../UnicodeConverter.cpp:202:21: warning: unused variable ‘iii’ [-Wunused-variable]
                 int iii = ucnv_getCCSID(conv, &status);
                     ^~~
../UnicodeConverter.cpp: In member function ‘std::__cxx11::wstring NSUnicodeConverter::CUnicodeConverter_Private::toUnicode(const char*, const unsigned int&, const char*, bool)’:
../UnicodeConverter.cpp:256:21: warning: unused variable ‘iii’ [-Wunused-variable]
                 int iii = ucnv_getCCSID(conv, &status);
                     ^~~
rm -f libUnicodeConverter.so
g++ -static-libstdc++ -static-libgcc -Wl,--rpath=./ -Wl,-O1 -shared -o libUnicodeConverter.so ../core_build/linux_32/release/obj/UnicodeConverter.o  /root/ONLYOFFICE/DocumentServer/core/Common/3dParty/icu/linux_32/build/libicuuc.so.58 /root/ONLYOFFICE/DocumentServer/core/Common/3dParty/icu/linux_32/build/libicudata.so.58 -lpthread
g++: error: /root/ONLYOFFICE/DocumentServer/core/Common/3dParty/icu/linux_32/build/libicuuc.so.58: No such file or directory
g++: error: /root/ONLYOFFICE/DocumentServer/core/Common/3dParty/icu/linux_32/build/libicudata.so.58: No such file or directory
make[1]: *** [Makefile:140: ../../build/lib/linux_32/libUnicodeConverter.so] Error 1
make[1]: Leaving directory '/root/ONLYOFFICE/DocumentServer/core/UnicodeConverter/UnicodeConverter.build'
make: *** [Makefile:288: build/lib/linux_/libUnicodeConverter.so*] Error 2

What is the expected behavior?

Build for 64-bit Linux

DocumentServer version:

Latest GIT master

Operating System:

Debian Buster

ShockwaveNN commented 4 years ago

Yeah, you seems about right, since we do not have any ppc64le processor at our reach

And seems this is not very popular architecture, so I don't think we have enough manpower to add support of it

I'll leave this issue open, but I don't think there will be any changes any time soon

madscientist159 commented 4 years ago

FWIW, it's growing in popularity pretty quickly, especially on desktop. It's one of the only open ISAs, and the only one to have server, desktop, and even embedded class CPUs on the market today. See e.g. https://twitter.com/runlevel__5/status/1255287674707087361 and https://twitter.com/carlosedp/status/1255275941544243202 for examples of people using POWER machines as their daily drivers and / or for software development work.

I'm working on adding support -- so far no major roadblocks have been encountered on the server build aside from the usual Google build tooling problems. If I put together a patch series to enable the server component build on POWER, would that be acceptable into mainline?

madscientist159 commented 4 years ago

Initial patch series at https://github.com/ONLYOFFICE/build_tools/pull/85

Tested to build if the patches in patches/linux/ are applied to their respective main source trees.

madscientist159 commented 4 years ago

These patches are confirmed to work properly in conjunction with NextCloud on a Debian ppc64le host.

madscientist159 commented 4 years ago

Any chance we can get a review / merge on the patches?

ShockwaveNN commented 4 years ago

@madscientist159 I left a comment on PR yesterday

madscientist159 commented 4 years ago

@ShockwaveNN Sorry, didn't get an Email from Github for some reason. Will get it fixed up.