stellite icon indicating copy to clipboard operation
stellite copied to clipboard

Update for the Chromium project

Open XiangQingW opened this issue 7 years ago • 6 comments

Hi, this is an amazing repo that runs over the Chromium project.

However, the git tag of the Chromium project uses "56.0.2894.0" released in 2016. Is there any plan to update the Chromium project?

I am looking forward to your reply.

XiangQingW avatar Jul 16 '18 13:07 XiangQingW

@XiangQingW

Hello. I trying upgrade chromium version on this project in my repository. If I completed in my repository, I will create PR in this project.

Thank you.

haru398801 avatar Jul 18 '18 02:07 haru398801

We're now evaluating QUIC protocol and servers over high speed (faster than 1Gbps) network and stellite is the only OSS implementation with Chromium core quic library. If you update the chromium library to the latest one, stellite can be the best server for now.

I'm really looking forwardt to see your work! @ptyjj

dynamis avatar Aug 03 '18 03:08 dynamis

@ptyjj we're trying to build with latest code in your ptyjj/stellite repo: https://github.com/ptyjj/stellite/

TL;DR: Last commit log say "just build success" but we could not build sucessfully so far. Could you tell me what environment you can build sucuessfully?

Details (how we're tring so far):

on ubuntu 16.04, run ./tools/build.py --target-platform=linux --target stellite_quic_server build as written in build.md and we've get this error:

build.py: error: argument --target: invalid choice: 'stellite_quic_server' (choose from 'stellite_quic_server_bin', 'stellite_http_client', 'client_binder', 'stellite_http_client_bin', 'simple_chunked_upload_client_bin')

stellite_quic_server target is not defined and we changed the target to stellite_quic_server_bin: ./tools/build.py --target-platform=linux --target stellite_quic_server_bin build

Then we get this error:

Traceback (most recent call last):
  File "./tools/build.py", line 2049, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./tools/build.py", line 2026, in main
    build.synchronize_chromium_tag()
  File "./tools/build.py", line 958, in synchronize_chromium_tag
    raise Exception('invalid chromium repository error')
Exception: invalid chromium repository error

So we changed build.py:

diff --git a/tools/build.py b/tools/build.py
index 3ee61b8..20fb25f 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -845,7 +845,7 @@ class BuildObject(object):
                PRINT_HEADER('- FETCH CHROMIUM')

                """ *************** """
-               return
+               #return

                self.execute(['git', 'config', '--global', 'core.precomposeUnicode', 'true'])

@@ -854,7 +854,7 @@ class BuildObject(object):
                        self.execute(['gclient', 'sync', '--nohooks'], cwd=self.chromium_path)
                else:
                        os.makedirs(self.chromium_path)
-                       self.execute(['fetch', 'chromium', '--nohooks'], cwd=self.chromium_path)
+                       self.execute(['fetch', '--nohooks', 'chromium'], cwd=self.chromium_path)

Then we got this error:

gclient.py: error: no such option: --nohooks--jobs
Traceback (most recent call last):
  File "./tools/build.py", line 2049, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./tools/build.py", line 2026, in main
    build.synchronize_chromium_tag()
  File "./tools/build.py", line 979, in synchronize_chromium_tag
    self.execute(command, cwd=cwd)
  File "./tools/build.py", line 824, in execute
    raise Exception('command execution are

We've checked option of gclient command and --nohooks option is not defined. So we removed to use the option (is this wrong? does we need different gclient? where can we get gclient with --nohooks option?) from build.py:

@@ -974,7 +974,8 @@ class BuildObject(object):
                        make_branch_command = ['git', 'checkout', '-f', '-b', branch, self.chromium_tag]
                        self.execute(make_branch_command, cwd=cwd)
 
-               command = [self.gclient_path, 'sync', '--with_branch_heads', '--nohooks'
+               #command = [self.gclient_path, 'sync', '--with_branch_heads', '--nohooks'
+               command = [self.gclient_path, 'sync', '--with_branch_heads',
                        '--jobs', str(multiprocessing.cpu_count() * 4)]
                self.execute(command, cwd=cwd)

Then we get new error:

Error: Command 'git checkout --quiet d8831bbac61cc49f957c702af6f9e66247708938' returned non-zero exit status 128 in /data/tsuchida/stellite/third_party/chromium_linux/src/third_party/webrtc
fatal: reference is not a tree: d8831bbac61cc49f957c702af6f9e66247708938

Traceback (most recent call last):
  File "./tools/build.py", line 2050, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./tools/build.py", line 2025, in main
    build.fetch_chromium()
  File "./tools/build.py", line 854, in fetch_chromium
    self.execute(['gclient', 'sync', '--nohooks'], cwd=self.chromium_path)
  File "./tools/build.py", line 824, in execute
    raise Exception('command execution are failed')
Exception: command execution are failed

Then our engineer cleaned (removed) third_party directory and build again. Then we get different error:

- SYNCHRONIZE BUILDSPACE
-- copy dependency directories
Traceback (most recent call last):
  File "./tools/build.py", line 2050, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./tools/build.py", line 2029, in main
    build.synchronize_buildspace()
  File "./tools/build.py", line 993, in synchronize_buildspace
    for target_dir in self.dependency_directories:
AttributeError: 'LinuxBuild' object has no attribute 'dependency_directories'

Original code's BuildObject base class have dependency_directories and it return CHROMIUM_DEPENDENCY_DIRECTORIES. So we've added dependency_directories to LinuxBuild sub class to do same thing.

Then we've got error:

gn.py: Could not find gn executable at: /data/tsuchida/stellite/build_linux/buildtools/linux64/gn

So we add third_party/chromium_linux/src/buildtools/ to CHROMIUM_DEPENDENCY_DIRECTORIES. then next error is:

ERROR at //testing/gtest/BUILD.gn:44:5: Can't load input file.
    "//third_party/googletest:gtest",
    ^-------------------------------
Unable to load:
  /data/tsuchida/stellite/build_linux/src/third_party/googletest/BUILD.gn
I also checked in the secondary tree for:
  /data/tsuchida/stellite/build_linux/src/build/secondary/third_party/googletest/BUILD.gn

build_linux/src/third_party dir don't have googletest. third_party/chromium_linux/src/third_party/ have googletest dir and we've updated CHROMIUM_DEPENDENCY_DIRECTORIES to include whole therd_party

-- generate ninja script ...
ERROR at //net/BUILD.gn:2294:7: Can't load input file.
      "//sql:sql",
      ^----------
Unable to load:

similar work will continue but we could not solve all the errors.

We guess something wrong/different with your build envronment. Do you have any idea about how to build?

dynamis avatar Aug 08 '18 05:08 dynamis

@ptyjj When we continu to solve errors about command path, name or parameters, we found the error about C++ header file linking like:

../stellite/server/quic_proxy_dispatcher.h:20:10: fatal error: 'net/quic/core/quic_protocol.h' file not found #include "net/quic/core/quic_protocol.h"

quic_protocol.h file has moved under core dir in 2016 and they started to support multiplatform. Many file and class structure has changed to support multplatform. https://chromium.googlesource.com/chromium/src/+/e1d19cbf88bf23ce09945335ba25b5a848f87299

Move the chromium specific QUIC end-to-end tests from net/quic/core to net/quic/chromium and make them cross-platform.

Have you already handled the change like this? If you have already successed to build stellite with new chromium lib as you wrote on your commit, I guess you may already fixed these but some of the changes haven't pushed to the github yet. It's really helpful if you answer/check this.

Thansk.

dynamis avatar Aug 09 '18 05:08 dynamis

Where specified the Chromium version?

CodeLife2012 avatar Aug 31 '18 07:08 CodeLife2012

@CodeLife2012 You can see chromium version from this file. https://github.com/line/stellite/blob/master/chromium.tag If you change this tag, stellite build tool try checkout specified tag version of chromium.

haru398801 avatar Aug 31 '18 07:08 haru398801