Comments (1)
In macOS 12.3, Apple removed /usr/bin/python. Perhaps because of this, or for other reasons, you might have created your own python
symlink pointing to a version of python 3. If you do this, the find_xcode_sysroot.py script, which is part of the skia build, does not work correctly. Here is an example of the script working correctly with python 2:
$ python2 skia/gn/find_xcode_sysroot.py macosx
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
Here is an example of the script working incorrectly with python 3:
$ python3 skia/gn/find_xcode_sysroot.py macosx
b'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk\n'
You can see the result of the wrong script output in the portion of the log you posted where it says:
-isysroot b\'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\\n\'
Since this isn't valid syntax for the -isysroot
flag, this causes the subsequent failure to find the files that are in the SDK:
../../third_party/externals/libwebp/src/utils/random_utils.c:14:10: fatal error: 'string.h' file not found
The workaround for the problem would be to ensure that your python
symlink points to a version of python 2, not python 3.
The fix would be to rewrite find_xcode_sysroot.py so that it returns the correct output under python 3. This was already done in this upstream commit: google@7bc4c9a
diff --git a/gn/find_xcode_sysroot.py b/gn/find_xcode_sysroot.py
index be5b687e0390..e514271bc391 100755
--- a/gn/find_xcode_sysroot.py
+++ b/gn/find_xcode_sysroot.py
@@ -12,4 +12,5 @@
(sdk,) = sys.argv[1:]
-print(subprocess.check_output(['xcrun', '--sdk', sdk, '--show-sdk-path']))
+print(subprocess.check_output([
+ 'xcrun', '--sdk', sdk, '--show-sdk-path']).decode('utf-8'))
Similar changes are made to other scripts in that commit.
Perhaps the aseprite fork of skia could be updated to include that commit.
from skia.
Related Issues (20)
- Multiple errors in build. HOT 1
- fatal: remote error: Git repository not found HOT 1
- for m1 MacBook build failed proble
- Usr/local/include not included in build includes
- TypeError: a bytes-like object is required, not 'str'
- Build failure: set_sources_assignment_filter no longer included in gn
- bin/fetch-gn returned non-zero exit status of 1 HOT 4
- Ninja build stage throwing an error because python is called HOT 3
- Failed to install emsdk when running git-sync-deps on RPi 4 HOT 4
- ninja: error: 'hb-aat-layout.cc' needed / missing HOT 4
- Updating the Skia windows compilation instructions in ReadMe
- ninja: FAILED: libexpat.a HOT 2
- The super long command gives me IndesxError: list index out of range HOT 1
- Unable to build on windows 11 HOT 1
- Issue when running cmake for skia / ninja (autofit)
- Skia build cannot sync dependencies according to documentation.
- Ninja error while Building aseprite on source Code
- python3 tools/git-sync-deps not working HOT 2
- python error while compiling
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skia.