* [PATCH] 2.5.42: UML build error
@ 2002-10-12 15:16 Olaf Dietsche
2002-10-12 16:01 ` Kai Germaschewski
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Olaf Dietsche @ 2002-10-12 15:16 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, user-mode-linux-devel
When building 2.5.42 UML it fails with:
make -C arch/um/sys-i386/util mk_sc
gcc -Wp,-MD,./.mk_sc.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o mk_sc
.o mk_sc.c
/bin/sh: scripts/fixdep: No such file or directory
make[1]: *** [mk_sc.o] Error 1
make[1]: Target `mk_sc' not remade because of errors.
make: *** [arch/um/sys-i386/util/mk_sc] Error 2
This patch readds the path to scripts/fixdep in Rules.make. It doesn't
break _my_ regular build, but I can't tell for others.
diff -urN a/Rules.make b/Rules.make
--- a/Rules.make Sat Oct 12 14:24:11 2002
+++ b/Rules.make Sat Oct 12 16:45:47 2002
@@ -561,7 +561,7 @@
@set -e; \
$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \
$(cmd_$(1)); \
- scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \
+ $(TOPDIR)/scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \
rm -f $(depfile); \
mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] 2.5.42: UML build error 2002-10-12 15:16 [PATCH] 2.5.42: UML build error Olaf Dietsche @ 2002-10-12 16:01 ` Kai Germaschewski 2002-10-12 16:37 ` Linus Torvalds 2002-10-12 16:49 ` Kai Germaschewski 2 siblings, 0 replies; 9+ messages in thread From: Kai Germaschewski @ 2002-10-12 16:01 UTC (permalink / raw) To: Olaf Dietsche; +Cc: linux-kernel, torvalds, user-mode-linux-devel On Sat, 12 Oct 2002, Olaf Dietsche wrote: > When building 2.5.42 UML it fails with: > > make -C arch/um/sys-i386/util mk_sc > gcc -Wp,-MD,./.mk_sc.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o mk_sc > .o mk_sc.c > /bin/sh: scripts/fixdep: No such file or directory > make[1]: *** [mk_sc.o] Error 1 > make[1]: Target `mk_sc' not remade because of errors. > make: *** [arch/um/sys-i386/util/mk_sc] Error 2 > > This patch readds the path to scripts/fixdep in Rules.make. It doesn't > break _my_ regular build, but I can't tell for others. > > diff -urN a/Rules.make b/Rules.make > --- a/Rules.make Sat Oct 12 14:24:11 2002 > +++ b/Rules.make Sat Oct 12 16:45:47 2002 > @@ -561,7 +561,7 @@ > @set -e; \ > $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ > $(cmd_$(1)); \ > - scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \ > + $(TOPDIR)/scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \ > rm -f $(depfile); \ > mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) This is actually intentionally broken, since fixdep expects to be called from the top-level dir only now - it doesn't take the previous "$(TOPDIR)" argument anymore which allowed for $(PWD) != $(TOPDIR) before 2.5.41. Descending into directories needs to be adjusted to use $(call descend,<dir>,<target>) now, and the Makefile in <dir> possibly needs adjusting to take into account that $(PWD) == $(TOPDIR). --Kai ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.5.42: UML build error 2002-10-12 15:16 [PATCH] 2.5.42: UML build error Olaf Dietsche 2002-10-12 16:01 ` Kai Germaschewski @ 2002-10-12 16:37 ` Linus Torvalds 2002-10-12 16:49 ` Kai Germaschewski 2 siblings, 0 replies; 9+ messages in thread From: Linus Torvalds @ 2002-10-12 16:37 UTC (permalink / raw) To: Olaf Dietsche; +Cc: linux-kernel, user-mode-linux-devel On Sat, 12 Oct 2002, Olaf Dietsche wrote: > > This patch readds the path to scripts/fixdep in Rules.make. It doesn't > break _my_ regular build, but I can't tell for others. The thing is, the correct fix is to make uml (and other architectures) use the direct makefile approach (ie "make -f xxxxx/Makefile" instead of "make -C xxxxx"). All the dependencies are generated with relative paths anyway, so this one-liner makes the tree build, but it means that the dependencies are broken for uml-specific subdirectories anyway. Linus ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.5.42: UML build error 2002-10-12 15:16 [PATCH] 2.5.42: UML build error Olaf Dietsche 2002-10-12 16:01 ` Kai Germaschewski 2002-10-12 16:37 ` Linus Torvalds @ 2002-10-12 16:49 ` Kai Germaschewski 2002-10-12 18:23 ` Olaf Dietsche 2002-10-14 6:53 ` Oleg Drokin 2 siblings, 2 replies; 9+ messages in thread From: Kai Germaschewski @ 2002-10-12 16:49 UTC (permalink / raw) To: Olaf Dietsche; +Cc: linux-kernel, torvalds, user-mode-linux-devel On Sat, 12 Oct 2002, Olaf Dietsche wrote: > When building 2.5.42 UML it fails with: > [...] Okay, so here's a patch which fixes the UML build for me (i386) - generally, UML could use some more kbuild work, but I'll leave that for post-freeze ;) --Kai Pull from http://linux-isdn.bkbits.net/linux-2.5.make (Merging changesets omitted for clarity) ----------------------------------------------------------------------------- ChangeSet@1.784, 2002-10-12 11:47:37-05:00, kai@tp1.ruhr-uni-bochum.de kbuild: Fix UML build Not perfectly clean yet, but uses the standard way to descend into subdirs and gives me working vmlinux and linux targets without spurious rebuilds. ---------------------------------------------------------------------------- Makefile | 33 ++++++++++++++++++++------------- Makefile-i386 | 35 ++++++++++++++++------------------- sys-i386/util/Makefile | 14 ++++++++------ util/Makefile | 18 +++++++++--------- 4 files changed, 53 insertions(+), 47 deletions(-) ============================================================================= unified diffs follow for reference ============================================================================= ----------------------------------------------------------------------------- ChangeSet@1.784, 2002-10-12 11:47:37-05:00, kai@tp1.ruhr-uni-bochum.de kbuild: Fix UML build Not perfectly clean yet, but uses the standard way to descend into subdirs and gives me working vmlinux and linux targets without spurious rebuilds. --------------------------------------------------------------------------- diff -Nru a/arch/um/Makefile b/arch/um/Makefile --- a/arch/um/Makefile Sat Oct 12 11:48:06 2002 +++ b/arch/um/Makefile Sat Oct 12 11:48:06 2002 @@ -51,14 +51,6 @@ SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) -$(ARCH_DIR)/uml.lds.s : $(ARCH_DIR)/uml.lds.S - $(call if_changed_dep,as_s_S) - -AFLAGS_uml.lds.o = -U$(SUBARCH) -DSTART=$$(($(TOP_ADDR) - $(SIZE))) \ - -DELF_ARCH=$(ELF_ARCH) -DELF_FORMAT=\"$(ELF_FORMAT)\" -P -C -Uum - -LDFLAGS_vmlinux = -r $(ARCH_DIR)/main.o - SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \ include/asm-um/sigcontext.h include/asm-um/processor.h \ include/asm-um/ptrace.h include/asm-um/arch-signal.h @@ -71,11 +63,25 @@ $(ARCH_DIR)/vmlinux.lds.S : touch $@ -linux: scripts $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \ - arch/um/uml.lds.s $(ARCH_DIR)/main.o vmlinux +prepare: $(ARCH_SYMLINKS) $(GEN_HEADERS) + + +LDFLAGS_vmlinux = -r $(ARCH_DIR)/main.o + +vmlinux: $(ARCH_DIR)/main.o + + +$(ARCH_DIR)/uml.lds.s : $(ARCH_DIR)/uml.lds.S + $(call if_changed_dep,as_s_S) + +AFLAGS_uml.lds.o = -U$(SUBARCH) -DSTART=$$(($(TOP_ADDR) - $(SIZE))) \ + -DELF_ARCH=$(ELF_ARCH) -DELF_FORMAT=\"$(ELF_FORMAT)\" -P -C -Uum + +linux: arch/um/uml.lds.s vmlinux $(CC) -Wl,-T,arch/um/uml.lds.s -o $@ $(LINK_PROFILE) \ $(LINK_WRAPS) -static vmlinux -L/usr/lib -lutil + USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS)) USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) -I$(ARCH_INCLUDE) @@ -125,8 +131,9 @@ $(ARCH_DIR)/include/task.h : $(ARCH_DIR)/util/mk_task $< > $@ -$(ARCH_DIR)/util/mk_task : $(ARCH_DIR)/util/mk_task_user.c \ - $(ARCH_DIR)/util/mk_task_kern.c - $(MAKE) $(MFLAGS) -C $(ARCH_DIR)/util all +$(ARCH_DIR)/util/mk_task : $(ARCH_DIR)/util FORCE ; + +$(ARCH_DIR)/util: FORCE + @$(call descend,$@,) export SUBARCH USER_CFLAGS OS diff -Nru a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 --- a/arch/um/Makefile-i386 Sat Oct 12 11:48:06 2002 +++ b/arch/um/Makefile-i386 Sat Oct 12 11:48:06 2002 @@ -8,27 +8,24 @@ ELF_ARCH = $(SUBARCH) ELF_FORMAT = elf32-$(SUBARCH) +SYS_DIR := $(ARCH_DIR)/include/sysdep-i386 +SYS_UTIL_DIR := $(ARCH_DIR)/sys-i386/util -SYS_HEADERS = $(ARCH_DIR)/include/sysdep-i386/sc.h \ - $(ARCH_DIR)/include/sysdep-i386/thread.h +SYS_HEADERS = $(SYS_DIR)/sc.h $(SYS_DIR)/thread.h -$(ARCH_DIR)/include/sysdep-i386/sc.h : $(ARCH_DIR)/sys-i386/util/mk_sc \ - include/asm - $(ARCH_DIR)/sys-i386/util/mk_sc > $@ - -$(ARCH_DIR)/include/sysdep-i386/thread.h : $(ARCH_DIR)/sys-i386/util/mk_thread\ - include/asm - $(ARCH_DIR)/sys-i386/util/mk_thread > $@ - -$(ARCH_DIR)/sys-i386/util/mk_sc : $(ARCH_DIR)/sys-i386/util/mk_sc.c \ - include/asm - $(MAKE) -C $(ARCH_DIR)/sys-i386/util mk_sc - -$(ARCH_DIR)/sys-i386/util/mk_thread : \ - $(ARCH_DIR)/sys-i386/util/mk_thread_user.c \ - $(ARCH_DIR)/sys-i386/util/mk_thread_kern.c - $(MAKE) -C $(ARCH_DIR)/sys-i386/util mk_thread +prepare: $(SYS_HEADERS) + +$(SYS_DIR)/sc.h: $(SYS_UTIL_DIR)/mk_sc + $< > $@ + +$(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread + $< > $@ + +$(SYS_UTIL_DIR)/mk_sc $(SYS_UTIL_DIR)/mk_thread: $(SYS_UTIL_DIR) FORCE ; + +$(SYS_UTIL_DIR): include/asm FORCE + @$(call descend,$@,) sysclean : rm -f $(SYS_HEADERS) - make -C $(ARCH_DIR)/sys-i386/util clean + @$(call descend,$(SYS_DIR),clean) diff -Nru a/arch/um/sys-i386/util/Makefile b/arch/um/sys-i386/util/Makefile --- a/arch/um/sys-i386/util/Makefile Sat Oct 12 11:48:06 2002 +++ b/arch/um/sys-i386/util/Makefile Sat Oct 12 11:48:06 2002 @@ -1,16 +1,18 @@ -host-progs = mk_sc +EXTRA_TARGETS := mk_sc mk_thread mk_thread_kern.o -mk_sc-objs = mk_sc.o +host-progs := mk_sc + +mk_sc-objs := mk_sc.o include $(TOPDIR)/Rules.make -mk_thread : mk_thread_kern.o mk_thread_user.o - $(CC) $(CFLAGS) -o $@ mk_thread_user.o mk_thread_kern.o +$(obj)/mk_thread : $(obj)/mk_thread_kern.o $(obj)/mk_thread_user.o + $(CC) $(CFLAGS) -o $@ $^ -mk_thread_user.o : mk_thread_user.c +$(obj)/mk_thread_user.o : $(src)/mk_thread_user.c $(CC) $(USER_CFLAGS) -c -o $@ $< clean : - $(RM) $(host-progs) mk_thread + $(RM) -f $(EXTRA_TARGETS) archmrproper : clean diff -Nru a/arch/um/util/Makefile b/arch/um/util/Makefile --- a/arch/um/util/Makefile Sat Oct 12 11:48:06 2002 +++ b/arch/um/util/Makefile Sat Oct 12 11:48:06 2002 @@ -1,14 +1,14 @@ -include $(TOPDIR)/Rules.make +EXTRA_TARGETS := mk_task mk_task_kern.o -all : mk_task +include $(TOPDIR)/Rules.make -mk_task : mk_task_user.o mk_task_kern.o - $(CC) -o mk_task mk_task_user.o mk_task_kern.o +$(obj)/mk_task: $(obj)/mk_task_user.o $(obj)/mk_task_kern.o + $(CC) -o $@ $^ -mk_task_user.o : mk_task_user.c - $(CC) -c $< +$(obj)/mk_task_user.o: $(src)/mk_task_user.c + $(CC) -o $@ -c $< -clean : - $(RM) mk_task *.o *~ +clean: + $(RM) $(EXTRA_TARGETS) -archmrproper : clean +archmrproper: ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.5.42: UML build error 2002-10-12 16:49 ` Kai Germaschewski @ 2002-10-12 18:23 ` Olaf Dietsche 2002-10-12 18:31 ` Kai Germaschewski 2002-10-14 6:53 ` Oleg Drokin 1 sibling, 1 reply; 9+ messages in thread From: Olaf Dietsche @ 2002-10-12 18:23 UTC (permalink / raw) To: Kai Germaschewski; +Cc: linux-kernel, torvalds, user-mode-linux-devel Kai Germaschewski <kai-germaschewski@uiowa.edu> writes: > On Sat, 12 Oct 2002, Olaf Dietsche wrote: > >> When building 2.5.42 UML it fails with: >> [...] > > Okay, so here's a patch which fixes the UML build for me (i386) - > generally, UML could use some more kbuild work, but I'll leave that for > post-freeze ;) > > --Kai > > > Pull from http://linux-isdn.bkbits.net/linux-2.5.make > > (Merging changesets omitted for clarity) > > ----------------------------------------------------------------------------- > ChangeSet@1.784, 2002-10-12 11:47:37-05:00, kai@tp1.ruhr-uni-bochum.de > kbuild: Fix UML build > > Not perfectly clean yet, but uses the standard way to descend into subdirs > and gives me working vmlinux and linux targets without spurious rebuilds. > > ---------------------------------------------------------------------------- > Makefile | 33 ++++++++++++++++++++------------- > Makefile-i386 | 35 ++++++++++++++++------------------- > sys-i386/util/Makefile | 14 ++++++++------ > util/Makefile | 18 +++++++++--------- > 4 files changed, 53 insertions(+), 47 deletions(-) > > ============================================================================= > unified diffs follow for reference > ============================================================================= [...] Thanks! I was still trying to figure out, how all this is supposed to work :-). Though, it still gives one error right at the beginning: gcc -E -Wp,-MD,arch/um/.uml.lds.s.d_ -D__ASSEMBLY__ -D__KERNEL__ -Iinclude -nostdinc -iwithprefix include -Ui386 -DSTART=$((0xc0000000 - ((0 + 1) * 0x20000000))) -DELF_ARCH=i386 -DELF_FORMAT=\"elf32-i386\" -P -C -Uum -o arch/um/uml.lds.s arch/um/uml.lds.S /bin/sh: scripts/fixdep: No such file or directory make: *** [arch/um/uml.lds.s] Error 1 Regards, Olaf. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.5.42: UML build error 2002-10-12 18:23 ` Olaf Dietsche @ 2002-10-12 18:31 ` Kai Germaschewski 2002-10-12 19:07 ` Olaf Dietsche 0 siblings, 1 reply; 9+ messages in thread From: Kai Germaschewski @ 2002-10-12 18:31 UTC (permalink / raw) To: Olaf Dietsche; +Cc: linux-kernel, torvalds, user-mode-linux-devel On Sat, 12 Oct 2002, Olaf Dietsche wrote: > Though, it still gives one error right at the beginning: > > gcc -E -Wp,-MD,arch/um/.uml.lds.s.d_ -D__ASSEMBLY__ -D__KERNEL__ -Iinclude -nostdinc -iwithprefix include -Ui386 -DSTART=$((0xc0000000 - ((0 + 1) * 0x20000000))) -DELF_ARCH=i386 -DELF_FORMAT=\"elf32-i386\" -P -C -Uum -o arch/um/uml.lds.s arch/um/uml.lds.S > /bin/sh: scripts/fixdep: No such file or directory > make: *** [arch/um/uml.lds.s] Error 1 Try a "make scripts" first, that should work around it. I'll fix it properly. --Kai ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.5.42: UML build error 2002-10-12 18:31 ` Kai Germaschewski @ 2002-10-12 19:07 ` Olaf Dietsche 0 siblings, 0 replies; 9+ messages in thread From: Olaf Dietsche @ 2002-10-12 19:07 UTC (permalink / raw) To: Kai Germaschewski; +Cc: linux-kernel, torvalds, user-mode-linux-devel Kai Germaschewski <kai-germaschewski@uiowa.edu> writes: > On Sat, 12 Oct 2002, Olaf Dietsche wrote: > >> Though, it still gives one error right at the beginning: >> >> gcc -E -Wp,-MD,arch/um/.uml.lds.s.d_ -D__ASSEMBLY__ -D__KERNEL__ -Iinclude -nostdinc -iwithprefix include -Ui386 -DSTART=$((0xc0000000 - ((0 + 1) * 0x20000000))) -DELF_ARCH=i386 -DELF_FORMAT=\"elf32-i386\" -P -C -Uum -o arch/um/uml.lds.s arch/um/uml.lds.S >> /bin/sh: scripts/fixdep: No such file or directory >> make: *** [arch/um/uml.lds.s] Error 1 > > Try a "make scripts" first, that should work around it. I'll fix it > properly. Works now, thanks. Regards, Olaf. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.5.42: UML build error 2002-10-12 16:49 ` Kai Germaschewski 2002-10-12 18:23 ` Olaf Dietsche @ 2002-10-14 6:53 ` Oleg Drokin 2002-10-14 22:08 ` [uml-devel] " Jeff Dike 1 sibling, 1 reply; 9+ messages in thread From: Oleg Drokin @ 2002-10-14 6:53 UTC (permalink / raw) To: Kai Germaschewski; +Cc: Olaf Dietsche, linux-kernel, user-mode-linux-devel Hello! On Sat, Oct 12, 2002 at 11:49:35AM -0500, Kai Germaschewski wrote: > > When building 2.5.42 UML it fails with: > > [...] > Okay, so here's a patch which fixes the UML build for me (i386) - > generally, UML could use some more kbuild work, but I'll leave that for > post-freeze ;) Actually this patch does not work for make ARCH=um distclean (at least it does not work for me) because there is no Makefile in arch/um/include/sysdep/ (something like a fix attached). Also after "distclean", you cannot build UML anymore. It fails to execute "prepare" target and therefore include/asm/arch symlink (and others ) is not made and build fails. gcc -Wp,-MD,arch/um/sys-i386/util/.mk_thread_kern.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -g -U__i386__ -Ui386 -D__arch_um__ -DSUBARCH=\"i386\" -D_LARGEFILE64_SOURCE -I/home/green/bk/linux-2.5/arch/um/include -Derrno=kernel_errno -nostdinc -iwithprefix include -DKBUILD_BASENAME=mk_thread_kern -c -o arch/um/sys-i386/util/mk_thread_kern.o arch/um/sys-i386/util/mk_thread_kern.c In file included from include/linux/posix_types.h:46, from include/linux/types.h:11, from include/linux/capability.h:16, from include/linux/sched.h:9, from arch/um/sys-i386/util/mk_thread_kern.c:2: include/asm/posix_types.h:4: asm/arch/posix_types.h: No such file or directory ===== arch/um/Makefile-i386 1.2 vs edited ===== --- 1.2/arch/um/Makefile-i386 Sat Oct 12 20:47:35 2002 +++ edited/arch/um/Makefile-i386 Mon Oct 14 09:54:09 2002 @@ -28,4 +28,4 @@ sysclean : rm -f $(SYS_HEADERS) - @$(call descend,$(SYS_DIR),clean) + @$(call descend,$(SYS_UTIL_DIR),clean) Bye, Oleg ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] Re: [PATCH] 2.5.42: UML build error 2002-10-14 6:53 ` Oleg Drokin @ 2002-10-14 22:08 ` Jeff Dike 0 siblings, 0 replies; 9+ messages in thread From: Jeff Dike @ 2002-10-14 22:08 UTC (permalink / raw) To: Oleg Drokin Cc: Kai Germaschewski, Olaf Dietsche, linux-kernel, user-mode-linux-devel green@namesys.com said: > (something like a fix attached). Applied, thanks. Jeff ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-10-14 20:58 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-10-12 15:16 [PATCH] 2.5.42: UML build error Olaf Dietsche 2002-10-12 16:01 ` Kai Germaschewski 2002-10-12 16:37 ` Linus Torvalds 2002-10-12 16:49 ` Kai Germaschewski 2002-10-12 18:23 ` Olaf Dietsche 2002-10-12 18:31 ` Kai Germaschewski 2002-10-12 19:07 ` Olaf Dietsche 2002-10-14 6:53 ` Oleg Drokin 2002-10-14 22:08 ` [uml-devel] " Jeff Dike
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox