Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is still Ubuntu 16.04 the suggested distro to build ? #807

Closed
adriangibanelbtactic opened this issue May 7, 2024 · 61 comments
Closed

Is still Ubuntu 16.04 the suggested distro to build ? #807

adriangibanelbtactic opened this issue May 7, 2024 · 61 comments
Labels
confirmed-bug Issues with confirmed bugs fixed-release Issues that fixed on next release, waiting to be released

Comments

@adriangibanelbtactic
Copy link

As I have already reported in #802 (comment) builds from Docker (which uses Ubuntu 16.04) seem to fail.

It probably arises from a depot_tools repo commit from April (one month ago) which forces you to use Python 3.6 or a newer version.
I was wondering if, as it has already happened in the past OnlyOffice is built internally with some other dependencies and the Github repo is not updated yet.

I suspect that now internal builds are based on Ubuntu 20.04.

In that case both the README and the Dockerfile should be updated.

Steps to reproduce the problem:

cd /root
git clone \
  --depth=1 \
  --recursive \
  --branch v8.0.1.31 \
  https://github.com/ONLYOFFICE/build_tools.git \
  build_tools
# Ignore detached head warning
cd build_tools
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -e PRODUCT_VERSION=8.0.1 -e BUILD_NUMBER=31 -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v8.0.1.31'

build_tools base repo version:
v8.0.1.31
Operating system:
Ubuntu 16.04
Compiler version:
Whatever Dockerfile installs.

@igwyd
Copy link
Member

igwyd commented May 15, 2024

Hello @adriangibanelbtactic, you are right, i got the same error. I created ticket #68017

@shooding
Copy link

build_tools base repo version:
v8.0.1.50
Operating system:
Ubuntu 16.04

similar issue at building v8

return f'.{gcs_file_name}{MIGRATION_TOGGLE_FILE_SUFFIX}' ^ SyntaxError: invalid syntax

Due to need of python3.8

@igwyd
Copy link
Member

igwyd commented May 17, 2024

It's fixed at c9de527 and will be released in next major release. @adriangibanelbtactic and @shooding thank you for the detailed report.

@adriangibanelbtactic
Copy link
Author

It's fixed at c9de527 and will be released in next major release. @adriangibanelbtactic and @shooding thank you for the detailed report.

Thank you very much @igwyd !

BTW, don't forget about the https://github.com/ONLYOFFICE/document-server-package/ repo.
It has some issues that need some attention too.

Thank you again.

@Rita-Bubnova Rita-Bubnova added the fixed-release Issues that fixed on next release, waiting to be released label May 17, 2024
@shooding
Copy link

@igwyd release/v8.1.0 still gets error when building v8 and cipd

Cloning into '/core/Common/3dParty/v8_89/_gclient_v8_gdy3m7cc'...
remote: Sending approximately 789.65 MiB ...
remote: Counting objects: 7459, done
remote: Finding sources: 100% (3/3)
remote: Total 1098892 (delta 920986), reused 1098890 (delta 920986)
Receiving objects: 100% (1098892/1098892), 789.52 MiB | 9.11 MiB/s, done.
Resolving deltas: 100% (920986/920986), done.
Checking connectivity... done.

[0:03:50] Still working on:
[0:03:50]   v8
1>Syncing projects:   0% ( 0/ 2)
[0:03:52] Still working on:
[0:03:52]   v8
Syncing projects: 100% (38/38), done.

________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' in '/core/Common/3dParty/v8_89/v8'
  File "third_party/depot_tools/download_from_google_storage.py", line 51
    return f'.{gcs_file_name}{MIGRATION_TOGGLE_FILE_SUFFIX}'
                                                           ^
SyntaxError: invalid syntax
Error: Command 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' returned non-zero exit status 1 in /core/Common/3dParty/v8_89/v8
  File "third_party/depot_tools/download_from_google_storage.py", line 51
    return f'.{gcs_file_name}{MIGRATION_TOGGLE_FILE_SUFFIX}'
                                                           ^
SyntaxError: invalid syntax

