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

build error: fs/aufs/Makefile:5: fs/aufs/conf.mk: No such file or directory #43

Open
JKDingwall opened this issue Jul 21, 2024 · 3 comments

Comments

@JKDingwall
Copy link

Hi,

I'm patching aufs-standalone aufs6.8 branch on to the Ubuntu 6.8-hwe tree for Ubuntu jammy. During the build of the 'binary-arch' target I encountered this error:

/build/slowfs/build/ubuntu/fs/aufs/Makefile:5: fs/aufs/conf.mk: No such file or directory
make[6]: *** No rule to make target 'fs/aufs/conf.mk'.  Stop.
make[5]: *** [/build/slowfs/build/ubuntu/scripts/Makefile.build:481: fs/aufs] Error 2
make[4]: *** [/build/slowfs/build/ubuntu/scripts/Makefile.build:481: fs] Error 2
make[4]: *** Waiting for unfinished jobs....

Applying this change to the fs/aufs/Makefile appears to have resolved the problem but I don't know if it is the correct solution.

diff --git a/fs/aufs/Makefile b/fs/aufs/Makefile
index 4af8ecde3e3fa..9111fe31039c6 100644
--- a/fs/aufs/Makefile
+++ b/fs/aufs/Makefile
@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0

-include ${src}/magic.mk
+include $(srctree)/$(src)/magic.mk
 ifeq (${CONFIG_AUFS_FS},m)
-include ${src}/conf.mk
+include $(srctree)/$(src)/conf.mk
 endif
--include ${src}/priv_def.mk
+-include $(srctree)/$(src)/priv_def.mk

 # cf. include/linux/kernel.h
 # enable pr_debug
@@ -13,7 +13,7 @@ ccflags-y += -DDEBUG
 ifdef M
 ccflags-y += -include ${M}/../../include/uapi/linux/aufs_type.h
 else
-ccflags-y += -include ${srctree}/include/uapi/linux/aufs_type.h
+ccflags-y += -include $(srctree)/include/uapi/linux/aufs_type.h
 endif

 obj-$(CONFIG_AUFS_FS) += aufs.o
@sfjro
Copy link
Owner

sfjro commented Jul 21, 2024 via email

@JKDingwall
Copy link
Author

Hi,

Thank you for the quick response:) I'm working with tag Ubuntu-hwe-6.8-6.8.0-40.40_22.04.1 from https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy. I was unfamiliar with the ${...} variable syntax in Makefiles but I see in the documentation that is equivalent to $(...).

git diff v6.8..Ubuntu-hwe-6.8-6.8.0-40.40_22.04.1 -- Makefile scripts does show some differences but nothing obviously stands out. I think the main difference is that the Debian build scripts use a separate build path rather than the root of the source tree. This git ls-files | grep /Makefile$ | xargs git grep "^include " shows that many include statements are prefixed $(srctree).

@sfjro
Copy link
Owner

sfjro commented Jul 22, 2024 via email

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

2 participants