VSCodium / vscodium

binary releases of VS Code without MS branding/telemetry/licensing
https://vscodium.com
MIT License
25.05k stars 1.07k forks source link

PPC pipeline disabled #1822

Closed lex-ibm closed 5 months ago

lex-ibm commented 7 months ago

Looks like the build pipeline for the PPC target has been commented out.

A lot of our developers have been reporting issues since Feb 23 with trying to connect to remote systems and looks like they updated their local VSCodium to the latest version.

Is there a reason for this pipeline to be disabled? What work is necessary to get it back and running?

daiyam commented 7 months ago

Shout! I forgot to alert you...

The build process for Linux has changed in January (from VSCode) and require a sysroot image for the target system. Here the error: https://github.com/VSCodium/vscodium/actions/runs/7996050658/job/21838201113

You can find the script here: https://github.com/microsoft/vscode-linux-build-agent/tree/main/sysroot-scripts

Since we still supporting older Linux, we are still using older build agents: https://github.com/VSCodium/vscode-linux-build-agent

Also, It's kinda difficult for me to test since I don't have access to the platform.

lex-ibm commented 7 months ago

I'll get to it then!

lex-ibm commented 6 months ago

I just started to look at this issue this week and looks like this is going to be a bit more complicated than I thought. The problem I see currently is "where to store the sysroot for PPC?". I believe I can build a sysroot and even embed an electron binary for PPC64LE in there, but the build time for electron is significant even in PPC64LE hardware. @daiyam I could use some ideas before going the hard/difficult route 😅

daiyam commented 6 months ago

where to store the sysroot for PPC?

Maybe, in https://github.com/VSCodium/vscode-linux-build-agent, you could build the sysroot in a workflow and upload it as an artifact (actions/upload-artifact) or in a release

daiyam commented 5 months ago

@lex-ibm Were you able to advance on the issue? If not, can IBM provide an environment so I can build/test?

kxxt commented 5 months ago

I don't think we need to switch to the sysroot approach now. The old approach still works, at least for riscv64: https://github.com/VSCodium/vscodium/pull/1851

daiyam commented 5 months ago

I don't think we need to switch to the sysroot approach now. The old approach still works, at least for riscv64: #1851

I agree but since I can't test it, I can't confirm.

kxxt commented 5 months ago

I forgot to post this here. If it helps, after my PR(#1851), this is the latest ppc64 build error:

+ break
+ ./build/azure-pipelines/linux/setup-env.sh --only-remote
+ for i in {1..5}
+ yarn --frozen-lockfile --check-files
yarn install v1.22.22
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@microsoft/1ds-core-js > @microsoft/applicationinsights-core-js@2.8.15" has unmet peer dependency "tslib@*".
warning " > tsec@0.2.7" has unmet peer dependency "@bazel/bazelisk@>=1.7.5".
warning " > tsec@0.2.7" has unmet peer dependency "@bazel/concatjs@>=5.3.0".
[4/4] Building fresh packages...
error /home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@18.17.1 | linux | x64
gyp info find Python using Python version 3.11.9 found at "/opt/hostedtoolcache/Python/3.11.9/x64/bin/python3"
gyp http GET https://electronjs.org/headers/v28.2.8/node-v28.2.8-headers.tar.gz
gyp http 200 https://artifacts.electronjs.org/headers/v28.2.8/node-v28.2.8-headers.tar.gz?force_headers_dist=1
gyp http GET https://electronjs.org/headers/v28.2.8/SHASUMS256.txt
gyp http 200 https://artifacts.electronjs.org/headers/v28.2.8/SHASUMS256.txt?force_headers_dist=1
gyp info spawn /opt/hostedtoolcache/Python/3.11.9/x64/bin/python3
gyp info spawn args [
gyp info spawn args   '/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/runner/.cache/node-gyp/28.2.8/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/runner/.cache/node-gyp/28.2.8',
gyp info spawn args   '-Dnode_gyp_dir=/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/runner/.cache/node-gyp/28.2.8/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build'
  CXX(target) Release/obj.target/vscode-policy-watcher/src/main.o
g++: error: unrecognized command line option ‘-mminimal-toc’
make: *** [vscode-policy-watcher.target.mk:130: Release/obj.target/vscode-policy-watcher/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.15.0-1059-azure
gyp ERR! command "/opt/hostedtoolcache/node/18.17.1/x64/bin/node" "/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher
gyp ERR! node -v v18.17.1
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok 
make: Leaving directory '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build'
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
+ '[' 1 -eq 3 ']'
Yarn failed 1, trying again...
+ echo 'Yarn failed 1, trying again...'
+ for i in {1..5}
+ yarn --frozen-lockfile --check-files
yarn install v1.22.22
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@microsoft/1ds-core-js > @microsoft/applicationinsights-core-js@2.8.15" has unmet peer dependency "tslib@*".
warning " > tsec@0.2.7" has unmet peer dependency "@bazel/bazelisk@>=1.7.5".
warning " > tsec@0.2.7" has unmet peer dependency "@bazel/concatjs@>=5.3.0".
[4/4] Building fresh packages...
error /home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher: Command failed.
Exit code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Command: node-gyp rebuild
Arguments: 
Directory: /home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@18.17.1 | linux | x64
gyp info find Python using Python version 3.11.9 found at "/opt/hostedtoolcache/Python/3.11.9/x64/bin/python3"
gyp info spawn /opt/hostedtoolcache/Python/3.11.9/x64/bin/python3
gyp info spawn args [
gyp info spawn args   '/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/runner/.cache/node-gyp/28.2.8/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/runner/.cache/node-gyp/28.2.8',
gyp info spawn args   '-Dnode_gyp_dir=/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/runner/.cache/node-gyp/28.2.8/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build'
  CXX(target) Release/obj.target/vscode-policy-watcher/src/main.o
g++: error: unrecognized command line option ‘-mminimal-toc’
make: *** [vscode-policy-watcher.target.mk:130: Release/obj.target/vscode-policy-watcher/src/main.o] Error 1
make: Leaving directory '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build'
  CXX(target) Release/obj.target/vscode-policy-watcher/src/main.o
g++: error: unrecognized command line option ‘-mminimal-toc’
make: *** [vscode-policy-watcher.target.mk:130: Release/obj.target/vscode-policy-watcher/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.15.0-1059-azure
gyp ERR! command "/opt/hostedtoolcache/node/18.17.1/x64/bin/node" "/opt/hostedtoolcache/node/18.17.1/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher
gyp ERR! node -v v18.17.1
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok 
make: Leaving directory '/home/runner/work/vscodium/vscodium/vscode/node_modules/@vscode/policy-watcher/build'
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
+ '[' 3 -eq 3 ']'
+ echo 'Yarn failed too many times'
Yarn failed too many times
+ exit 1

It seems to be caused by an unsupported compiler flag so it should be relatively easy to fix if someone watching this issue want to fix it.

lex-ibm commented 5 months ago

Sorry guys! Have a lot on my plate right now. I got the sysroot to build tho. https://github.com/lex-ibm/vscode-linux-build-agent/releases/tag/v0.0.1

lex-ibm commented 5 months ago

I got it working until the docker container image gets involved. Will look at that later today. https://github.com/lex-ibm/vscodium/commit/41b0c0fa3ffb129a9d5cb2753748fd614f12916d

lex-ibm commented 5 months ago

Just a quick update. The patch for PPC64LE works well (locally at least). But there seems to be something weird going on on the runner image that gives that g++: error: unrecognized command line option ‘-mminimal-toc’ error. Cannot replicate locally.

daiyam commented 5 months ago

@lex-ibm Have you checked the version of g++?

lex-ibm commented 5 months ago

Found the issue! I've submitted a PR for https://github.com/VSCodium/vscode-linux-build-agent/pull/22 to build the PPC64LE sysroot and I'm working on the last few details for the PR https://github.com/VSCodium/vscodium/pull/1857.

daiyam commented 5 months ago

The binary has been released. Can you check if it's working correctly? Thx