Open Romantic-LiXuefeng opened 4 years ago
Enverment: macOS Mojave version 10.14.5
Can you still reproduce this? Did you try deleting the whole folder and re-downloading everything? Can you try with the latest master
? This appears to be a file permission error, so downloading things could fix things.
@TheModMaker I'm sorry for later response. As you said, I delete the whole folder and re-downloading everything.
LiXuefengs-Mac-mini:foo lixuefeng$ ../configure
Loading required submodules...
Downloading GN from cloud storage...
Generating files for boringssl...
INFO:bootstrap:Installing Go toolset.
INFO:bootstrap: Old toolset is None
INFO:bootstrap: New toolset is https://storage.googleapis.com/golang/go1.10.3.darwin-amd64.tar.gz
INFO:bootstrap:Removing /Users/lixuefeng/Documents/github/shaka-player-embedded/third_party/boringssl/src/util/bot/golang
INFO:bootstrap:Downloading https://storage.googleapis.com/golang/go1.10.3.darwin-amd64.tar.gz...
INFO:bootstrap:Extracting...
Traceback (most recent call last):
File "/Users/lixuefeng/Documents/github/shaka-player-embedded/third_party/boringssl/src/util/bot/go/env.py", line 34, in <module>
new = bootstrap.prepare_go_environ()
File "/Users/lixuefeng/Documents/github/shaka-player-embedded/third_party/boringssl/src/util/bot/go/bootstrap.py", line 266, in prepare_go_environ
bootstrap(logging.INFO)
File "/Users/lixuefeng/Documents/github/shaka-player-embedded/third_party/boringssl/src/util/bot/go/bootstrap.py", line 258, in bootstrap
ensure_toolset_installed(TOOLSET_ROOT)
File "/Users/lixuefeng/Documents/github/shaka-player-embedded/third_party/boringssl/src/util/bot/go/bootstrap.py", line 199, in ensure_toolset_installed
install_toolset(toolset_root, available)
File "/Users/lixuefeng/Documents/github/shaka-player-embedded/third_party/boringssl/src/util/bot/go/bootstrap.py", line 134, in install_toolset
with tarfile.open(pkg_path, 'r:gz') as f:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 1685, in open
return func(name, filemode, fileobj, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 1739, in gzopen
t = cls.taropen(name, mode, fileobj, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 1715, in taropen
return cls(name, mode, fileobj, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 1581, in __init__
self.firstmember = self.next()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2359, in next
raise ReadError("empty file")
tarfile.ReadError: empty file
There is a new error.
Is that from the first run, or did you run once and that is a second attempt? Are you filtering the logs at all? When I run, I see logs showing downloads for the submodules and progress on downloading the toolset. Could you also post the output of env
so I can see environment variables (you can remove session IDs, PATH, etc for privacy)?
It also appears that the file isn't present after downloading it, maybe you have a antivirus or some other program that is deleting it after downloading? I know that my work machine needed an exception to our security system to allow arbitrary, unsigned binaries to be run.
@TheModMaker Thanks for your help!
I manually download the [https://storage.googleapis.com/golang/go1.10.3.darwin-amd64.tar.gz](), and place to /shaka-player-embedded/third_party/boringssl/src/util/bot/golang
.
then modify the /shaka-player-embedded/third_party/boringssl/src/util/bot/bootstrap.py
,
Delete the shutil.rmtree(p, onerror=onerror if sys.platform == 'win32' else None)
and download_file(url, pkg_path)
def remove_directory(path):
"""Recursively removes a directory."""
assert isinstance(path, (list, tuple))
p = os.path.join(*path)
if not os.path.exists(p):
return
LOGGER.info('Removing %s', p)
# Crutch to remove read-only file (.git/* in particular) on Windows.
def onerror(func, path, _exc_info):
if not os.access(path, os.W_OK):
os.chmod(path, stat.S_IWUSR)
func(path)
else:
raise
# shutil.rmtree(p, onerror=onerror if sys.platform == 'win32' else None)
def install_toolset(toolset_root, url):
"""Downloads and installs Go toolset.
GOROOT would be <toolset_root>/go/.
"""
if not os.path.exists(toolset_root):
os.makedirs(toolset_root)
pkg_path = os.path.join(toolset_root, url[url.rfind('/')+1:])
LOGGER.info('Downloading %s...', url)
# download_file(url, pkg_path)
LOGGER.info('Extracting...')
if pkg_path.endswith('.zip'):
with zipfile.ZipFile(pkg_path, 'r') as f:
f.extractall(toolset_root)
elif pkg_path.endswith('.tar.gz'):
with tarfile.open(pkg_path, 'r:gz') as f:
f.extractall(toolset_root)
else:
raise Failure('Unrecognized archive format')
LOGGER.info('Validating...')
if not check_hello_world(toolset_root):
raise Failure('Something is not right, test program doesn\'t work')
then there is new error!
LiXuefengs-Mac-mini:foo lixuefeng$ ../configure --ios
Loading required submodules...
Downloading GN from cloud storage...
Generating files for boringssl...
Running configure for binutils...
Running configure for clang...
Running configure for sdl2...
Running configure for ffmpeg...
Running configure for gflags...
Running configure for glog...
Running configure for libxml...
Generating build files...
LiXuefengs-Mac-mini:foo lixuefeng$ ../build.py
[668/1182] ACTION //third_party/ffmpeg:ffmpeg_libs_framework_shared_library(//build/toolchain/mac:ios_clang_x64)
FAILED: obj/third_party/ffmpeg/ShakaPlayerEmbedded.FFmpeg ShakaPlayerEmbedded.FFmpeg.dSYM ShakaPlayerEmbedded.FFmpeg.dSYM/Contents/Info.plist ShakaPlayerEmbedded.FFmpeg.dSYM/Contents/Resources/DWARF/ShakaPlayerEmbedded.FFmpeg
python ../build/toolchain/mac/linker_driver.py xcrun lipo -create -output obj/third_party/ffmpeg/ShakaPlayerEmbedded.FFmpeg obj/third_party/ffmpeg/x64/ShakaPlayerEmbedded.FFmpeg -Wcrl,dsym,. -Wcrl,dsymutilpath,../tools/clang/dsymutil/bin/dsymutil
Traceback (most recent call last):
File "../build/toolchain/mac/linker_driver.py", line 287, in <module>
Main(sys.argv)
File "../build/toolchain/mac/linker_driver.py", line 103, in Main
linker_driver_outputs += linker_driver_actions[name](args)
File "../build/toolchain/mac/linker_driver.py", line 137, in <lambda>
lambda full_args: action(sub_arg[len(name):], full_args))
File "../build/toolchain/mac/linker_driver.py", line 163, in RunDsymUtil
subprocess.check_call(DSYMUTIL_INVOKE + ['-o', dsym_out, linker_out])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[675/1182] CXX clang_x64/obj/third_party/protobuf/protobuf_full/descriptor.o
ninja: build stopped: subcommand failed.
Did you install Xcode and the command-line utilities? Can you run xcrun
? You may need to run sudo xcode-select --install
.
Yes, I have installed the Xcode ahnd xcode-select. @TheModMaker
@TheModMaker Hope add some detail documents about compile for ios on Mac, I still can't compile at now, and don't know why. I find have released v1.0, I'm interested to this project, thanks for your work!
@TheModMaker Hope add some detail documents about compile for ios on Mac, I still can't compile at now, and don't know why. I find have released v1.0, I'm interested to this project, thanks for your work!
Me too, I have no way to compile for iOS on Mac
@minhtoantm is the error exactly the same? If not, please post some logs.
Both: what is the output of ls -lA tools/clang/dsymutil/bin
when in the source root?
@TheModMaker Thank for reply. It is log:
bash: cannot set terminal process group (24346): Inappropriate ioctl for device
bash: no job control in this shell
Using ./out/sample_xcode_project_ios_sim!
Traceback (most recent call last):
File "../../build.py", line 88, in
Both: what is the output of
ls -lA tools/clang/dsymutil/bin
when in the source root?
We require the use of Depot Tools. You'll also need to add the path to your PATH variable in your .bashrc
(or other shell init file). If you run this within Xcode, you'll need to include the path in your Xcode settings too.
Also, what is the output of the following: cipd ensure -ensure-file cipd.ensure -root .
and then see if the files exist: ls -lAR tools/clang/dsymutil
. If cipd
isn't available, you haven't setup PATH correctly.
Thank you. I will try.
cipd is avaiable, I done for "../configure" and "make" But in folder "sample_xcode_project ", when i run "sh build.sh", get error bellow:
You cannot run that build.sh
file by itself; it can be only run as part of the Xcode build step. It assumes certain Xcode shell variables were set. I'll make a change to return an error in this case. When run directly, just use configure
and make
.
You cannot run that
build.sh
file by itself; it can be only run as part of the Xcode build step. It assumes certain Xcode shell variables were set. I'll make a change to return an error in this case. When run directly, just useconfigure
andmake
.
I run with steps:
You don't run configure
when using the sample_xcode_project, it will run configure
itself. You run configure
and make
in an empty directory and copy the resulting framework to your project. The sample_xcode_project has a build.sh
file that does that part for you.
Bu when I build sample_xcode_project with Xcode, getting error:
Try clearing out the sample_xcode_project folder. The extra files you added may be confusing things. You can use git clean -xfd sample_xcode_project
.
I try but not success, I don't add any files. Please check again. Thank you
You implicitly added a bunch of files when you ran configure
in the wrong directory. You should try again with everything cleared out. You could delete the whole folder and clone the repo again, or you could use the following:
git reset --hard
git clean -xfd
Also, could you post the logs from the Xcode run? They are found in the tab with the speech bubble.
I remove completly project and re-clone again, Now I can run demo project. Thank you for your support and sorry about this inconvinient.