Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22.03] toolchain: gcc/initial fails applying 001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch #10701

Open
emandtf opened this issue Sep 13, 2022 · 3 comments
Labels
bug issue report with a confirmed bug build/scripts/tools pull request/issues for build, scripts and tools related changes release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release target/mvebu pull request/issue for mvebu target toolchain pull request/issue with toolchain related changes

Comments

@emandtf
Copy link

emandtf commented Sep 13, 2022

Few months ago I successfully compiled against 21.02 version but there are weeks that I try to build 22.03 without success.

I'm following build guide at: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem
When I exec the command "make -j1 V=s kernel_menuconfig" I got this error:

make[1]: Entering directory '/home/emandt/src/openwrt/scripts/config'
make[1]: 'conf' is up to date
make[1]: Leaving directory '/home/emandt/src/openwrt/scripts/config'
make[2]: Entering directory '/home/emandt/src/openwrt/scripts/config'
make[2]: 'conf' is up to date
make[2]: Leaving directory '/home/emandt/src/openwrt/scripts/config'
make[1]: Entering directory '/home/emandt/src/openwrt'
mkdir -p /home/emandt/src/openwrt/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi
cd /home/emandt/src/openwrt/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi
mkdir -p bin lib stamp usr/include usr/lib
mkdir -p /home/emandt/src/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/stamp
touch /home/emandt/src/openwrt/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/.prepared
make[2]: Entering directory '/home/emandt/src/openwrt/toolchain/binutils'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/home/emandt/src/openwrt/toolchain/binutils'
time: toolchain/binutils/compile#0.00#0.00#0.01
make[2]: Entering directory '/home/emandt/src/openwrt/toolchain/gdb'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/home/emandt/src/openwrt/toolchain/gdb'
time: toolchain/gdb/compile#0.00#0.00#0.01
make[2]: Entering directory '/home/emandt/src/openwrt/toolchain/fortify-headers'
make[2]: Entering directory '/home/emandt/src/openwrt/toolchain/gcc/initial'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/home/emandt/src/openwrt/toolchain/fortify-headers'
time: toolchain/fortify-headers/compile#0.00#0.01#0.02
/home/emandt/src/openwrt/staging_dir/host/bin/sed -i -e 's,TARGET_CROSS=.,TARGET_CROSS=arm-openwrt-linux-muslgnueabi-,' /home/emandt/src/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/info.mk
/home/emandt/src/openwrt/staging_dir/host/bin/sed -i -e 's,GCC_VERSION=.
,GCC_VERSION=11.2.0,' /home/emandt/src/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/info.mk
. /home/emandt/src/openwrt/include/shell.sh; xzcat /home/emandt/src/openwrt/dl/gcc-11.2.0.tar.xz | tar -C /home/emandt/src/openwrt/build_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/gcc-11.2.0-initial/.. -xf - --exclude-from='/home/emandt/src/openwrt/toolchain/gcc/initial/../exclude-testsuite' --exclude=gcc/ada/.ad --exclude=libjava
[ ! -d ./src/ ] || cp -fpR ./src/* /home/emandt/src/openwrt/build_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/gcc-11.2.0-initial
Applying ../patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch using plaintext:
patching file gcc/gimple-range.cc
The next patch would create the file gcc/testsuite/gcc.c-torture/execute/pr103255.c,
which already exists! Applying it anyway.
patching file gcc/testsuite/gcc.c-torture/execute/pr103255.c
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file gcc/testsuite/gcc.c-torture/execute/pr103255.c.rej
Patch failed! Please fix ../patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch!
make[2]: *** [Makefile:44: /home/emandt/src/openwrt/build_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/gcc-11.2.0-initial/.prepared] Error 1
make[2]: Leaving directory '/home/emandt/src/openwrt/toolchain/gcc/initial'
time: toolchain/gcc/initial/compile#7.52#3.11#7.74
ERROR: toolchain/gcc/initial failed to build.
make[1]: *** [toolchain/Makefile:97: toolchain/gcc/initial/compile] Error 1
make[1]: Leaving directory '/home/emandt/src/openwrt'
make: *** [/home/emandt/src/openwrt/include/toplevel.mk:230: toolchain/install] Error 2

If I remove that "001-v11.3.0..." PATCH file I get an error on another one, then again...and again...and again. After 3 patch files removal I surrendered.

@emandtf
Copy link
Author

emandtf commented Oct 8, 2022

Changing GCC version (from 11.2 to 12.1) doesn't change anything......I don't understand how all of you can build it. I just pulled from git source and executed the build command without change anything....

@damnms
Copy link

damnms commented Oct 14, 2022

same error here on fedora 37 with 22.03.1.
iirc i was able to build 22.03 but not 22.03.1
some use a VM to build it and use e.g. debian stable - thats what i also did a few times. quiet annoying, but at least some kind of workaround.

did u try:
make targetclean?
seems like it is really a problem when the old generated files are not cleaned properly. make targetclean worked for me, now it compiles, but i only tested it with 1 thread. encountered another bug which forced me to run make again, but then it created the image.

@ynezz ynezz added release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release build/scripts/tools pull request/issues for build, scripts and tools related changes toolchain pull request/issue with toolchain related changes bug issue report with a confirmed bug target/mvebu pull request/issue for mvebu target labels Oct 25, 2022
@karlp
Copy link
Contributor

karlp commented Oct 25, 2022

I had this as well, updating from 22.03 "ealier" to 22.03.2 f3ffb04..00d7702 to be precise. A make dirclean fixed it. (I was building for ath79, not mvebu)

@ynezz ynezz changed the title [22.03] Unable to build for MVEbu (Linksys WM3200ACM): hunk #1 FAILED [22.03] toolchain: gcc/initial fails applying 001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report with a confirmed bug build/scripts/tools pull request/issues for build, scripts and tools related changes release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release target/mvebu pull request/issue for mvebu target toolchain pull request/issue with toolchain related changes
Projects
None yet
Development

No branches or pull requests

4 participants