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

skia-safe fails to build due to permission boundaries #725

Closed
TimB87 opened this issue Jun 14, 2021 · 8 comments
Closed

skia-safe fails to build due to permission boundaries #725

TimB87 opened this issue Jun 14, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@TimB87
Copy link
Collaborator

TimB87 commented Jun 14, 2021

Hi!

On the latest commit in opengl branch, the build fails for me due to permission boundaries of the process. It seems to try and write to /usr directly, but can't. I get the following:

  cargo:rerun-if-env-changed=CC                                                                                                                                                                        [82/36816]  cargo:rerun-if-env-changed=CXX                                                                                                                                                                                   cargo:rerun-if-env-changed=SKIA_SOURCE_DIR                                                                                                                                                                       cargo:rerun-if-env-changed=FORCE_SKIA_BUILD                                                                                                                                                                      cargo:rerun-if-env-changed=FORCE_SKIA_BINARIES_DOWNLOAD                                                                                                                                                          TRYING TO DOWNLOAD AND INSTALL SKIA BINARIES: 0.39.1/750688025ba50471efe8-x86_64-unknown-linux-gnu-gl                                                                                                            cargo:rerun-if-env-changed=SKIA_BINARIES_URL                                                                                                                                                                       FROM: https://github.com/rust-skia/skia-binaries/releases/download/0.39.1/skia-binaries-750688025ba50471efe8-x86_64-unknown-linux-gnu-gl.tar.gz                                                                UNPACKING ARCHIVE INTO: /home/pkgmk/work/neovide/src/neovide-779861037743aacad5e5ab39a4dd22ef889dd1d0/target/release/build/skia-bindings-c82cbf8ed5f2521b/out/skia                                               INSTALLING BINDINGS                                                                                                                                                                                              DOWNLOAD AND INSTALL FAILED: Operation not permitted (os error 1)                                                                                                                                                STARTING A FULL BUILD                                                                                                                                                                                            cargo:rerun-if-env-changed=SKIA_USE_SYSTEM_LIBRARIES                                                                                                                                                             cargo:rerun-if-env-changed=SDKROOT                                                                                                                                                                               cargo:rerun-if-env-changed=SKIA_NINJA_COMMAND                                                                                                                                                                    cargo:rerun-if-env-changed=SKIA_GN_COMMAND                                                                                                                                                                       Probing 'python'                                                                                                                                                                                                 Python 2 found: "python"                                                                                                                                                                                         Synchronizing Skia dependencies                                                                                                                                                                                  Skipping "../src".                                
  skia/third_party/externals/freetype  @ dfa7cca5f3b4f494aae785891ab4a42e66db77ef
  skia/third_party/externals/d3d12a... @ 169895d529dfce00390a20e69c2f516066fe7a3b
  skia/third_party/externals/expat     @ e976867fb57a0cd87e3b0fe05d59e0ed63c6febb
  skia/third_party/externals/harfbuzz  @ 3a74ee528255cc027d84b204a87b5c25e47bff79
  skia/third_party/externals/libgif... @ fd59fa92a0c86788dcdd84d091e1ce81eda06a77
  skia/third_party/externals/libjpe... @ 64fc43d52351ed52143208ce6a656c03db56462b
  skia/third_party/externals/libwebp   @ fedac6cc69cda3e9e04b780d324cf03921fb3ff4
  skia/third_party/externals/piex      @ bb217acdca1cc0c16b704669dd6f91a1b509c406
  skia/third_party/externals/libpng    @ 386707c6d19b974ca2e3db7f5c61873813c6fe44
  skia/third_party/externals/icu       @ dbd3825b31041d782c5b504c59dcfb5ac7dda08c
  skia/third_party/externals/zlib      @ c876c8f87101c5a75f6014b0f832499afeb65b73
  skia/third_party/externals/spirv-... @ bdbef7b1f3982fe99a62d076043036abe6dd6d80

  --- stderr                                        
  Traceback (most recent call last):
    File "skia/bin/fetch-gn", line 41, in <module>
      stat.S_IROTH                | stat.S_IXOTH )
  OSError: [Errno 1] Operation not permitted: 'bin/gn'
  Traceback (most recent call last):
    File "skia/tools/git-sync-deps", line 266, in <module>
      exit(main(sys.argv[1:]))
    File "skia/tools/git-sync-deps", line 261, in main
      os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')])
    File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/bin/python', 'skia/bin/fetch-gn']' returned non-zero exit status 1
  thread 'main' panicked at '`skia/tools/git-sync-deps` failed', /home/pkgmk/distfiles/rust/registry/src/github.com-1ecc6299db9ec823/skia-bindings-0.39.1/build_support/skia.rs:630:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

The buildsystem is CRUX and provides clang as well as gn in /usr. I tried looking up with skia-safe upstream and tried export SKIA_GN_COMMAND=/usr/bin/gn which doesn't help.

@zoomlogo zoomlogo added the bug Something isn't working label Jun 14, 2021
@j4qfrost
Copy link
Collaborator

You might want to check upstream with skia-safe. Are all the dependencies installed? What system are you running?

@TimB87
Copy link
Collaborator Author

TimB87 commented Jun 21, 2021

Buildsystem is CRUX
I checked upstream and it only mentions about openssl, I am fairly certain the stuff for skia in general is around.

@j4qfrost
Copy link
Collaborator

Is gn only available to root users?

@TimB87
Copy link
Collaborator Author

TimB87 commented Jun 21, 2021

Nope, the build process just uses fakeroot and it can't write outside its namespace so to say.

@Kethku
Copy link
Member

Kethku commented Jun 21, 2021

Are you able to build the upstream examples in skia-safe? I don't think this is something we necessarily have the expertise to help you with

@TimB87
Copy link
Collaborator Author

TimB87 commented Jun 22, 2021

I will give that a try later and report back on it, maybe this is better suited over there

@TimB87
Copy link
Collaborator Author

TimB87 commented Jun 22, 2021

Finished release [optimized] target(s) in 11m 55s
That worked for me

@TimB87
Copy link
Collaborator Author

TimB87 commented Jun 22, 2021

Well, here is a quick fix though: tried building the latest master branch and its working better than ever, meaning all keys seem to get recognized properly, even umlauts and all the other fun stuff. I can finally use neovide 🥳 thanks for the work on it!

@TimB87 TimB87 closed this as completed Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants