Closed liangyongxiang closed 8 months ago
我一时看不出问题所在,可以试一下这个步骤: ./build.sh -f target_base/glib 再继续跑 ./build.sh
我一时看不出问题所在,可以试一下这个步骤: ./build.sh -f target_base/glib 再继续跑 ./build.sh
尝试了还是一样的问题。
抱歉,隔了一个多月才再回复,你的这个问题我尚未重现,但猜测可能是交叉编译的过程中错误的用了host内的东西导致错误,我这段时间把构建流程又进行了改进以便减少使用host东西的可能性。 你若方便可以尝试更新,并将workbase目录删除或者更换名字,并重新构建试试。
才看到有更新了。我今天尝试重新构建,在 cross-tools/Python3 的时候遇到了错误: https://gist.github.com/liangyongxiang/4eda2d0ff22302a870d81fde14010633
./Modules/_cursesmodule.c:763:9: error: implicit declaration of function ‘setcchar’; did you mean ‘getwchar’? [-Werror=implicit-function-declaration]
763 | setcchar(&wcval, wstr, attr, PAIR_NUMBER(attr), NULL);
| ^~~~~~~~
| getwchar
这个有可能是host系统里gcc版本太新导致的? 你可以在scritps/step/cross-tools/Python脚本里面加上 export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration" 再编译看看?
这个有可能是host系统里gcc版本太新导致的? 你可以在scritps/step/cross-tools/Python脚本里面加上 export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration" 再编译看看?
gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -O2 -Wno-error=implicit-function-declaration -O2 -Wno-error=implicit-function-declaration -fno-semantic-interposition -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I. -I./Include -fPIC -c ./Modules/_cursesmodule.c -o Modules/_cursesmodule.o
gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -O2 -Wno-error=implicit-function-declaration -O2 -Wno-error=implicit-function-declaration -fno-semantic-interposition -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I. -I./Include -fPIC -c ./Modules/_curses_panel.c -o Modules/_curses_panel.o
gcc -I./Modules/_sqlite -fno-strict-overflow -DNDEBUG -g -O3 -Wall -O2 -Wno-error=implicit-function-declaration -O2 -Wno-error=implicit-function-declaration -fno-semantic-interposition -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I. -I./Include -fPIC -c ./Modules/_sqlite/blob.c -o Modules/_sqlite/blob.o
gcc -I./Modules/_sqlite -fno-strict-overflow -DNDEBUG -g -O3 -Wall -O2 -Wno-error=implicit-function-declaration -O2 -Wno-error=implicit-function-declaration -fno-semantic-interposition -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I. -I./Include -fPIC -c ./Modules/_sqlite/connection.c -o Modules/_sqlite/connection.o
gcc -I./Modules/_sqlite -fno-strict-overflow -DNDEBUG -g -O3 -Wall -O2 -Wno-error=implicit-function-declaration -O2 -Wno-error=implicit-function-declaration -fno-semantic-interposition -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I. -I./Include -fPIC -c ./Modules/_sqlite/cursor.c -o Modules/_sqlite/cursor.o
gcc -I./Modules/_sqlite -fno-strict-overflow -DNDEBUG -g -O3 -Wall -O2 -Wno-error=implicit-function-declaration -O2 -Wno-error=implicit-function-declaration -fno-semantic-interposition -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I. -I./Include -fPIC -c ./Modules/_sqlite/microprotocols.c -o Modules/_sqlite/microprotocols.o
gcc -I./Modules/_sqlite -fno-strict-overflow -DNDEBUG -g -O3 -Wall -O2 -Wno-error=implicit-function-declaration -O2 -Wno-error=implicit-function-declaration -fno-semantic-interposition -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I. -I./Include -fPIC -c ./Modules/_sqlite/module.c -o Modules/_sqlite/module.o
./Modules/_cursesmodule.c: In function ‘_curses_window_addch_impl’:
./Modules/_cursesmodule.c:763:9: error: implicit declaration of function ‘setcchar’; did you mean ‘getwchar’? [-Werror=implicit-function-declaration]
763 | setcchar(&wcval, wstr, attr, PAIR_NUMBER(attr), NULL);
| ^~~~~~~~
| getwchar
./Modules/_cursesmodule.c:765:19: error: implicit declaration of function ‘mvwadd_wch’; did you mean ‘mvwaddch’? [-Werror=implicit-function-declaration]
765 | rtn = mvwadd_wch(self->win,y,x, &wcval);
| ^~~~~~~~~~
| mvwaddch
./Modules/_cursesmodule.c:767:19: error: implicit declaration of function ‘wadd_wch’; did you mean ‘waddch’? [-Werror=implicit-function-declaration]
767 | rtn = wadd_wch(self->win, &wcval);
| ^~~~~~~~
| waddch
./Modules/_cursesmodule.c: In function ‘_curses_window_addstr_impl’:
./Modules/_cursesmodule.c:847:19: error: implicit declaration of function ‘mvwaddwstr’; did you mean ‘mvwaddstr’? [-Werror=implicit-function-declaration]
847 | rtn = mvwaddwstr(self->win,y,x,wstr);
| ^~~~~~~~~~
| mvwaddstr
./Modules/_cursesmodule.c:849:19: error: implicit declaration of function ‘waddwstr’; did you mean ‘waddstr’? [-Werror=implicit-function-declaration]
849 | rtn = waddwstr(self->win,wstr);
| ^~~~~~~~
| waddstr
./Modules/_cursesmodule.c: In function ‘_curses_window_addnstr_impl’:
./Modules/_cursesmodule.c:930:19: error: implicit declaration of function ‘mvwaddnwstr’; did you mean ‘mvwaddnstr’? [-Werror=implicit-function-declaration]
930 | rtn = mvwaddnwstr(self->win,y,x,wstr,n);
| ^~~~~~~~~~~
| mvwaddnstr
./Modules/_cursesmodule.c:932:19: error: implicit declaration of function ‘waddnwstr’; did you mean ‘waddnstr’? [-Werror=implicit-function-declaration]
932 | rtn = waddnwstr(self->win,wstr,n);
| ^~~~~~~~~
| waddnstr
加上去了也还是一样的。
完整log :https://gist.github.com/liangyongxiang/33a7a1a1a767314fcfa5a2a2c1243f63
diff --git a/loongarch64/scripts/step/cross-tools/Python3 b/loongarch64/scripts/step/cross-tools/Python3
index 21b5de0..ec8fa59 100644
--- a/loongarch64/scripts/step/cross-tools/Python3
+++ b/loongarch64/scripts/step/cross-tools/Python3
@@ -6,6 +6,7 @@ export STEP_BUILDNAME=cross-tools
export STEP_PACKAGENAME=Python3
export PACKAGE_VERSION=3.12.0
export RESOURCEDIR=${NEW_TARGET_SYSDIR}/files/cross-tools/Python3/3.12.0/
+export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration"
rm -rf ${BUILD_DIRECTORY}/Python-3.12.0
tar xvf ${DOWNLOADDIR}/Python-3.12.0.tar.xz -C ${BUILD_DIRECTORY}
pushd ${BUILD_DIRECTORY}/Python-3.12.0
看错误是你的编译参数中同时还存在-Werror=implicit-function-declaration,并且该参数在后面,导致-Werror=implicit-function-declaration生效并报错停止。
diff --git a/loongarch64/scripts/step/cross-tools/Python3 b/loongarch64/scripts/step/cross-tools/Python3
index 21b5de0..1197a63 100644
--- a/loongarch64/scripts/step/cross-tools/Python3
+++ b/loongarch64/scripts/step/cross-tools/Python3
@@ -6,6 +6,8 @@ export STEP_BUILDNAME=cross-tools
export STEP_PACKAGENAME=Python3
export PACKAGE_VERSION=3.12.0
export RESOURCEDIR=${NEW_TARGET_SYSDIR}/files/cross-tools/Python3/3.12.0/
+export CFLAGS="-Wno-error=implicit-function-declaration"
+export CFLAGS_NODIST=${CFLAGS}
rm -rf ${BUILD_DIRECTORY}/Python-3.12.0
tar xvf ${DOWNLOADDIR}/Python-3.12.0.tar.xz -C ${BUILD_DIRECTORY}
pushd ${BUILD_DIRECTORY}/Python-3.12.0
加上了这个 Python 的问题解决了
https://gist.github.com/liangyongxiang/6a275f64ba811329057fc47d5b7ec4c1