chore: upgrade system version of build container#2
chore: upgrade system version of build container#2CodeChenL wants to merge 10 commits intoradxa-pkg:masterfrom
Conversation
Signed-off-by: Chen Jiali <chenjiali@radxa.com>
|
@RadxaYuntian request a review |
.github/container/Dockerfile
Outdated
| build-essential crossbuild-essential-arm64 default-jdk-headless git \ | ||
| cmake debhelper devscripts lintian swig pkgconf:arm64 python3-dev:arm64 libjson-c-dev:arm64 && \ | ||
| cmake debhelper devscripts lintian swig pkgconf:arm64 python3-dev:arm64 libjson-c-dev:arm64 libstdc++6:arm64 && \ | ||
| ln -s /usr/bin/python3 /usr/bin/python && \ |
There was a problem hiding this comment.
为什么不直接用python-is-python3
There was a problem hiding this comment.
所以为什么不直接用python-is-python3?依赖冲突是怎么回事
There was a problem hiding this comment.
[0 ~/Documents/GitHub/mraa]$ .github/container/build-deb
STEP 1/2: FROM debian:bookworm
STEP 2/2: RUN dpkg --add-architecture arm64 && apt-get update && apt-get full-upgrade --no-install-recommends -y build-essential crossbuild-essential-arm64 default-jdk-headless git cmake debhelper devscripts lintian swig pkgconf:arm64 python-is-python3 python3-dev:arm64 libjson-c-dev:arm64 libstdc++6:arm64 && ln -s /usr/bin/python3 /usr/bin/python && adduser --gecos runner --disabled-password runner && rm -rf /var/lib/apt/lists/*
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8787 kB]
Get:5 http://deb.debian.org/debian bookworm/main arm64 Packages [8689 kB]
Get:6 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB]
Get:7 http://deb.debian.org/debian bookworm-updates/main arm64 Packages [13.7 kB]
Get:8 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [176 kB]
Get:9 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [179 kB]
Fetched 18.1 MB in 3s (6206 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-dev:arm64 : Depends: python3:arm64 (= 3.11.2-1+b1) but it is not installable
python3.11-dev:arm64 : Depends: python3.11:arm64 (= 3.11.2-6+deb12u3) but it is not installable
E: Unable to correct problems, you have held broken packages.
Error: building at STEP "RUN dpkg --add-architecture arm64 && apt-get update && apt-get full-upgrade --no-install-recommends -y build-essential crossbuild-essential-arm64 default-jdk-headless git cmake debhelper devscripts lintian swig pkgconf:arm64 python-is-python3 python3-dev:arm64 libjson-c-dev:arm64 libstdc++6:arm64 && ln -s /usr/bin/python3 /usr/bin/python && adduser --gecos runner --disabled-password runner && rm -rf /var/lib/apt/lists/*": while running runtime: exit status 100
[chen@ChenArchLinux 18:39]
[100 ~/Documents/GitHub/mraa]$
Makefile
Outdated
|
|
||
| .PHONY: deb | ||
| deb: debian | ||
| deb: debian SOURCE |
There was a problem hiding this comment.
需要先make all在能make deb,这正常吗,正常的话就不改了
There was a problem hiding this comment.
这个算是正常的,只是我们平常的包的Makefile是在根目录下,debuild会自动make all。现在mraa自己有一个,就不会自动调用我们的make all了
.github/container/Dockerfile
Outdated
| build-essential crossbuild-essential-arm64 default-jdk-headless git \ | ||
| cmake debhelper devscripts lintian swig pkgconf:arm64 python3-dev:arm64 libjson-c-dev:arm64 && \ | ||
| cmake debhelper devscripts lintian swig pkgconf:arm64 python3-dev:arm64 libjson-c-dev:arm64 libstdc++6:arm64 && \ | ||
| ln -s /usr/bin/python3 /usr/bin/python && \ |
Co-authored-by: ZHANG Yuntian <yt@radxa.com>
.github/container/Dockerfile
Outdated
| apt-get full-upgrade --no-install-recommends -y \ | ||
| build-essential crossbuild-essential-arm64 default-jdk-headless git \ | ||
| cmake debhelper devscripts lintian swig pkgconf:arm64 python3-dev:arm64 libjson-c-dev:arm64 && \ | ||
| cmake debhelper devscripts lintian swig pkgconf:arm64 python-is-python3 \ |
There was a problem hiding this comment.
其实为什么要安装python-is-python3,我们之前没有安装也生成了py3包吧?
There was a problem hiding this comment.
有一个测试脚本的shebang指定的/usr/bin/python,不安装python-is-python3报错command not found
There was a problem hiding this comment.
给mraa提pr把这些python都显式改成python3吧。这个他们之前有改过一部分
There was a problem hiding this comment.
另外我们debian 11的container难道内置了python2?
There was a problem hiding this comment.
看了一下bullseye在config阶段检查不到python2,
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.9.2", minimum required is "3")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.9.so (found suitable exact version "3.9.2")
bookworm在config阶段把python3误检测为python2
所以bullseye不会运行这个test脚本,bookworm会
Line 1 in b1597cf
There was a problem hiding this comment.
你在这个pr里面改一下看看。如果没问题可以先分一个PR给上游
|
@RadxaYuntian request a review |
|
已在rock5b bookworm测试同样将python3检测为python2并test报错 |
| @@ -138,6 +142,9 @@ endfunction(find_python) | |||
| set(MIN_VER_PYTHON2 2.7) | |||
| set(MIN_VER_PYTHON3 3.2) | |||
There was a problem hiding this comment.
我感觉是不是strcmp(“3.11”, "3.2") < 0导致的?上面的修改只是检查检测到的版本是否正确,却没有修正导致检测版本不正确的代码
There was a problem hiding this comment.
和3.2关系不大吧,主要是find_package(PythonInterp "2.7") 会找到python3,更像是cmake的find_package的bug
There was a problem hiding this comment.
我尝试过几个FIND_VERSION_MAJOR变量都没有效果https://cmake.org/cmake/help/latest/command/find_package.html
There was a problem hiding this comment.
还试过min...max指定版本范围,但是提示PythonInterp这个包不支持指定范围
There was a problem hiding this comment.
加个cmake版本判断,>=3.12用FindPython2/FindPython3。很快find_package(PythonInterp)就不能用了:https://cmake.org/cmake/help/latest/module/FindPythonInterp.html
There was a problem hiding this comment.
感觉是不是直接从opencv更新这个文件比较好,他们有做主版本号判断https://github.com/opencv/opencv/blob/976fb3e8d682cc37caa72fcb32885c97e0a10d24/cmake/OpenCVDetectPython.cmake#L102 ,本来就是copy的opencv的脚本,后续mraa也好跟进opencv的修改,比较有连续性
There was a problem hiding this comment.
opencv的文件和mraa的差别比较大,并且还有他自己的改动(比如优先使用py3)。先要分析mraa到底是怎么在使用这个文件才能下判断
Co-authored-by: ZHANG Yuntian <yt@radxa.com>
Co-authored-by: ZHANG Yuntian <yt@radxa.com>
|
已提交上游eclipse-mraa#1133 |
Uh oh!
There was an error while loading. Please reload this page.