Firefly开源社区

标题: Android12 SDK编译报错 [打印本页]

作者: Sincere-George    时间: 2022-8-8 16:47
标题: Android12 SDK编译报错
从贵司官网上下载的SDK,编译报错,麻烦帮忙看下,谢谢
packages/apps/Camera2/Android.mk: warning: "Camera2 (app:platform) should not link against libjni_jpegutil (native:ndk:libc++:static)"
[  0% 376/39242] //external/libchrome:libmojo_jni_registration_headers generate libmojo_jni_registr
FAILED: out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen/jni/libmojo_jni_registrations.h
rm -rf out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen && out/soong/host/linux-x86/bin/sbox --sandbox-path out/soong/.temp --manifest out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/genrule.sbox.textproto
The failing command was run inside an sbox sandbox in temporary directory
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37
The failing command line was:
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/src/external/libchrome/libchrome_tools/jni_registration_generator_helper.sh    --jni_generator=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/out/bin/jni_registration_generator    --output=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/out/jni/libmojo_jni_registrations.h    external/libchrome/base/android/java/src/org/chromium/base/BuildInfo.java external/libchrome/base/android/java/src/org/chromium/base/JavaExceptionReporter.java external/libchrome/base/android/java/src/org/chromium/base/ThreadUtils.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/BaseRunLoop.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/CoreImpl.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/WatcherImpl.java
Traceback (most recent call last):
  File "/disk1/rk/firefly/out/soong/.temp/Soong.python_T11Qzd/base/android/jni_generator/jni_registration_generator.py", line 340, in <module>
    sys.exit(main(sys.argv))
  File "/disk1/rk/firefly/out/soong/.temp/Soong.python_T11Qzd/base/android/jni_generator/jni_registration_generator.py", line 332, in main
    GenerateJNIHeader(java_file_paths, output_file, args)


作者: jpchen    时间: 2022-8-9 10:01
The failing command was run inside an sbox sandbox in temporary directory

不在在共享文件夹里面编译sdk,请详细看编译的wiki和环境
作者: Sincere-George    时间: 2022-8-10 19:36
已经详细看编译的wiki和环境,另外,我试着编译android11是没有问题的,就是编译android12有这个external/libchrome编译报错。
作者: jpchen    时间: 2022-8-11 09:57
Sincere-George 发表于 2022-8-10 19:36
已经详细看编译的wiki和环境,另外,我试着编译android11是没有问题的,就是编译android12有这个external/l ...

注意:不要在共享文件夹、挂载文件夹以及非英文目录解压SDK,避免产生不必要的错误
作者: Sincere-George    时间: 2022-8-11 10:05
服务器是mount的硬盘,SDK在硬盘内,这样不可以吗?
这里说的共享文件夹是指什么呢?
目录名全是英文,
作者: jpchen    时间: 2022-8-11 10:24
Sincere-George 发表于 2022-8-11 10:05
服务器是mount的硬盘,SDK在硬盘内,这样不可以吗?
这里说的共享文件夹是指什么呢?
目录名全是英文,

这样经常会出现问题,要么不要挂载直接在服务器上编译
作者: Sincere-George    时间: 2022-8-11 10:32
我现在服务器的空间有限,只能在加机械硬盘了,不用mount的方式挂载,那还有什么别的方法吗
作者: jpchen    时间: 2022-8-11 10:40
Sincere-George 发表于 2022-8-11 10:32
我现在服务器的空间有限,只能在加机械硬盘了,不用mount的方式挂载,那还有什么别的方法吗

这个路径就有点异常,还是先把sdk 放在普通目录下而不挂载的目录下
/disk1/rk/firefly/out/soong/.temp/Soong.python_T11Qzd/base/android/jni_generator/jni_registration_generator.py", line 340, in <module>
    sys.exit(main(sys.argv))
作者: Sincere-George    时间: 2022-8-11 13:40
我现在放到普通目录后,也是一样的报错:
[ 68% 89406/130606] //external/libchrome:libmojo_jni_registration_headers generate libmojo_jni_regi
FAILED: out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen/jni/libmojo_jni_registrations.h
rm -rf out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen && out/soong/host/linux-x86/bin/sbox --sandbox-path out/soong/.temp --manifest out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/genrule.sbox.textproto
The failing command was run inside an sbox sandbox in temporary directory
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37
The failing command line was:
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/src/external/libchrome/libchrome_tools/jni_registration_generator_helper.sh    --jni_generator=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/out/bin/jni_registration_generator    --output=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/out/jni/libmojo_jni_registrations.h    external/libchrome/base/android/java/src/org/chromium/base/BuildInfo.java external/libchrome/base/android/java/src/org/chromium/base/JavaExceptionReporter.java external/libchrome/base/android/java/src/org/chromium/base/ThreadUtils.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/BaseRunLoop.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/CoreImpl.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/WatcherImpl.java
Traceback (most recent call last):
  File "/home/george/firefly/out/soong/.temp/Soong.python_2d4MgK/base/android/jni_generator/jni_registration_generator.py", line 340, in <module>
    sys.exit(main(sys.argv))
  File "/home/george/firefly/out/soong/.temp/Soong.python_2d4MgK/base/android/jni_generator/jni_registration_generator.py", line 332, in main
    GenerateJNIHeader(java_file_paths, output_file, args)

作者: jpchen    时间: 2022-8-11 15:46
Sincere-George 发表于 2022-8-11 13:40
我现在放到普通目录后,也是一样的报错:
[ 68% 89406/130606] //external/libchrome:libmojo_jni_registr ...

编译的机器内存多少,是否有16GB
作者: Sincere-George    时间: 2022-8-11 17:26
运行内存128G
作者: jpchen    时间: 2022-8-11 17:51
Sincere-George 发表于 2022-8-11 17:26
运行内存128G

ubuntu 是哪个版本的,python 版本是多少
作者: Sincere-George    时间: 2022-8-12 09:15
本帖最后由 Sincere-George 于 2022-8-12 09:40 编辑

Ubuntu16.04

python:
george@ubuntu-server:~/firefly$ python --version
Python 2.7.12
george@ubuntu-server:~/firefly$ python2 --version
Python 2.7.12
george@ubuntu-server:~/firefly$ python3 --version
Python 3.5.2
george@ubuntu-server:~/firefly$




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1