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

在容器中对未修改的代码进行编译,报错 #9

Open
LeeG4ng opened this issue Mar 4, 2021 · 4 comments
Open

在容器中对未修改的代码进行编译,报错 #9

LeeG4ng opened this issue Mar 4, 2021 · 4 comments

Comments

@LeeG4ng
Copy link

LeeG4ng commented Mar 4, 2021

没有对源代码进行修改,运行oslab下的run.sh -m,产生如下报错,求助

ubuntu@1f7cda8a507c:~/linux-0.12/oslab$ ./run.sh -m
rm -f Image System.map tmp_make core boot/bootsect boot/setup \
	boot/bootsect.s boot/setup.s
rm -f init/*.o tools/system tools/build boot/*.o
(cd mm;make clean)
make[1]: Entering directory '/home/ubuntu/linux-0.12/linux-0.12/mm'
rm -f core *.o *.a tmp_make
for i in *.c;do rm -f `basename $i .c`.s;done
make[1]: Leaving directory '/home/ubuntu/linux-0.12/linux-0.12/mm'
(cd fs;make clean)
make[1]: Entering directory '/home/ubuntu/linux-0.12/linux-0.12/fs'
rm -f core *.o *.a tmp_make
for i in *.c;do rm -f `basename $i .c`.s;done
make[1]: Leaving directory '/home/ubuntu/linux-0.12/linux-0.12/fs'
(cd kernel;make clean)
make[1]: Entering directory '/home/ubuntu/linux-0.12/linux-0.12/kernel'
rm -f core *.o *.a tmp_make keyboard.s
for i in *.c;do rm -f `basename $i .c`.s;done
(cd chr_drv; make clean)
make[2]: Entering directory '/home/ubuntu/linux-0.12/linux-0.12/kernel/chr_drv'
rm -f core *.o *.a tmp_make keyboard.s
for i in *.c;do rm -f `basename $i .c`.s;done
make[2]: Leaving directory '/home/ubuntu/linux-0.12/linux-0.12/kernel/chr_drv'
(cd blk_drv; make clean)
make[2]: Entering directory '/home/ubuntu/linux-0.12/linux-0.12/kernel/blk_drv'
rm -f core *.o *.a tmp_make
for i in *.c;do rm -f `basename $i .c`.s;done
make[2]: Leaving directory '/home/ubuntu/linux-0.12/linux-0.12/kernel/blk_drv'
(cd math; make clean)
make[2]: Entering directory '/home/ubuntu/linux-0.12/linux-0.12/kernel/math'
rm -f core *.o *.a tmp_make
for i in *.c;do rm -f `basename $i .c`.s;done
make[2]: Leaving directory '/home/ubuntu/linux-0.12/linux-0.12/kernel/math'
make[1]: Leaving directory '/home/ubuntu/linux-0.12/linux-0.12/kernel'
(cd lib;make clean)
make[1]: Entering directory '/home/ubuntu/linux-0.12/linux-0.12/lib'
rm -f core *.o *.a tmp_make
for i in *.c;do rm -f `basename $i .c`.s;done
make[1]: Leaving directory '/home/ubuntu/linux-0.12/linux-0.12/lib'
make: *** No rule to make target 'boot/bootsect.S', needed by 'boot/bootsect.s'.  Stop.
cp: cannot stat 'Image': No such file or directory

@LeeG4ng
Copy link
Author

LeeG4ng commented Mar 4, 2021

看到了已经关闭的issue,在容器里重新clone了一份就没问题了。
但是想在宿主机修改代码再到容器里编译,还是使用挂载方便,有没有什么修改的方法能让挂载没有问题呢?感谢

@ultraji
Copy link
Owner

ultraji commented Mar 4, 2021

宿主机文件系统不支持大小写,导致make: *** No rule to make target 'boot/bootsect.S', needed by 'boot/bootsect.s'. Stop.;改变中间产物的名字应该可以规避。

@wcpsoft
Copy link

wcpsoft commented Mar 29, 2022

修改一下Makefile文件规则,在大小写不区分的宿主机是有问题的,如mac,我这边把S文件修改成了ss就好了。

@elevenzqx
Copy link

elevenzqx commented Oct 10, 2023

#4 实测可用, 容器里重新 clone 一份即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants