* [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? @ 2007-11-02 2:27 Erik Paulson 2007-11-02 15:51 ` Jeff Dike 0 siblings, 1 reply; 9+ messages in thread From: Erik Paulson @ 2007-11-02 2:27 UTC (permalink / raw) To: user-mode-linux-devel I'm trying to build UML with VDE support turned on. However, I don't have root on my host machine, so when I installed VDE I put it in a non-standard location. How do you pass extra -L and -I flags to the kernel build process? I tried adding make linux ARCH=um CFLAGS=-I/path/to/my/vde/include with no go, and I tried adding the include path to HOSTCFLAGS in the top level Makefile rules, but that also didn't work. I got it to build by just sticking the right -I and -L flags in arch/um/drivers/Makefile Is there another, more standard Linux kernel way that's equivalent to ./configure --with-package=/path/ Thanks, -Erik ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-02 2:27 [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? Erik Paulson @ 2007-11-02 15:51 ` Jeff Dike 2007-11-02 16:22 ` Erik Paulson 0 siblings, 1 reply; 9+ messages in thread From: Jeff Dike @ 2007-11-02 15:51 UTC (permalink / raw) To: Erik Paulson; +Cc: user-mode-linux-devel On Thu, Nov 01, 2007 at 09:27:49PM -0500, Erik Paulson wrote: > I'm trying to build UML with VDE support turned on. However, I don't > have root on my host machine, so when I installed VDE I put it in a > non-standard location. > > How do you pass extra -L and -I flags to the kernel build process? I > tried adding > > make linux ARCH=um CFLAGS=-I/path/to/my/vde/include > with no go, and I tried adding the include path to > HOSTCFLAGS in the top level Makefile rules, but that also didn't > work. How recent a kernel tree are you playing with? This patch seems to do what you want for CFLAGS - http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=52bcc3308ae3344266f55bf98a22c1ac0201eda7 It's been in mainline since 10/15. I think we'd need to do something similar for LFLAGS since the rest of the kernel doesn't care so much about libraries. Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-02 15:51 ` Jeff Dike @ 2007-11-02 16:22 ` Erik Paulson 2007-11-02 17:25 ` Jeff Dike 2007-11-05 17:12 ` Jeff Dike 0 siblings, 2 replies; 9+ messages in thread From: Erik Paulson @ 2007-11-02 16:22 UTC (permalink / raw) To: Jeff Dike; +Cc: user-mode-linux-devel On Fri, Nov 02, 2007 at 11:51:31AM -0400, Jeff Dike wrote: > On Thu, Nov 01, 2007 at 09:27:49PM -0500, Erik Paulson wrote: > > I'm trying to build UML with VDE support turned on. However, I don't > > have root on my host machine, so when I installed VDE I put it in a > > non-standard location. > > > > How do you pass extra -L and -I flags to the kernel build process? I > > tried adding > > > > make linux ARCH=um CFLAGS=-I/path/to/my/vde/include > > with no go, and I tried adding the include path to > > HOSTCFLAGS in the top level Makefile rules, but that also didn't > > work. > > How recent a kernel tree are you playing with? This patch seems to do > what you want for CFLAGS - > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=52bcc3308ae3344266f55bf98a22c1ac0201eda7 > 2.6.24-rc1 (2.6.23 plus the patch for rc1, plus the patch you mentioned on the 25th: http://marc.info/?l=linux-kernel&m=119332492222601&q=raw With basically just using 'defconfig' (I turned on VDE, but otherwise touched nothing in menuconfig). I used: swingline(10)% gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux Thread model: posix gcc version 3.4.6 20060404 (Red Hat 3.4.6-8) running: make linux ARCH=um CFLAGS=-I/scratch/epaulson/vde/include I get: <the below error message repeated many times> CC arch/um/kernel/skas/mmu.o In file included from include/asm/processor-generic.h:13, from include/asm/processor.h:77, from include/asm/thread_info.h:11, from include/linux/thread_info.h:21, from include/linux/preempt.h:9, from include/linux/spinlock.h:49, from include/linux/mmzone.h:7, from include/linux/gfp.h:4, from include/linux/mm.h:8, from arch/um/kernel/skas/mmu.c:6: include/asm/ptrace.h:50: warning: "struct user_fxsr_struct" declared inside parameter list include/asm/ptrace.h:50: warning: its scope is only this definition or declaration, which is probably not what you want include/asm/ptrace.h:52: warning: "struct user_fxsr_struct" declared inside parameter list In file included from include/linux/timer.h:5, from include/linux/sched.h:87, from include/asm/pgtable.h:11, from include/linux/mm.h:37, from arch/um/kernel/skas/mmu.c:6: include/linux/ktime.h: In function `ktime_set': include/linux/ktime.h:84: warning: comparison is always false due to limited range of data type /tmp/cc8wIDJP.s: Assembler messages: /tmp/cc8wIDJP.s:485: Error: suffix or operands invalid for `dec' /tmp/cc8wIDJP.s:496: Error: suffix or operands invalid for `dec' make[2]: *** [arch/um/kernel/skas/mmu.o] Error 1 make[1]: *** [arch/um/kernel/skas] Error 2 make: *** [arch/um/kernel] Error 2 I'll try rc1-git11 this afternoon. -Erik ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-02 16:22 ` Erik Paulson @ 2007-11-02 17:25 ` Jeff Dike 2007-11-05 17:12 ` Jeff Dike 1 sibling, 0 replies; 9+ messages in thread From: Jeff Dike @ 2007-11-02 17:25 UTC (permalink / raw) To: Erik Paulson; +Cc: user-mode-linux-devel On Fri, Nov 02, 2007 at 11:22:44AM -0500, Erik Paulson wrote: > include/asm/ptrace.h:50: warning: "struct user_fxsr_struct" declared inside parameter list > include/asm/ptrace.h:50: warning: its scope is only this definition or declaration, which is probably not what you want > include/asm/ptrace.h:52: warning: "struct user_fxsr_struct" declared inside parameter list Humm. Looks to me like you should be getting user_fxsr_struct into ptrace.h as follows: defined in include/asm-x86/user_32.h included from include/asm-x86/user.h included from include/asm-um/user.h included from include/asm-um/ptrace-i386.h The sticky point I suspect is the user_32.h, which depends on __i386__, which Al Viro sent in patches removing. However, it all works here. Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-02 16:22 ` Erik Paulson 2007-11-02 17:25 ` Jeff Dike @ 2007-11-05 17:12 ` Jeff Dike 2007-11-05 17:57 ` Erik Paulson 2007-11-11 19:47 ` Erik Paulson 1 sibling, 2 replies; 9+ messages in thread From: Jeff Dike @ 2007-11-05 17:12 UTC (permalink / raw) To: Erik Paulson; +Cc: user-mode-linux-devel On Fri, Nov 02, 2007 at 11:22:44AM -0500, Erik Paulson wrote: > running: > make linux ARCH=um CFLAGS=-I/scratch/epaulson/vde/include This isn't going to help with the compilation problems, but the patch below seems to pass LFLAGS from the command line through to ld nicely. > CC arch/um/kernel/skas/mmu.o > In file included from include/asm/processor-generic.h:13, > from include/asm/processor.h:77, > from include/asm/thread_info.h:11, > from include/linux/thread_info.h:21, > from include/linux/preempt.h:9, > from include/linux/spinlock.h:49, > from include/linux/mmzone.h:7, > from include/linux/gfp.h:4, > from include/linux/mm.h:8, > from arch/um/kernel/skas/mmu.c:6: > include/asm/ptrace.h:50: warning: "struct user_fxsr_struct" declared inside parameter list > include/asm/ptrace.h:50: warning: its scope is only this definition or declaration, which is probably not what you want > include/asm/ptrace.h:52: warning: "struct user_fxsr_struct" declared > inside parameter list Does this happen with plain old defconfig? Jeff -- Work email - jdike at linux dot intel dot com Index: linux-2.6.22/arch/um/Makefile =================================================================== --- linux-2.6.22.orig/arch/um/Makefile 2007-10-25 12:23:05.000000000 -0400 +++ linux-2.6.22/arch/um/Makefile 2007-11-05 12:02:49.000000000 -0500 @@ -127,7 +127,9 @@ CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DST # The wrappers will select whether using "malloc" or the kernel allocator. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc -CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) +LD_FLAGS_CMDLINE = $(foreach opt,$(LFLAGS),-Wl,$(opt)) + +CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) define cmd_vmlinux__ $(CC) $(CFLAGS_vmlinux) -o $@ \ -Wl,-T,$(vmlinux-lds) $(vmlinux-init) \ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-05 17:12 ` Jeff Dike @ 2007-11-05 17:57 ` Erik Paulson 2007-11-11 19:47 ` Erik Paulson 1 sibling, 0 replies; 9+ messages in thread From: Erik Paulson @ 2007-11-05 17:57 UTC (permalink / raw) To: Jeff Dike; +Cc: user-mode-linux-devel On Mon, Nov 05, 2007 at 12:12:13PM -0500, Jeff Dike wrote: > > > CC arch/um/kernel/skas/mmu.o > > In file included from include/asm/processor-generic.h:13, > > from include/asm/processor.h:77, > > from include/asm/thread_info.h:11, > > from include/linux/thread_info.h:21, > > from include/linux/preempt.h:9, > > from include/linux/spinlock.h:49, > > from include/linux/mmzone.h:7, > > from include/linux/gfp.h:4, > > from include/linux/mm.h:8, > > from arch/um/kernel/skas/mmu.c:6: > > include/asm/ptrace.h:50: warning: "struct user_fxsr_struct" declared inside parameter list > > include/asm/ptrace.h:50: warning: its scope is only this definition or declaration, which is probably not what you want > > include/asm/ptrace.h:52: warning: "struct user_fxsr_struct" declared > > inside parameter list > > Does this happen with plain old defconfig? > Yes, both with 2.6.24-rc1 and 2.6.24-rc1-git14. -git14 with defconfig and no CFLAGS builds fine. -Erik ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-05 17:12 ` Jeff Dike 2007-11-05 17:57 ` Erik Paulson @ 2007-11-11 19:47 ` Erik Paulson 2007-11-12 16:29 ` Jeff Dike 2007-11-18 16:11 ` Jeff Dike 1 sibling, 2 replies; 9+ messages in thread From: Erik Paulson @ 2007-11-11 19:47 UTC (permalink / raw) To: Jeff Dike; +Cc: user-mode-linux-devel On Mon, Nov 05, 2007 at 12:12:13PM -0500, Jeff Dike wrote: > On Fri, Nov 02, 2007 at 11:22:44AM -0500, Erik Paulson wrote: > > running: > > make linux ARCH=um CFLAGS=-I/scratch/epaulson/vde/include > > This isn't going to help with the compilation problems, but the patch > below seems to pass LFLAGS from the command line through to ld nicely. > > > CC arch/um/kernel/skas/mmu.o > > In file included from include/asm/processor-generic.h:13, > > from include/asm/processor.h:77, > > from include/asm/thread_info.h:11, > > from include/linux/thread_info.h:21, > > from include/linux/preempt.h:9, > > from include/linux/spinlock.h:49, > > from include/linux/mmzone.h:7, > > from include/linux/gfp.h:4, > > from include/linux/mm.h:8, > > from arch/um/kernel/skas/mmu.c:6: > > include/asm/ptrace.h:50: warning: "struct user_fxsr_struct" declared inside parameter list > > include/asm/ptrace.h:50: warning: its scope is only this definition or declaration, which is probably not what you want > > include/asm/ptrace.h:52: warning: "struct user_fxsr_struct" declared > > inside parameter list > > Does this happen with plain old defconfig? > > Jeff Good news - this doesn't happen with 2.6.24-rc2. defconfig builds with a CFLAGS on the commandline Unfortunately, VDE still doesn't compile - the CFLAGS aren't being passed along to arch/um/drivers: make linux ARCH=um CFLAGS=-I/scratch/epaulson/vde/include LDFLAGS=-L/scratch/epaulson/vde/lib V=1 <...> make -f scripts/Makefile.build obj=arch/um/drivers gcc -Wp,-MD,arch/um/drivers/.vde_user.o.d -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -D__arch_um__ -DSUBARCH=\"i386\" -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback -Din6addr_any=kernel_in6addr_any -DCONFIG_X86_32 -march=i686 -mpreferred-stack-boundary=2 -ffreestanding -D_LARGEFILE64_SOURCE -fno-unit-at-a-time -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Iarch/um/include -I/scratch/epaulson/uml/linux-2.6.24-rc2/linux-2.6.23/arch/um/include/skas -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c -o arch/um/drivers/vde_user.o arch/um/drivers/vde_user.c arch/um/drivers/vde_user.c:8:24: libvdeplug.h: No such file or directory ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-11 19:47 ` Erik Paulson @ 2007-11-12 16:29 ` Jeff Dike 2007-11-18 16:11 ` Jeff Dike 1 sibling, 0 replies; 9+ messages in thread From: Jeff Dike @ 2007-11-12 16:29 UTC (permalink / raw) To: Erik Paulson; +Cc: user-mode-linux-devel On Sun, Nov 11, 2007 at 01:47:16PM -0600, Erik Paulson wrote: > Good news - this doesn't happen with 2.6.24-rc2. defconfig builds with > a CFLAGS on the commandline We seem to have cleared up the x86/kbuild breakage for now. > Unfortunately, VDE still doesn't compile - the CFLAGS aren't being passed > along to arch/um/drivers: Yeah, it's not obvious why - I need to look into this. > make linux ARCH=um CFLAGS=-I/scratch/epaulson/vde/include LDFLAGS=-L/scratch/epaulson/vde/lib V=1 BTW, I misspelled LDFLAGS - you'll have to use LFLAGS until I fix this. Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? 2007-11-11 19:47 ` Erik Paulson 2007-11-12 16:29 ` Jeff Dike @ 2007-11-18 16:11 ` Jeff Dike 1 sibling, 0 replies; 9+ messages in thread From: Jeff Dike @ 2007-11-18 16:11 UTC (permalink / raw) To: Erik Paulson; +Cc: user-mode-linux-devel On Sun, Nov 11, 2007 at 01:47:16PM -0600, Erik Paulson wrote: > Unfortunately, VDE still doesn't compile - the CFLAGS aren't being passed > along to arch/um/drivers: Try the patch below - it works for me with fake CFLAGS and LDFLAGS on the command line. It also fixes the previous misspelling of LDFLAGS, so you pass that, rather than LFLAGS, on the command line. Jeff -- Work email - jdike at linux dot intel dot com Index: linux-2.6.22/arch/um/Makefile =================================================================== --- linux-2.6.22.orig/arch/um/Makefile 2007-11-14 12:58:04.000000000 -0500 +++ linux-2.6.22/arch/um/Makefile 2007-11-18 11:10:02.000000000 -0500 @@ -49,7 +49,7 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$ # # These apply to USER_CFLAGS to. -KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ +KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ -Din6addr_loopback=kernel_in6addr_loopback \ -Din6addr_any=kernel_in6addr_any @@ -58,7 +58,7 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE) USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ - -D_FILE_OFFSET_BITS=64 + $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) @@ -130,7 +130,7 @@ CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DST # The wrappers will select whether using "malloc" or the kernel allocator. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc -LD_FLAGS_CMDLINE = $(foreach opt,$(LFLAGS),-Wl,$(opt)) +LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt)) CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) define cmd_vmlinux__ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-11-18 16:11 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-11-02 2:27 [uml-devel] building 2.6.24-rc1 with VDE in a non-standard location? Erik Paulson 2007-11-02 15:51 ` Jeff Dike 2007-11-02 16:22 ` Erik Paulson 2007-11-02 17:25 ` Jeff Dike 2007-11-05 17:12 ` Jeff Dike 2007-11-05 17:57 ` Erik Paulson 2007-11-11 19:47 ` Erik Paulson 2007-11-12 16:29 ` Jeff Dike 2007-11-18 16:11 ` Jeff Dike
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.