Giter Club home page Giter Club logo

chromium_power's People

Contributors

llebout avatar lysannef avatar shawnanastasio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chromium_power's Issues

clang error: Unknown command line argument '--enable-global-merge=false'.

any ideas? seems that this option was renamed in clang to mno-global-merge.

root@lpgaixmgmtlx01:/scratch/chromium_build/chromium/src>clang --help | grep merge
-fmerge-all-constants Allow merging of constants
-fno-merge-all-constants
-mglobal-merge Enable merging of globals
-mno-global-merge Disable merging of globals

root@lpgaixmgmtlx01:/scratch/chromium_build/chromium/src>ninja -C out/Default chrome
ninja: Entering directory `out/Default'
[1127/34585] CXX obj/third_party/angle/src/libANGLE/renderer/vulkan/angle_vulkan_backend/MemoryObjectVk.o
FAILED: obj/third_party/angle/src/libANGLE/renderer/vulkan/angle_vulkan_backend/MemoryObjectVk.o
../../../../llvm_build/bin/clang++ -MMD -MF obj/third_party/angle/src/libANGLE/renderer/vulkan/angle_vulkan_backend/MemoryObjectVk.o.d -DANGLE_VK_LAYERS_DIR=\"angledata\" -DANGLE_VK_MOCK_ICD_JSON=\"angledata/VkICD_mock_icd.json\" -DANGLE_VK_SWIFTSHADER_ICD_JSON=\"./vk_swiftshader_icd.json\" -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=375504 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DANGLE_IS_64_BIT_CPU -DANGLE_ENABLE_VULKAN -DANGLE_ENABLE_SWIFTSHADER -DANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS=1 -DLIBANGLE_IMPLEMENTATION -DANGLE_USE_X11 -DVK_USE_PLATFORM_XCB_KHR -DANGLE_ENABLE_OPENGL -DANGLE_ENABLE_OPENGL_NULL -DANGLE_ENABLE_NULL -DANGLE_ENABLE_VULKAN -DANGLE_ENABLE_SWIFTSHADER -DANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS=1 -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/common/third_party/base -Igen/angle -I../../third_party/angle/include -I../../third_party/angle/src/third_party/volk -I../../third_party/angle/third_party/vulkan-headers/src/include -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/SPIRV-Tools/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -no-canonical-prefixes -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-misleading-indentation -Wno-range-loop-analysis -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wconditional-uninitialized -Wextra-semi-stmt -Wfloat-conversion -Winconsistent-missing-destructor-override -Wmissing-field-initializers -Wnon-virtual-dtor -Wredundant-parens -Wshadow-field -Wtautological-type-limit-compare -Wundefined-reinterpret-cast -Wunneeded-internal-declaration -Wparentheses -Wrange-loop-analysis -Wstrict-prototypes -Wunreachable-code -Wshorten-64-to-32 -Xclang -mllvm -Xclang --enable-global-merge=false -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp -o obj/third_party/angle/src/libANGLE/renderer/vulkan/angle_vulkan_backend/MemoryObjectVk.o
clang (LLVM option parsing): Unknown command line argument '--enable-global-merge=false'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--enable-tail-merge=false'?
[1144/34585] CXX obj/third_party/angle/libGLESv2/entry_points_gles_ext_autogen.o
ninja: build stopped: subcommand failed.

Python UnicodeDecodeError while applying patches

Hi @shawnanastasio ,

I have been using @leo-lb electron fork for the build of electron.
I have encountered the following error while running the gclient sync , at the step where it tries to apply all the patches using the cpf.py script file.

Running hooks:   3% ( 3/81) patch_chromium
________ running 'bash -c cd src/electron/patches/common/chromium_power && python3 cpf.py ../../../../' in '/electron-gn'
[+] Applying "breakpad/0001-Implement-ppc64-support-on-linux.patch"... Success
[+] Applying "crashpad/0001-Implement-support-for-PPC64-on-Linux.patch"... Traceback (most recent call last):
  File "cpf.py", line 360, in <module>
    main()
  File "cpf.py", line 217, in main
    run_patcher()
  File "cpf.py", line 250, in run_patcher
    apply_patch(dest_dir, patch_path, dry=DRY)
  File "cpf.py", line 95, in apply_patch
    patch_data = f.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9031: ordinal not in range(128)
Error: Command 'bash -c cd src/electron/patches/common/chromium_power && python3 cpf.py ../../../../' returned non-zero exit status 1 in /electron-gn

Investigated a bit and found that an additional parameter (encoding=utf-8) added to the open functions in the file , i.e. following code :

 94     with open(patch_path, "r") as f:
 95         patch_data = f.read()
 96
 97     files = re.findall("^--- a/(.*)", patch_data, re.MULTILINE)
 98     files = [directory + "/" + x for x in files]
 99
100     for fil in files:
101         try:
102            with open(fil, "r") as f:

as such:

 94     with open(patch_path, "r", encoding="utf-8") as f:
 95         patch_data = f.read()
 96
 97     files = re.findall("^--- a/(.*)", patch_data, re.MULTILINE)
 98     files = [directory + "/" + x for x in files]
 99
100     for fil in files:
101         try:
102            with open(fil, "r", encoding="utf-8") as f

fixes the issue and all the patches get applied.

Kindly let me know if I am missing anything or if this could be added as a change in cpf.py

Cannot apply patch for 0001-Yarn-Add-implementation-for-ppc64-ELFv2.patch

Hello,

It looks like the patch for the SwiftShader cannot be applied because the directories within the chromium source directories do not exist. The rest of the patches apply fine to me.

As you can see in the lines below, I could not find any files that correspond to the files updated in the patch.

I knew to go to chromium/src/third_party/swiftshader because that is the file location that is in patches.json

jesse@compiler:~/chromium/build/chromium/src/third_party/swiftshader$ tree | grep YARN
jesse@compiler:~/chromium/build/chromium/src/third_party/swiftshader$ tree | grep Yarn
jesse@compiler:~/chromium/build/chromium/src/third_party/swiftshader$ tree | grep OSFiber
jesse@compiler:~/chromium/build/chromium/src/third_party/swiftshader$ tree | grep BUILD.gn

I will attempt to go through the rest of the porting instructions located here:
https://wiki.raptorcs.com/wiki/Porting/Chromium_(New)

and report back if the rest of the install works.

errors while applying patches...

  • sandbox/0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch: Conflict
  • third_party/0002-third_party-closure_compiler-Remove-useless-JVM-flag.patch: Conflict
  • database/0001-Properly-detect-little-endian-PPC64-systems.patch: No such file or directory

which results in this build error..

../../sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc:878:10: error: use of undeclared identifier '__NR_shmat'
    case __NR_shmat:
         ^
../../sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc:879:10: error: use of undeclared identifier '__NR_shmctl'
    case __NR_shmctl:
         ^
../../sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc:880:10: error: use of undeclared identifier '__NR_shmdt'
    case __NR_shmdt:
         ^
../../sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc:881:10: error: use of undeclared identifier '__NR_shmget'
    case __NR_shmget:
         ^
5 warnings and 4 errors generated.

no member named 'IsSystemVSharedMemory' in sandbox::SyscallSets

../../services/service_manager/sandbox/linux/bpf_gpu_policy_linux.cc:69:24: error: no member named 'IsSystemVSharedMemory' in 'sandbox::SyscallSets'
      if (SyscallSets::IsSystemVSharedMemory(sysno))
          ~~~~~~~~~~~~~^

It appears that there is an undefined function named IsSystemVSharedMemory(int).

using some basic searching tools, the above file is referencing the following files:

  services/service_manager/sandbox/linux/bpf_gpu_policy_linux.cc
  sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
  sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc

Since I don't know what the implications are of this function, I intend to try compiling it with and without adding additional logic for power systems on line 69 of bpf_gpu_policy_linux.cc.

I'll report here with what I find, but if you have any insight on that function, I would love to hear it.

fetch --nohooks --no-history chromium fails when downloading the source code

Hi @shawnanastasio , @leo-lb ,

The environment is ppc64le/UBI latest (RHEL based container environment).

Get chromium source code by following the below commands,
cd $HOME
mkdir chromium_build
export CHROMIUM_DIR=$HOME/chromium_build
cd $CHROMIUM_DIR

#GN
git clone https://gn.googlesource.com/gn
export CC=gcc
export CXX=g++
export AR=ar
cd gn/
python build/gen.py --no-static-libstdc++
ninja -C out
unset CXX
unset CC
unset AR

#Depot tools
cd $CHROMIUM_DIR
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export DEPOT_TOOLS_UPDATE=0
export PATH=${CHROMIUM_DIR}/gn/out:$PATH:${CHROMIUM_DIR}/depot_tools
export VPYTHON_BYPASS="manually managed python not supported by chrome operations"
export GYP_DEFINES="disable_nacl=1"

#Downloading the source code
cd $CHROMIUM_DIR
mkdir chromium && cd chromium
fetch --no-history --nohooks chromium

Facing below issues when execute the command "gclient sync --nohooks --no-history"

0:07:24]   src/third_party/angle/third_party/VK-GL-CTS/src
Syncing projects:  96% (124/128) src/third_party/angle/third_party/VK-GL-CTS/src
src/third_party/wayland/src (ERROR)
----------------------------------------
[0:00:05] Started.
[0:00:05]
________ running 'git init --bare /root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud' in '/root/chromium_build/chromium'
[0:00:06] Initialized empty Git repository in /root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud/
[0:00:06]
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland.git --template=/root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud /root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_' in '/root/chromium_build/chromium'
[0:00:06] Cloning into '/root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_'...
[0:00:06] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:00:06] fatal: the remote end hung up unexpectedly
[0:00:07]
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland.git --template=/root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud /root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_' in '/root/chromium_build/chromium' attempt 2 / 4
[0:00:07] Cloning into '/root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_'...
[0:00:07] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:00:07] fatal: the remote end hung up unexpectedly
[0:00:08]
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland.git --template=/root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud /root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_' in '/root/chromium_build/chromium' attempt 3 / 4
[0:00:08] Cloning into '/root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_'...
[0:00:09] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:00:09] fatal: the remote end hung up unexpectedly
[0:00:11]
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland.git --template=/root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud /root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_' in '/root/chromium_build/chromium' attempt 4 / 4
[0:00:11] Cloning into '/root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_'...
[0:00:11] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:00:11] fatal: the remote end hung up unexpectedly
Traceback (most recent call last):
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 1049, in _Clone
    print_stdout=print_stdout, filter_fn=filter_fn)
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 1388, in _Run
    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
  File "/root/chromium_build/depot_tools/gclient_utils.py", line 673, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), command_output.getvalue(), None)
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland.git --template=/root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud /root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_' returned non-zero exit status 128 in /root/chromium_build/chromium
[0:00:15] _____ Conflicting directory found in /root/chromium_build/chromium/src/third_party/wayland/src. Moving to /root/chromium_build/chromium/_bad_scm/src/third_party/wayland/srcwobif1g1.
----------------------------------------
Warnings:
Conflicting directory /root/chromium_build/chromium/src/third_party/wayland/src moved to /root/chromium_build/chromium/_bad_scm/src/third_party/wayland/srcwobif1g1.
Traceback (most recent call last):
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 548, in update
    self._Clone(revision, url, options)
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 1049, in _Clone
    print_stdout=print_stdout, filter_fn=filter_fn)
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 1388, in _Run
    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
  File "/root/chromium_build/depot_tools/gclient_utils.py", line 673, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), command_output.getvalue(), None)
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland.git --template=/root/chromium_build/chromium/src/third_party/wayland/_gclient_gittmp_srcvf0ei1ud /root/chromium_build/chromium/src/third_party/wayland/_gclient_src_vhzhe3z_' returned non-zero exit status 128 in /root/chromium_build/chromium

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/shutil.py", line 550, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/root/chromium_build/chromium/src/third_party/wayland/src' -> '/root/chromium_build/chromium/_bad_scm/src/third_party/wayland/srcwobif1g1/src'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/chromium_build/depot_tools/metrics.py", line 291, in print_notice_and_exit
    yield
  File "/root/chromium_build/depot_tools/gclient.py", line 3229, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/root/chromium_build/depot_tools/gclient.py", line 3215, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/root/chromium_build/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/root/chromium_build/depot_tools/gclient.py", line 2769, in CMDsync
    ret = client.RunOnDeps('update', args)
  File "/root/chromium_build/depot_tools/gclient.py", line 1809, in RunOnDeps
    patch_refs=patch_refs, target_branches=target_branches)
  File "/root/chromium_build/depot_tools/gclient_utils.py", line 967, in flush
    reraise(e[0], e[1], e[2])
  File "/root/chromium_build/depot_tools/gclient_utils.py", line 67, in reraise
    raise value
  File "/root/chromium_build/depot_tools/gclient_utils.py", line 1044, in run
    self.item.run(*self.args, **self.kwargs)
  File "/root/chromium_build/depot_tools/gclient.py", line 945, in run
    file_list)
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 132, in RunCommand
    return getattr(self, command)(options, args, file_list)
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 550, in update
    self._DeleteOrMove(options.force)
  File "/root/chromium_build/depot_tools/gclient_scm.py", line 207, in _DeleteOrMove
    shutil.move(self.checkout_path, dest_path)
  File "/usr/lib64/python3.6/shutil.py", line 564, in move
    copy_function(src, real_dst)
  File "/usr/lib64/python3.6/shutil.py", line 263, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib64/python3.6/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/root/chromium_build/chromium/src/third_party/wayland/src'

Tried the workaround mentioned in link https://bugs.chromium.org/p/chromium/issues/detail?id=1167108 (https://bugs.chromium.org/p/chromium/issues/detail?id=1226496). Unfortunately, the workaround doesn't work for me.

Any pointers help would be great, thanks in advance!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.