Subprocess failed with return code 2.
./cipd: line 137: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.
error: unknown option `type'

@adriangibanelbtactic
Copy link
Author

It's fixed at c9de527 and will be released in next major release. @adriangibanelbtactic and @shooding thank you for the detailed report.

Wait a moment... that commit has a python3.tar.gz binary.
That's not right to add binaries to a source repo.
And, well, I can stand the many third party binaries you download because we can inspect which urls you are getting them from... but... Why we should trust a random binary?

I mean... that python3.tar.gz's python3/bin/python3.10 binary might have a trojan after all.

There should be another fix that does not end up throwing a binary on the repo.

Thank you for considering an alternative.

@igwyd
Copy link
Member

igwyd commented May 22, 2024

@shooding, I cheked branch release/v8.1.0 4 days ago in docker 16.04 this error is gone, but branch release/v8.1.0 still in development and other error may appear.

@adriangibanelbtactic I think it's about trust to this repo, you are you are an experienced user and you can check binary files or replase it.
I will show to developers issues from https://github.com/ONLYOFFICE/document-server-package/, thank you.

@shooding
Copy link

Struggling for several days

build for v7.5.1 [OK] serveral months ago.
Host OS: Windows (x64) + make image from build_tools/Dockerfile (From Ubuntu:16.04)

build for v8.0.1 [FAILED]
Host OS: macBook pro m1 (arm64) + make image from build_tools/Dockerfile (From Ubuntu:16.04)
Host OS: Ubuntu 22.04 (x64) + make image from build_tools/Dockerfile (From Ubuntu:16.04)
Host OS: Ubuntu 22.04 (x64) + make image from build_tools/Dockerfile (From Ubuntu:20.04)

Several common issues like:

  1. "RPC failed; curl 18 transfer closed with outstanding read data remaining container"
  2. missing header when building with clang++ (v19) but missing #include header, needs
  3. remained build files from previous failure needs to clean up e.g. "core/Common/3dParty/boost/boost_1_72_0"

After all those fails l tried to update Dockerfile and automate.py "--update", "0" and
mount pre-cloned repos like sdkjs and web-apps into the container to boost build speed in case downloading them many times.

In the updated Dockerfile pre-installed
openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless.
Download qt_source_5.9.9.tar.xz, unzip and mount as qt-everywhere-opensource-src-5.9.9.

Even though tried configure.py with "--update", "0", still get error 1 when building core common modules like boost or v8.
Should i just find a Ubuntu 16 machine as host and run python3 ./automate.py or
find a Windows machine as host + docker build ?

@shooding
Copy link

shooding commented May 27, 2024

I've managed to
build for v8.0.1 [OK]
Host OS: Ubuntu 22.04 (x64) + make image from build_tools/Dockerfile (From Ubuntu:16.04)

with several speed up techniques allow you to continue the build. Here's the Dockerfile that pre-install openjdk. You can omit this if network is very stable. Also change sources.list to the one closet helps.

FROM ubuntu:16.04

ENV TZ=Etc/UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Update the sources.list to use the mirror closet to you
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://free.nchc.org.tw/ubuntu/|g' /etc/apt/sources.list

RUN 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 \
                                    openssh-client

RUN rm /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python

VOLUME ["/work"]
WORKDIR /work

# Set the default command
CMD ["bash"]
export VERSION=8.0.1
cd build_tools && docker build -t documentserver-develop:$VERSION .

Note that i mounted ssh key into container so that we can force using ssh protocol to avoid "RPC failed; curl 18 transfer closed with outstanding read data remaining container" with unstable network (e.g. WiFi congestion).
Note that in Dockerfile, using a volume /work to share the output with host machine, and you can edit/delete repos either within the container or host machine. This is helpful because sometimes you'll need to rm -rf core/Common/3dParty/boost/boost_1_72_0 to clean up intermediate build.

docker run -it --platform=linux/amd64 -p 80:80 \
-e PRODUCT_VERSION=$VERSION \
-e BUILD_NUMBER=50 \
-v ~/.ssh:/root/.ssh \
-v $WORKFOLDER:/work \
documentserver-develop:$VERSION

You'll enter the container then copy & paste these command to have smooth cloning process.

git config --global url."[email protected]:".insteadOf "https://github.com/" && ssh-keyscan github.com >> /root/.ssh/known_hosts && eval "$(ssh-agent -s)" && ssh-add /root/.ssh/id_rsa

If you github ssh key is encrypted, here you enter password. In my senario, i just want to change some stuff in sdjks and web-apps, therefore building server is enough, but still want consistency so pre-cloned these repos and checkout to the correct tag e.g. 8.0.1.50 accordinly, then mount to /work volume before building.

# To share with host machine. Mount -v /path/from/host:/work
# ├── build_tools
# ├── core
# ├── core-fonts
# ├── dictionaries
# ├── qt-everywhere-opensource-src-5.9.9 (pre download and tar -xf )
# ├── sdkjs
# ├── server
# ├── web-apps
# ├── document-server-integration
# ├── ...

You can check the function def get_repositories() in scripts/base.py and comment out those repos pre-cloned. Like:

def get_repositories():
  result = {}
  # result["core"] = [False, False]
  # result["sdkjs"] = [False, False]
  result.update(get_sdkjs_addons())
  result["onlyoffice.github.io"] = [False, False]
  # result["web-apps"] = [False, False]
  result.update(get_web_apps_addons())
  # result["dictionaries"] = [False, False]
  # result["core-fonts"] = [False, False]

Why need to comment out manually? while def update_repositories(repositories) should've done the git update ?
This is because core repo is a submodule of DocumentServer and the building script will check it's parent and error: fatal: Not a git repository: ../.git/modules/core

Then i ran with

cd build_tools/tools/linux/ && python3 ./automate.py server

Build [OK]

@Rita-Bubnova
Copy link
Member

Sorry, we forgot to mention that issue was fixed.
I close this issue. Feel free to comment or reopen it if you got further questions.

@Nocodemon
Copy link

I've been trying to build onlyoffice bu just cant find a branch where this is posiible. You say this is fixed, on which branch/tag/master can you build onlyoffice according to the build tools instruction with the supplied Dockerfile? Ubunut16.04 doesn't have python 3.6 so that can't be used anymore but that is still in your files..

@igwyd
Copy link
Member

igwyd commented Sep 16, 2024

Hello @Nocodemon it was fixed in th v8.1.0, python3.6 added to the build_tools. You can build it from the master branch using docker for example.

@Nocodemon
Copy link

I don't think this is true, I just did now and the problem with depot_tools is still there.

/cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.
error: unknown option `type'
usage: git config []

Config file location
--global use global config file
--system use system config file
--local use repository config file
-f, --file use given config file
--blob read config from given blob object

Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--get-urlmatch get value specific for the URL: section[.var] URL
--replace-all replace all matching variables: name value [value_regex]
--add add a new variable: name value
--unset remove a variable: name [value-regex]
--unset-all remove all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit open an editor
--get-color find the color configured: slot [default]
--get-colorbool find the color setting: slot [stdout-is-tty]

Type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)

Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup

v8 (ERROR)

[0:00:00] Started.

Traceback (most recent call last):
File "/core/Common/3dParty/v8_89/depot_tools/metrics.py", line 302, in print_notice_and_exit
yield
File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 4638, in
sys.exit(main(sys.argv[1:]))
^^^^^^^^^^^^^^^^^^
File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 4624, in main
return dispatcher.execute(OptionParser(), argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/Common/3dParty/v8_89/depot_tools/subcommand.py", line 254, in execute
return command(parser, args[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 3977, in CMDsync
ret = client.RunOnDeps('update', args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 2436, in RunOnDeps
work_queue.flush(revision_overrides,
File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 1026, in flush
reraise(e[0], e[1], e[2])
File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 53, in reraise
raise value
File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 1105, in run
self.item.run(*self.args, **self.kwargs)
File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 1251, in run
self._got_revision = self._used_scm.RunCommand(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 137, in RunCommand
return getattr(self, command)(options, args, file_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 664, in wrapper
return_val = f(*args)
^^^^^^^^
File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 866, in update
strp_current_url = current_url[:-4] if current_url.endswith(
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'

@shooding
Copy link

Hello @Nocodemon it was fixed in th v8.1.0, python3.6 added to the build_tools. You can build it from the master branch using docker for example.

Yes i was using docker (documentserver-develop tag) to build, which is from ubuntu:16.04 and the environment is more fixed.
I manged to build v8.1.3.3 today with ./automate.py server and output to folder build_tools/out/linux_64/onlyoffice/documentserver.

@Nocodemon
Copy link

@shooding you mind sharing exactly how you do it? I'm on Ubuntu 20.04, please share how you git checkout and then the build and run code. Because it feels like I've tried every branch and never gets through building v8

@shooding
Copy link

shooding commented Sep 19, 2024 via email

@Nocodemon
Copy link

ok, so I reinstalled docker according to the stuff in develop and set it up so it doesn't need to run with sudo. Master branch still fails.
Running: git config diff.ignoreSubmodules dirty
./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.
error: unknown option `type'
usage: git config []

You say you run 8.1.3.3 do you just do git checkout 8.1.3.3 and then run it with

mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -v $PWD/out:/build_tools/out onlyoffice-document-editors-builder

@Nocodemon
Copy link

Tried checking out the develop branch and 8.1.1.3 but that also generates errors and stops.

`In file included from ../../src/base/logging.h:21:
../../src/base/template-utils.h:78:15: error: no template named 'tuple_size_v' in namespace 'std'; did you mean 'tuple_size'?
78 | N <= std::tuple_size_v<std::decay_t>;
| ~~~~~^~~~~~~~~~~~
| tuple_size
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../include/c++/5/tuple:798:12: note: 'tuple_size' declared here
798 | struct tuple_size;
| ^
In file included from ../../src/base/ieee754.cc:22:
In file included from ../../src/base/macros.h:13:
In file included from ../../src/base/logging.h:21:
../../src/base/template-utils.h:78:48: error: expected '(' for function-style cast or type construction
78 | N <= std::tuple_size_v<std::decay_t>;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
../../src/base/template-utils.h:130:38: error: no template named 'tuple_size_v' in namespace 'std'; did you mean 'tuple_size'?
130 | constexpr size_t total_size = std::tuple_size_v<std::decay_t>;
| ~~~~~^~~~~~~~~~~~
| tuple_size
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../include/c++/5/tuple:798:12: note: 'tuple_size' declared here
798 | struct tuple_size;
| ^
In file included from ../../src/base/ieee754.cc:22:
In file included from ../../src/base/macros.h:13:
In file included from ../../src/base/logging.h:21:
../../src/base/template-utils.h:130:71: error: expected '(' for function-style cast or type construction
130 | constexpr size_t total_size = std::tuple_size_v<std::decay_t>;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
../../src/base/template-utils.h:145:38: error: no template named 'tuple_size_v' in namespace 'std'; did you mean 'tuple_size'?
145 | constexpr size_t total_size = std::tuple_size_v<std::decay_t>;
| ~~~~~^~~~~~~~~~~~
| tuple_size
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../include/c++/5/tuple:798:12: note: 'tuple_size' declared here
798 | struct tuple_size;
| ^

I'll try and check out 8.1.3.3 from the master branch and build that as well

@Nocodemon
Copy link

Nocodemon commented Sep 20, 2024

master 8.1.1.3 also has the depot_tools error

running: git config diff.ignoreSubmodules dirty
./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.
error: unknown option `type'

@karz94
Copy link

karz94 commented Sep 22, 2024

master 8.1.1.3 also has the depot_tools error

running: git config diff.ignoreSubmodules dirty
./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.
error: unknown option `type'

I've the same issue, did you mange to get it working?

@adriangibanelbtactic
Copy link
Author

master 8.1.1.3 also has the depot_tools error

running: git config diff.ignoreSubmodules dirty
./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.
error: unknown option `type'

Platform linux-amd64 is not supported by the CIPD client

Some advice

Why?

  • My first suspicion is that when using Docker-CE you build by default on a linux_64 system but if you use Docker-alike-software that it's not an actual Docker-CE (such as podman or others) you get linux_amd64 by default.
  • My second suspicion is that building from an actual amd64 machine gives this problem. I am personally using an VPS for that where I use docker on it.
  • My third suspicion is that newest versions of Docker-CE now default to linux_amd64 system instead of linux_64 system. So Dockerfile file might be needed to be rewritten in such a way that it enforces a linux_64 container.

It might be python after all

My first encounter to this error was related to python3 not being installed which they might have fixed by adding a binary of python3.

It might that that enforced binary does not work for your system properly because of... how it was built in the first place.

Feedback

Please tell us what you find out. That way onlyoffice community will know how to address these Platform linux-amd64 is not supported by the CIPD client bootstrap errors and put other similar problem submitters on the right path.

@razerrazer
Copy link

razerrazer commented Sep 27, 2024

@razerrazer make.py install nodejs 2 times. Once, by default package manager, if less than 16 it will use packaged file downloaded somewhere. (you can check)

If you use Ubuntu 22.04, you have to add "apt purge nodejs* -y" and "apt autoremove -y" before it install from the packaged file. Probably this what happen, if you scroll up enough time in the console terminal maybe you can see it complain about this.

Hi,

Thank you for this. I ran some tests and added the reinstall command to /tools/linux/deps.py, but that wasn’t enough. So, I included the Node.js installation in the Docker file, which resolved that issue. However, we're now back to the previous error.

I’ve applied the linux_amd64 fix, as you have in your Git repository:

I’m still encountering the same issue. It feels like the developers from ONLYOFFICE don’t use this compiler themselves.

Even after these changes, I’m still encountering the same issue. It's also funny that they rename it as linux-amd64 when the correct format is linux_amd64. I've never heard anyone use a hyphen ("-") instead of an underscore ("_").

This error are still there even after the changes:

Running: gclient sync --with_branch_heads
Running: git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
Running: git config diff.ignoreSubmodules dirty
./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.

v8 (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Traceback (most recent call last):
  File "/core/Common/3dParty/v8_89/depot_tools/metrics.py", line 302, in print_notice_and_exit
    yield
  File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 4648, in <module>
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 4634, in main
    return dispatcher.execute(OptionParser(), argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/subcommand.py", line 254, in execute
    return command(parser, args[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 3987, in CMDsync
    ret = client.RunOnDeps('update', args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 2436, in RunOnDeps
    work_queue.flush(revision_overrides,
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 1026, in flush
    reraise(e[0], e[1], e[2])
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 53, in reraise
    raise value
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 1105, in run
    self.item.run(*self.args, **self.kwargs)
  File "/core/Common/3dParty/v8_89/./depot_tools/gclient.py", line 1251, in run
    self._got_revision = self._used_scm.RunCommand(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 137, in RunCommand
    return getattr(self, command)(options, args, file_list)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 664, in wrapper
    return_val = f(*args)
                 ^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 884, in update
    strp_current_url = current_url[:-4] if current_url.endswith(
                                           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'

v8/build (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Traceback (most recent call last):
  File "/core/Common/3dParty/v8_89/depot_tools/metrics.py", line 302, in print_notice_and_exit
    yield
  File "/build_tools/scripts/../../core/Common/3dParty/v8_89/depot_tools/gclient.py", line 4648, in <module>
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
  File "/build_tools/scripts/../../core/Common/3dParty/v8_89/depot_tools/gclient.py", line 4634, in main
    return dispatcher.execute(OptionParser(), argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/subcommand.py", line 254, in execute
    return command(parser, args[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build_tools/scripts/../../core/Common/3dParty/v8_89/depot_tools/gclient.py", line 3987, in CMDsync
    ret = client.RunOnDeps('update', args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build_tools/scripts/../../core/Common/3dParty/v8_89/depot_tools/gclient.py", line 2436, in RunOnDeps
    work_queue.flush(revision_overrides,
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 1026, in flush
    reraise(e[0], e[1], e[2])
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 53, in reraise
    raise value
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_utils.py", line 1105, in run
    self.item.run(*self.args, **self.kwargs)
  File "/build_tools/scripts/../../core/Common/3dParty/v8_89/depot_tools/gclient.py", line 1251, in run
    self._got_revision = self._used_scm.RunCommand(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 137, in RunCommand
    return getattr(self, command)(options, args, file_list)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 664, in wrapper
    return_val = f(*args)
                 ^^^^^^^^
  File "/core/Common/3dParty/v8_89/depot_tools/gclient_scm.py", line 884, in update
    strp_current_url = current_url[:-4] if current_url.endswith(

@Nocodemon
Copy link

But isn't the .cipd error actually just the fact that .depot_tools isn't located at ./depot_tools. And they can't find that file?

@razerrazer
Copy link

razerrazer commented Sep 30, 2024

I have tested it with almost everything I can think of:

Used an Intel CPU instead of an AMD CPU.
Added environment variables for depot_tools.
Tested compiling with Ubuntu 20.04 and 22.04.
Changed files back and forth.

However, isn’t the .cipd error simply because .depot_tools isn’t located in ./depot_tools? Is that why it can’t find the file?

When I search inside Docker, I can see the file, so it seems there’s an issue with the compiler that isn't working as expected.

@jefriabdullah
Copy link

I’ve applied the linux_amd64 fix, as you have in your Git repository:

* [Tree commits](https://github.com/jefriabdullah/build_tools/commit/a9b0225458fc871137a9abb33b444b5b0a3363ad)

* [Adding linux_amd64](https://github.com/jefriabdullah/build_tools/commit/9f2038c991c4a548c60de531d9f145707248d753)

I think you guys should ignore this commit as it doesnt do anything. i added to try my luck before and forgot to remove it. :D

Btw did you try to compile everything or just server?

Make sure to just run

./automate.py server

@razerrazer
Copy link

I’ve applied the linux_amd64 fix, as you have in your Git repository:

* [Tree commits](https://github.com/jefriabdullah/build_tools/commit/a9b0225458fc871137a9abb33b444b5b0a3363ad)

* [Adding linux_amd64](https://github.com/jefriabdullah/build_tools/commit/9f2038c991c4a548c60de531d9f145707248d753)

I think you guys should ignore this commit as it doesnt do anything. i added to try my luck before and forgot to remove it. :D

Btw did you try to compile everything or just server?

Make sure to just run

./automate.py server

Server and web-apps.

@jefriabdullah
Copy link

Server and web-apps.

I dont think you need to specify "web-apps". Specify "server" it will include "web-apps".

@razerrazer
Copy link

Server and web-apps.

I dont think you need to specify "web-apps". Specify "server" it will include "web-apps".

unfortunately same error occur even if i add "./automate.py server"

./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.

v8 (ERROR)
****

@adriangibanelbtactic
Copy link
Author

I confirm that v8.1.3.3 version can be built thanks to the default Docker.

I am writing a how-to so that you can use it thanks to my usual patches in order to build your custom version of OnlyOffice. That way you will know how to build newer versions as @razerrazer asked me.

Stay tuned!

@razerrazer
Copy link

@adriangibanelbtactic I believe the compiler is working now. I switched to using the dev build of build_tools, and the code seems to have compiled successfully (at least, as far as I can tell). I now have files in the out folder inside build_tools, but they might still have issues with their own build_tools.

@Nocodemon
Copy link

@adriangibanelbtactic An How-to would be awesome :) @razerrazer are you saying you can check out the offical onlyoffice developer branch and everything will work with the supplied Dockerfile?

@adriangibanelbtactic
Copy link
Author

@adriangibanelbtactic I believe the compiler is working now. I switched to using the dev build of build_tools, and the code seems to have compiled successfully (at least, as far as I can tell). I now have files in the out folder inside build_tools, but they might still have issues with their own build_tools.

Here there's the thing:

  • You (all) don't provide all of the steps you are using to prepare your build VPS machine and the actual commands you use from scratch. There is no way of helping you properly if you don't do that.
  • OnlyOffice guys are not using the public tools published here to build their binaries, they use another set of tools which, in theory, should work quite similar.
  • You are advised somewhere in the build documentation to use the master branch but you should stick to a tag so that you always get the same results.
  • Unfortunately a lot of external dependencies of OnlyOffice are based not on tags (specific versions) but on master branches. That's a big bug on their part. That has caused problems in the past, as the time they had to add those Python 3.8 binaries into the source code (That's another bug having binaries on the source code which I reported.).
  • So, even if you manage to build OnlyOffice one day without OnlyOffice repos being changed it might fail the next day because of some external dependency having changed a lot or being temporarily down.
  • If you live in countries similar to Russia or China you might not have to access to some of those external dependencies because of geo-blocking issues.
  • The same might happen if you don't have an stable internet connection. The build system does not allow to easily re-run just the latest step which failed because of an Internet timeout.
  • You also have to know that when a build step has failed it's much better for you to start from scratch than try to resume the build. That failure might avoid you to build everything ok again.
  • You need enough RAM. This is known to fail with only 4 GB RAM. It works for me with 16 GB RAM.

So when build time comes I make sure to:

  • Use 16 GB RAM
  • Use an stable Internet connection
  • Start from scratch (no reuse of directories)
  • Stick to a known working tag (the ones from the deb repo)

and hope for the best.

And if it does not build I try it again from scratch once more just in case it was a temporarily Internet connection issue.

P.S.: I will add an adaptation of this wall of text to my big how-to build VPS preparation section. :)

@razerrazer
Copy link

razerrazer commented Oct 1, 2024

@adriangibanelbtactic I believe the compiler is working now. I switched to using the dev build of build_tools, and the code seems to have compiled successfully (at least, as far as I can tell). I now have files in the out folder inside build_tools, but they might still have issues with their own build_tools.

Here there's the thing:

* You (all) don't provide all of the steps you are using to prepare your build VPS machine and the actual commands you use from scratch. There is no way of helping you properly if you don't do that.

* OnlyOffice guys are not using the public tools published here to build their binaries, they use another set of tools which, in theory, should work quite similar.

* You are advised somewhere in the build documentation  to use the master branch but you should stick to a tag so that you always get the same results.

* Unfortunately a lot of external dependencies of OnlyOffice are based not on tags (specific versions) but on master branches. **That's a big bug on their part.** That has caused problems in the past, as the time they had to add those Python 3.8 binaries into the source code (**That's another bug having binaries on the source code which I reported.**).

* So, even if you manage to build OnlyOffice one day without OnlyOffice repos being changed it might fail the next day because of some external dependency having changed a lot or being temporarily down.

* If you live in countries similar to Russia or China you might not have to access to some of those external dependencies because of geo-blocking issues.

* The same might happen if you don't have an stable internet connection. The build system does not allow to easily re-run just the latest step which failed because of an Internet timeout.

* You also have to know that when a build step has failed it's much better for you to start from scratch than try to resume the build. That failure might avoid you to build everything ok again.

* You need enough RAM. This is known to fail with only 4 GB RAM. It works for me with 16 GB RAM.

So when build time comes I make sure to:

* Use 16 GB RAM

* Use an stable Internet connection

* Start from scratch (no reuse of directories)

* Stick to a known working tag (the ones from the deb repo)

and hope for the best.

And if it does not build I try it again from scratch once more just in case it was a temporarily Internet connection issue.

P.S.: I will add an adaptation of this wall of text to my big how-to build VPS preparation section. :)

Sorry, you're right. I will provide everything I did here so it might help others. I used Ubuntu version 22.04 and Debian 12, and I’ve tried this on both an Intel CPU and an AMD CPU.

First, I encountered the exact same issue as you in the initial step. I’m using a machine with 64 cores and 64 GB of RAM for this compilation, so hardware isn't the problem. I also have a good fiber connection with no packet loss and a stable connection.

Here’s what I did:

cd /home/razerrazer
git clone \
  --depth=1 \
  --recursive \
  --branch v8.1.3.3 \
  https://github.com/ONLYOFFICE/build_tools.git \
  build_tools
# Ignore detached head warning
cd build_tools
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -e PRODUCT_VERSION=8.1.3 -e BUILD_NUMBER=3 -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v8.1.3.3'

But I got this error:

./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.

v8 (ERROR)

I followed some suggestions made by others in this thread, modified Dockerfiles, etc., but the same thing kept happening. So, I decided to try something else. I tried using @adriangibanelbtactic’s build_tools, which is almost 3 years old, and that one worked. This led me to think that the issue might be in the current code, which was my initial suspicion.

Then I discovered that OnlyOffice has a developer branch of build_tools, so I tried that one. The only change I had to make was adding this line to my Dockerfile:

RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs

because it still complained that the Node.js version couldn't be less than 16.

Here’s my Dockerfile if anyone wants to try it themselves:

FROM ubuntu:16.04

ENV TZ=Etc/UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get -y update && \
    apt-get -y install python \
                       python3 \
                       sudo \
                       curl \
                       ca-certificates


# Remove any existing Node.js installation
RUN apt-get purge -y nodejs* && apt-get autoremove -y

# Add NodeSource repository and install Node.js 16
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
    apt-get install -y nodejs

# Verify Node.js installation
RUN node -v && npm -v

RUN rm /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python
ADD . /build_tools
WORKDIR /build_tools

CMD cd tools/linux && \
    python3 ./automate.py

To be able to test the developer branch you need to do the following steps:

  1. Download the current build_tools from the developer branch.
    git clone https://github.com/ONLYOFFICE/build_tools.git -b develop

  2. run the installation from the current build_tools (check with git checkout).

cd build_tools
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -e PRODUCT_VERSION=8.1.3 -e BUILD_NUMBER=3 -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v8.1.3.3'

I can’t guarantee this will work, but I can see files located in the out directory:

ls -al out/
total 16
drwxr-xr-x 4 root root 4096 Sep 30 20:07 .
drwxr-xr-x 9 root root 4096 Oct  1 08:57 ..
drwxr-xr-x 3 root root 4096 Sep 30 19:49 js
drwxr-xr-x 3 root root 4096 Sep 30 20:07 linux_64

I will test this code later today, but I think it should work.

@adriangibanelbtactic
Copy link
Author

  • You (all) don't provide all of the steps you are using to prepare your build VPS machine and the actual commands you use from scratch. There is no way of helping you properly if you don't do that.
    Here’s what I did:
cd /home/razerrazer
git clone \
  --depth=1 \
  --recursive \
  --branch v8.1.1.3 \
  https://github.com/ONLYOFFICE/build_tools.git \
  build_tools
# Ignore detached head warning
cd build_tools
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -e PRODUCT_VERSION=8.1.1 -e BUILD_NUMBER=3 -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v8.0.1.31'

But I got this error:

./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.

v8 (ERROR)

No wonder you had an error.

--branch v8.1.1.3 \

docker run -e PRODUCT_VERSION=8.1.1 -e BUILD_NUMBER=3 -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v8.0.1.31'

You were mixing desired version (8.1.1.3) and tags being used (8.0.1.31).

@Nocodemon
Copy link

@razerrazer Thanks, I'll try your Dockerfile but trying with 8.1.3.3 since that is the latest. and hoping you just didn't find a buildable branch 8.1.1.3 by accident :)

@razerrazer
Copy link

  • You (all) don't provide all of the steps you are using to prepare your build VPS machine and the actual commands you use from scratch. There is no way of helping you properly if you don't do that.
    Here’s what I did:
cd /home/razerrazer
git clone \
  --depth=1 \
  --recursive \
  --branch v8.1.1.3 \
  https://github.com/ONLYOFFICE/build_tools.git \
  build_tools
# Ignore detached head warning
cd build_tools
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -e PRODUCT_VERSION=8.1.1 -e BUILD_NUMBER=3 -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v8.0.1.31'

But I got this error:

./cipd: line 143: ./depot_tools/cipd_client_version.digests: No such file or directory
Platform linux-amd64 is not supported by the CIPD client bootstrap: there's no pinned SHA256 hash for it in the *.digests file.

v8 (ERROR)

No wonder you had an error.

--branch v8.1.1.3
docker run -e PRODUCT_VERSION=8.1.1 -e BUILD_NUMBER=3 -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v8.0.1.31'

You were mixing desired version (8.1.1.3) and tags being used (8.0.1.31).

It was a typo. I just added what I remembered, so in this way I can ensure that I use the right version every time I compile.

@razerrazer
Copy link

razerrazer commented Oct 1, 2024

@razerrazer Thanks, I'll try your Dockerfile but trying with 8.1.3.3 since that is the latest. and hoping you just didn't find a buildable branch 8.1.1.3 by accident :)

It was a typo, i just copy what was in here and change the numbers, I can ensure that it is with the right version 8.1.3.3 :) i also edited my previous post.

@Nocodemon
Copy link

Nocodemon commented Oct 1, 2024

So close!

Project MESSAGE: core_static_link_libstd
g++ -c -pipe -Wno-register -O2 -std=gnu++11 -w -D_REENTRANT -fPIC -DKERNEL_USE_DYNAMIC_LIBRARY -DINTVER=8.1.3.3 -DWIN_INTVER=8,1,3,3 -DCOPYRIGHT_YEAR=2024 -DQT_VERSION_LESS_5_15 -DLINUX -D_LINUX -DQT_NO_DEBUG -I. -I../../icu/linux_64/build/include -I/build_tools/tools/linux/qt_build/Qt-5.9.9/gcc_64/mkspecs/linux-g++ -o core_build/linux_64/release/obj/main.o main.cpp
g++ -Wl,-rpath,'$ORIGIN' -Wl,-rpath,'$ORIGIN/system' -Wl,--disable-new-dtags -static-libstdc++ -static-libgcc -Wl,-O1 -o build/test core_build/linux_64/release/obj/main.o   /core/Common/3dParty/icu/linux_64/build/libicuuc.so.58 /core/Common/3dParty/icu/linux_64/build/libicudata.so.58 -L/core/Common/3dParty/hunspell/test/../../../../build/lib/linux_64 -lUnicodeConverter -lkernel -lhunspell -lz -lpthread 
python: can't open file '/web-apps/translation/merge_and_check.py': [Errno 2] No such file or directory
no_tests]core/Test/Applications/StandardTester/standardtester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/x2tTester/x2ttester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/MetafileTester/MetafileTester.pro', u'[win,linux,mac,!no_tests]core/Common/3dParty/hunspell/test/test.pro']
Error (python): 2
install dependencies...
Installed Node.js version: 16.20
OK
install qt...
---------------------------------------------
build branch: tags/v8.1.3.3
---------------------------------------------
---------------------------------------------
build modules: desktop builder server
---------------------------------------------
Error (./make.py): 1

@razerrazer what do you mean by run the installation from the current build_tools (check with git checkout). after you checked out the develop branch, you want med to do a git checkout develop just to make sure i'm on that branch?

@razerrazer
Copy link

So close!

Project MESSAGE: core_static_link_libstd
g++ -c -pipe -Wno-register -O2 -std=gnu++11 -w -D_REENTRANT -fPIC -DKERNEL_USE_DYNAMIC_LIBRARY -DINTVER=8.1.3.3 -DWIN_INTVER=8,1,3,3 -DCOPYRIGHT_YEAR=2024 -DQT_VERSION_LESS_5_15 -DLINUX -D_LINUX -DQT_NO_DEBUG -I. -I../../icu/linux_64/build/include -I/build_tools/tools/linux/qt_build/Qt-5.9.9/gcc_64/mkspecs/linux-g++ -o core_build/linux_64/release/obj/main.o main.cpp
g++ -Wl,-rpath,'$ORIGIN' -Wl,-rpath,'$ORIGIN/system' -Wl,--disable-new-dtags -static-libstdc++ -static-libgcc -Wl,-O1 -o build/test core_build/linux_64/release/obj/main.o   /core/Common/3dParty/icu/linux_64/build/libicuuc.so.58 /core/Common/3dParty/icu/linux_64/build/libicudata.so.58 -L/core/Common/3dParty/hunspell/test/../../../../build/lib/linux_64 -lUnicodeConverter -lkernel -lhunspell -lz -lpthread 
python: can't open file '/web-apps/translation/merge_and_check.py': [Errno 2] No such file or directory
no_tests]core/Test/Applications/StandardTester/standardtester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/x2tTester/x2ttester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/MetafileTester/MetafileTester.pro', u'[win,linux,mac,!no_tests]core/Common/3dParty/hunspell/test/test.pro']
Error (python): 2
install dependencies...
Installed Node.js version: 16.20
OK
install qt...
---------------------------------------------
build branch: tags/v8.1.3.3
---------------------------------------------
---------------------------------------------
build modules: desktop builder server
---------------------------------------------
Error (./make.py): 1

@razerrazer what do you mean by run the installation from the current build_tools (check with git checkout). after you checked out the develop branch, you want med to do a git checkout develop just to make sure i'm on that branch?

Yes, it's just to make sure you're on the correct branch. However, if you use the '-b' option, it will download the correct branch for you. This is just so you can double-check that you are on the right branch. It was not my intention to make things more complicated!

@adriangibanelbtactic
Copy link
Author

So close!

Project MESSAGE: core_static_link_libstd
g++ -c -pipe -Wno-register -O2 -std=gnu++11 -w -D_REENTRANT -fPIC -DKERNEL_USE_DYNAMIC_LIBRARY -DINTVER=8.1.3.3 -DWIN_INTVER=8,1,3,3 -DCOPYRIGHT_YEAR=2024 -DQT_VERSION_LESS_5_15 -DLINUX -D_LINUX -DQT_NO_DEBUG -I. -I../../icu/linux_64/build/include -I/build_tools/tools/linux/qt_build/Qt-5.9.9/gcc_64/mkspecs/linux-g++ -o core_build/linux_64/release/obj/main.o main.cpp
g++ -Wl,-rpath,'$ORIGIN' -Wl,-rpath,'$ORIGIN/system' -Wl,--disable-new-dtags -static-libstdc++ -static-libgcc -Wl,-O1 -o build/test core_build/linux_64/release/obj/main.o   /core/Common/3dParty/icu/linux_64/build/libicuuc.so.58 /core/Common/3dParty/icu/linux_64/build/libicudata.so.58 -L/core/Common/3dParty/hunspell/test/../../../../build/lib/linux_64 -lUnicodeConverter -lkernel -lhunspell -lz -lpthread 

python: can't open file '/web-apps/translation/merge_and_check.py': [Errno 2] No such file or directory

no_tests]core/Test/Applications/StandardTester/standardtester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/x2tTester/x2ttester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/MetafileTester/MetafileTester.pro', u'[win,linux,mac,!no_tests]core/Common/3dParty/hunspell/test/test.pro']
Error (python): 2
install dependencies...
Installed Node.js version: 16.20
OK
install qt...
---------------------------------------------
build branch: tags/v8.1.3.3
---------------------------------------------
---------------------------------------------
build modules: desktop builder server
---------------------------------------------
Error (./make.py): 1

@razerrazer what do you mean by run the installation from the current build_tools (check with git checkout). after you checked out the develop branch, you want med to do a git checkout develop just to make sure i'm on that branch?

Another example of mixing versions all around:

@razerrazer
Copy link

razerrazer commented Oct 1, 2024

So close!

Project MESSAGE: core_static_link_libstd
g++ -c -pipe -Wno-register -O2 -std=gnu++11 -w -D_REENTRANT -fPIC -DKERNEL_USE_DYNAMIC_LIBRARY -DINTVER=8.1.3.3 -DWIN_INTVER=8,1,3,3 -DCOPYRIGHT_YEAR=2024 -DQT_VERSION_LESS_5_15 -DLINUX -D_LINUX -DQT_NO_DEBUG -I. -I../../icu/linux_64/build/include -I/build_tools/tools/linux/qt_build/Qt-5.9.9/gcc_64/mkspecs/linux-g++ -o core_build/linux_64/release/obj/main.o main.cpp
g++ -Wl,-rpath,'$ORIGIN' -Wl,-rpath,'$ORIGIN/system' -Wl,--disable-new-dtags -static-libstdc++ -static-libgcc -Wl,-O1 -o build/test core_build/linux_64/release/obj/main.o   /core/Common/3dParty/icu/linux_64/build/libicuuc.so.58 /core/Common/3dParty/icu/linux_64/build/libicudata.so.58 -L/core/Common/3dParty/hunspell/test/../../../../build/lib/linux_64 -lUnicodeConverter -lkernel -lhunspell -lz -lpthread 

python: can't open file '/web-apps/translation/merge_and_check.py': [Errno 2] No such file or directory

no_tests]core/Test/Applications/StandardTester/standardtester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/x2tTester/x2ttester.pro', u'[win,linux,mac,!no_tests]core/Test/Applications/MetafileTester/MetafileTester.pro', u'[win,linux,mac,!no_tests]core/Common/3dParty/hunspell/test/test.pro']
Error (python): 2
install dependencies...
Installed Node.js version: 16.20
OK
install qt...
---------------------------------------------
build branch: tags/v8.1.3.3
---------------------------------------------
---------------------------------------------
build modules: desktop builder server
---------------------------------------------
Error (./make.py): 1

@razerrazer what do you mean by run the installation from the current build_tools (check with git checkout). after you checked out the develop branch, you want med to do a git checkout develop just to make sure i'm on that branch?

Another example of mixing versions all around:

* `web-apps/translation/merge_and_check.py` exists in the [develop branch of `web-apps` repo](https://github.com/ONLYOFFICE/web-apps/tree/develop/translation).

* `web-apps/translation/merge_and_check.py` does not exist in the [v8.1.3.3 tag of `web-apps` repo](https://github.com/ONLYOFFICE/web-apps/tree/v8.1.3.3/translation).

I'll be honest with you, since this build_tools doesn't work with Ubuntu 22.04 or Debian 12, this is a solution, even though a development build might not be the best choice here. However, it works.

OK
install qt...
---------------------------------------------
build branch: tags/v8.1.3.3
---------------------------------------------
---------------------------------------------
build modules: desktop builder server
---------------------------------------------

Please check my repository. I don't use any mix of development tools for web apps, servers, or anything like that—just for the build_tools, nothing else.

@adriangibanelbtactic
Copy link
Author

So close!
(...)
Another example of mixing versions all around:

* `web-apps/translation/merge_and_check.py` exists in the [develop branch of `web-apps` repo](https://github.com/ONLYOFFICE/web-apps/tree/develop/translation).

* `web-apps/translation/merge_and_check.py` does not exist in the [v8.1.3.3 tag of `web-apps` repo](https://github.com/ONLYOFFICE/web-apps/tree/v8.1.3.3/translation).

I'll be honest with you, since this build_tools doesn't work with Ubuntu 22.04 or Debian 12, this is a solution, even though a development build might not be the best choice here. However, it works.

Well, I'm a bit lost with what you wrote in #807 (comment) where you seemed to be using Ubuntu 16.04 from inside the docker container.

Now, it seems different than that.

Are you building it in ubuntu 22.04 o Debian 12 instead?
Inside or outside docker?

Please check my repository. I don't use any mix of development tools for web apps, servers, or anything like that—just for the build_tools, nothing else.

Apparently the only difference with my own changes to your v8.1.3.3-razerrazer tag is that I don't need to make any changes to the Dockerfile file. Unless you are building outside of the docker or with one of those setups where ipv6 is turned on I don't know why it's a problem for you.

@razerrazer
Copy link

So close!
(...)
Another example of mixing versions all around:

* `web-apps/translation/merge_and_check.py` exists in the [develop branch of `web-apps` repo](https://github.com/ONLYOFFICE/web-apps/tree/develop/translation).

* `web-apps/translation/merge_and_check.py` does not exist in the [v8.1.3.3 tag of `web-apps` repo](https://github.com/ONLYOFFICE/web-apps/tree/v8.1.3.3/translation).

I'll be honest with you, since this build_tools doesn't work with Ubuntu 22.04 or Debian 12, this is a solution, even though a development build might not be the best choice here. However, it works.

Well, I'm a bit lost with what you wrote in #807 (comment) where you seemed to be using Ubuntu 16.04 from inside the docker container.

Now, it seems different than that.

Are you building it in ubuntu 22.04 o Debian 12 instead? Inside or outside docker?

Please check my repository. I don't use any mix of development tools for web apps, servers, or anything like that—just for the build_tools, nothing else.

Apparently the only difference with my own changes to your v8.1.3.3-razerrazer tag is that I don't need to make any changes to the Dockerfile file. Unless you are building outside of the docker or with one of those setups where ipv6 is turned on I don't know why it's a problem for you.

When I say I'm using Ubuntu 22.04 or Debian 12, I just mean the base OS I use for the compilation. However, the Dockerfile is still based on Ubuntu 16.04. I hope this gives you more context.

For example, if I use the current main build_tools from OnlyOffice, the compiler doesn't work at all. But with the developer branch, it does.

@adriangibanelbtactic
Copy link
Author

When I say I'm using Ubuntu 22.04 or Debian 12, I just mean the base OS I use for the compilation. However, the Dockerfile is still based on Ubuntu 16.04. I hope this gives you more context.

Once you make sure to use Docker-CE and not some substitutes like podman from RHEL distros you are good to go. The base OS where docker is installed shouldn't matter in most of the cases.

For example, if I use the current main build_tools from OnlyOffice, the compiler doesn't work at all. But with the developer branch, it does.

I already pointed to this issue in my wall of text:

Here there's the thing:

  • You are advised somewhere in the build documentation to use the master branch but you should stick to a tag so that you always get the same results.

You were using the main branch because some of the documentation points you there.
If you plan to build v8.1.3.3 you should be using the build_tools's v8.1.3.3 tag instead.

Regarding using develop branch, well, that's not a good piece of advice because it's being used to develop v8.2.x which might be similar enough to v8.1.x but in the future it might break the build for v8.1.x.

@LabanPheidias
Copy link

@adriangibanelbtactic how is your how-to going. Are you saying that v8.1.3.3 is buildable in the master branch? Because I think noone has gotten past the v8 error with the original build_tools?

@adriangibanelbtactic
Copy link
Author

adriangibanelbtactic commented Oct 2, 2024

@adriangibanelbtactic how is your how-to going.

85% complete.
I have completed the part dealing with repos and I started to document the setup of the optional build machine.
Then Github Actions needs to be documented and then I need to make sure to use tokens so that you can download the document, find-and-replace whatever you need.

I am working on it a bit every day. It should be ready in two or three more days.

Are you saying that v8.1.3.3 is buildable in the master branch? Because I think noone has gotten past the v8 error with the original build_tools?

No, I'm not saying that. What I'm saying is:

If you plan to build v8.1.3.3 you should be using the build_tools's v8.1.3.3 tag instead.

Or in other words if you plan to build v8.1.3.3:

  • Do not checkout the build_tools master branch.
  • Do not checkout the build_tools develop branch.
  • Checkout the build_tools v8.1.3.3 tag.

@adriangibanelbtactic
Copy link
Author

Sorry I can't run docker right now in our environment.

Either install Ubuntu 16.04 in a VPS or use Github Actions (more details on my future how-to) where using docker is allowed.

Extra: I managed to build 8.0.1.31 version thanks to Ubuntu 20.04 (inside of the Docker) so it should also work in an actual Ubuntu 20.04 machine.

Any other OnlyOffice version with a different Ubuntu version with an actual installation (no docker) ? Who knows... That's not officially supported.

The only supported build is based on Ubuntu 16.04.

@LabanPheidias
Copy link

LabanPheidias commented Oct 2, 2024

@adriangibanelbtactic Nice :) I'm building in docker I just can't run the docker container version in production. I need the files so I can build my own rpm.

I managed to build the server now. I entered the container after it cloned the wrong repo of web-apps and cloned the delevop one instead.

But I also noted that the build is very different from the masterbranch and is half the size.

And it seems to not be functional, I get everything to run but it won't open my docs. ( still need to verify if something changed between 8.1.1 and 8.1.3 )

@razerrazer
Copy link

Sorry I can't run docker right now in our environment.

Either install Ubuntu 16.04 in a VPS or use Github Actions (more details on my future how-to) where using docker is allowed.

Extra: I managed to build 8.0.1.31 version thanks to Ubuntu 20.04 (inside of the Docker) so it should also work in an actual Ubuntu 20.04 machine.

Any other OnlyOffice version with a different Ubuntu version with an actual installation (no docker) ? Who knows... That's not officially supported.

The only supported build is based on Ubuntu 16.04.

Are you able to do this with the current master build of build_tools? I ask because it does not work at all for me, so i have to use the developer build to be able to do the compilations.

@adriangibanelbtactic
Copy link
Author

Sorry I can't run docker right now in our environment.

Either install Ubuntu 16.04 in a VPS or use Github Actions (more details on my future how-to) where using docker is allowed.
Extra: I managed to build 8.0.1.31 version thanks to Ubuntu 20.04 (inside of the Docker) so it should also work in an actual Ubuntu 20.04 machine.
Any other OnlyOffice version with a different Ubuntu version with an actual installation (no docker) ? Who knows... That's not officially supported.
The only supported build is based on Ubuntu 16.04.

Are you able to do this with the current master build of build_tools? I ask because it does not work at all for me, so i have to use the developer build to be able to do the compilations.

No, I haven't even tried it. Why would I do so in the first place?
Please check: #807 (comment)

@adriangibanelbtactic
Copy link
Author

I confirm that v8.1.3.3 version can be built thanks to the default Docker.

I am writing a how-to so that you can use it thanks to my usual patches in order to build your custom version of OnlyOffice.

Stay tuned!

Hopefully this how-to suits most of you and we can move the discussion out of here where actual issues should be reported thanks to new issues and not updating an old issue which was already marked as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs fixed-release Issues that fixed on next release, waiting to be released
Projects
None yet
Development

No branches or pull requests

9 participants