-
Notifications
You must be signed in to change notification settings - Fork 858
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
making linux 4.9 with some config file, failed, but when invoke gcc it works (which failed to compiling before). #1526
Comments
[pid 11864] rename("init/calibrate.o.rc", "init/calibrate.o") = -1 EPERM (Operation not permitted) using strace -f make, I get the error . [pid 11864] close(3) = 0 |
~/workfolder/kernel/build-linux$ ls -a -l init/calibrate.o.rc init/calibrate.o the rename cmd is from windows? has windows translate the mv oper into rename cmd of windows? for linux hasn't the cmd like this. |
from this bug , I change the kernel build folder from windows to ~/( that is : C:\Users\ YOUR_USER_NAME \AppData\Local\Lxss\rootfs), and everything is ok. |
Hi @huawei-nos -- I'm glad you found a fix! You might consider trying an Insider build to see if this has been fixed there. Just so you know, |
yes, you are right, the rename is the syscall and locate at kernel code namei.c |
but I write a demo prog call rename syscall to rename the two files, no errors even on windows part.
|
One thought: Regular Windows NTFS is case-insensitive, but most Linux filesystems are case-sensitive. Could it be that the kernel build system is trying to create two separate files that have names that are the same except for capitalization? |
zoge@VM1-:~/workfolder/kernel/build-linux$ ls -a -l ~/workfolder zoge@VM1-: from above , it sames like that even on ntfs part, bash on windows can recognize the aaa adnd AAA file. see my posts above, the error I getted from strace is first I thought the bug is because the target file exist and ntfs cannot permit the oper. but I run a demo to call linux's syscall rename to retry the oper, it succeeds. but if I delete all the two files and rebuild the kernel, the error existed again. |
mv the kernel build to ~/build-linux, the rename is called also , when build the kernel, but this time it is ok! [pid 9899] rename("arch/x86/crypto/glue_helper.o.rc", "arch/x86/crypto/glue_helper.o") = 0 |
Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!
making linux 4.9 with some config file, failed, but when invoke gcc it works (which failed to compiling before).
making linux kernel should be all right, for it need gcc only,
"x86_64" "y" "y" "gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO "
SKIPPED include/generated/compile.h
gcc -Wp,-MD,init/.version.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I/mnt/d/workfolder/kernel/linux/arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I/mnt/d/workfolder/kernel/linux/include -I./include -I/mnt/d/workfolder/kernel/linux/arch/x86/include/uapi -I/mnt/d/workfolder/kernel/linux/include/uapi -I./include/generated/uapi -include /mnt/d/workfolder/kernel/linux/include/linux/kconfig.h -I/mnt/d/workfolder/kernel/linux/init -Iinit -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -fno-function-sections -fno-data-sections -DKBUILD_BASENAME='"version"' -DKBUILD_MODNAME='"version"' -c -o init/version.o /mnt/d/workfolder/kernel/linux/init/version.c
if [ "-pg" = "-pg" ]; then if [ init/version.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "init/version.o"; fi; fi;
gcc -Wp,-MD,init/.do_mounts.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I/mnt/d/workfolder/kernel/linux/arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I/mnt/d/workfolder/kernel/linux/include -I./include -I/mnt/d/workfolder/kernel/linux/arch/x86/include/uapi -I/mnt/d/workfolder/kernel/linux/include/uapi -I./include/generated/uapi -include /mnt/d/workfolder/kernel/linux/include/linux/kconfig.h -I/mnt/d/workfolder/kernel/linux/init -Iinit -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -fno-function-sections -fno-data-sections -DKBUILD_BASENAME='"do_mounts"' -DKBUILD_MODNAME='"mounts"' -c -o init/do_mounts.o /mnt/d/workfolder/kernel/linux/init/do_mounts.c
if [ "-pg" = "-pg" ]; then if [ init/do_mounts.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "init/do_mounts.o"; fi; fi;
init/do_mounts.o: Operation not permitted
init/do_mounts.o: failed
make[3]: *** [init/do_mounts.o] Error 1
make[2]: *** [init] Error 2
make[1]: *** [sub-make] Error 2
make: *** [__sub-make] Error 2
14393.576
Microsoft Windows [Version 10.0.14393]
download the linux kernel source code from https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.tar.xz
get the kernel config file from centos 7.3 config-3.10.0-514.2.2.el7.x86_64.
cd linux-4.9
cp config-3.10.0-514.2.2.el7.x86_64 ./.config
make menuconfig
then select exit , when prompted whether to save , select YES.
last: make V=1
the failed command works well when I run it again, follows:
zoge@VM1-Z00234794:
/workfolder/kernel/build-linux$ gcc -Wp,-MD,init/.do_mounts.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I/mnt/d/workfolder/kernel/linux/arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I/mnt/d/workfolder/kernel/linux/include -I./include -I/mnt/d/workfolder/kernel/linux/arch/x86/include/uapi -I/mnt/d/workfolder/kernel/linux/include/uapi -I./include/generated/uapi -include /mnt/d/workfolder/kernel/linux/include/linux/kconfig.h -I/mnt/d/workfolder/kernel/linux/init -Iinit -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -fno-function-sections -fno-data-sections -DKBUILD_BASENAME='"do_mounts"' -DKBUILD_MODNAME='"mounts"' -c -o init/do_mounts.o /mnt/d/workfolder/kernel/linux/init/do_mounts.c/workfolder/kernel/build-linux$zoge@VM1-Z00234794:
the configure file "config-3.10.0-514.2.2.el7.x86_64" can be getted from this rpm file : http://mirror.centos.org/centos/7/updates/x86_64/Packages/kernel-3.10.0-514.2.2.el7.x86_64.rpm
make libncurses5-dev libssl-dev
See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: