* crossbuild fails in modpost
@ 2008-05-15 13:44 Jiri Slaby
2008-05-15 17:12 ` Jiri Slaby
0 siblings, 1 reply; 12+ messages in thread
From: Jiri Slaby @ 2008-05-15 13:44 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Linux kernel mailing list, Michael Buesch, Gordon Farquharson
Hi,
probably
4ce6efed48d736e3384c39ff87bda723e1f8e041
kbuild: soften modpost checks when doing cross builds
causes build failures on x86_64 kernel build on 32 bit machine:
make -f /local/xslaby/hid/scripts/Makefile.modpost
YYYYYYYYYYYYYY x86_64 x86_64
scripts/mod/modpost -m -a -o /local/xslaby/buhid/Module.symvers -S -K
/local/xslaby/buhid/Module.markers -M /local/xslaby/buhid/Module.markers -s
XXXXXXXXXXXXXXXXXX 20: 0 (2), 4 (4), 8 (4), 12 (8)
FATAL: drivers/hid/hid-apple: sizeof(struct hid_device_id)=20 is not a
modulo of the size of section __mod_hid_device_table=648.
Fix definition of struct hid_device_id in mod_devicetable.h
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make: *** [sub-make] Error 2
after sticking echo into:
__modpost: $(modules:.ko=.o) FORCE
+ @echo YYYYYYYYYYYYYY $(KBUILD_BUILDHOST) $(ARCH)
$(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^)
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: crossbuild fails in modpost 2008-05-15 13:44 crossbuild fails in modpost Jiri Slaby @ 2008-05-15 17:12 ` Jiri Slaby 2008-05-15 17:35 ` Sam Ravnborg 0 siblings, 1 reply; 12+ messages in thread From: Jiri Slaby @ 2008-05-15 17:12 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Michael Buesch, Gordon Farquharson Well, let's fix sam's email. Jiri Slaby napsal(a): > Hi, > > probably > 4ce6efed48d736e3384c39ff87bda723e1f8e041 > kbuild: soften modpost checks when doing cross builds > > causes build failures on x86_64 kernel build on 32 bit machine: > > make -f /local/xslaby/hid/scripts/Makefile.modpost > YYYYYYYYYYYYYY x86_64 x86_64 > scripts/mod/modpost -m -a -o /local/xslaby/buhid/Module.symvers -S > -K /local/xslaby/buhid/Module.markers -M > /local/xslaby/buhid/Module.markers -s > XXXXXXXXXXXXXXXXXX 20: 0 (2), 4 (4), 8 (4), 12 (8) > FATAL: drivers/hid/hid-apple: sizeof(struct hid_device_id)=20 is not a > modulo of the size of section __mod_hid_device_table=648. > Fix definition of struct hid_device_id in mod_devicetable.h > make[2]: *** [__modpost] Error 1 > make[1]: *** [modules] Error 2 > make: *** [sub-make] Error 2 > > after sticking echo into: > __modpost: $(modules:.ko=.o) FORCE > + @echo YYYYYYYYYYYYYY $(KBUILD_BUILDHOST) $(ARCH) > $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-15 17:12 ` Jiri Slaby @ 2008-05-15 17:35 ` Sam Ravnborg 2008-05-15 17:40 ` Sam Ravnborg 0 siblings, 1 reply; 12+ messages in thread From: Sam Ravnborg @ 2008-05-15 17:35 UTC (permalink / raw) To: Jiri Slaby; +Cc: Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Thu, May 15, 2008 at 07:12:34PM +0200, Jiri Slaby wrote: > Well, let's fix sam's email. > > Jiri Slaby napsal(a): > >Hi, > > > >probably > >4ce6efed48d736e3384c39ff87bda723e1f8e041 > >kbuild: soften modpost checks when doing cross builds > > > >causes build failures on x86_64 kernel build on 32 bit machine: > > > >make -f /local/xslaby/hid/scripts/Makefile.modpost > >YYYYYYYYYYYYYY x86_64 x86_64 > > scripts/mod/modpost -m -a -o /local/xslaby/buhid/Module.symvers -S > >-K /local/xslaby/buhid/Module.markers -M > >/local/xslaby/buhid/Module.markers -s > >XXXXXXXXXXXXXXXXXX 20: 0 (2), 4 (4), 8 (4), 12 (8) > >FATAL: drivers/hid/hid-apple: sizeof(struct hid_device_id)=20 is not a > >modulo of the size of section __mod_hid_device_table=648. > >Fix definition of struct hid_device_id in mod_devicetable.h > >make[2]: *** [__modpost] Error 1 > >make[1]: *** [modules] Error 2 > >make: *** [sub-make] Error 2 > > > >after sticking echo into: > > __modpost: $(modules:.ko=.o) FORCE > >+ @echo YYYYYYYYYYYYYY $(KBUILD_BUILDHOST) $(ARCH) > > $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) > > Your machine claims it is a x86_64 and you are building for a x86_64 according to the following line: > >YYYYYYYYYYYYYY x86_64 x86_64 So it looks to me that you are building for 64 bit on a 64 bit machine. So when you write: on x86_64 kernel build on 32 bit machine: I assume you try to say that your HOSTCC is 32 bit and your kernel cc is 64 bit (or something similar). The commit you reference loosen up the check so we do not do the check if we _know_ that the host and the target system differs. The only thing I can imagine right now to solve your issue would be to skip the check if we do not use the same gcc for target and host? Sam ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-15 17:35 ` Sam Ravnborg @ 2008-05-15 17:40 ` Sam Ravnborg 2008-05-15 19:19 ` Jiri Slaby 0 siblings, 1 reply; 12+ messages in thread From: Sam Ravnborg @ 2008-05-15 17:40 UTC (permalink / raw) To: Jiri Slaby; +Cc: Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Thu, May 15, 2008 at 07:35:39PM +0200, Sam Ravnborg wrote: > On Thu, May 15, 2008 at 07:12:34PM +0200, Jiri Slaby wrote: > > Well, let's fix sam's email. > > > > Jiri Slaby napsal(a): > > >Hi, > > > > > >probably > > >4ce6efed48d736e3384c39ff87bda723e1f8e041 > > >kbuild: soften modpost checks when doing cross builds > > > > > >causes build failures on x86_64 kernel build on 32 bit machine: > > > > > >make -f /local/xslaby/hid/scripts/Makefile.modpost > > >YYYYYYYYYYYYYY x86_64 x86_64 > > > scripts/mod/modpost -m -a -o /local/xslaby/buhid/Module.symvers -S > > >-K /local/xslaby/buhid/Module.markers -M > > >/local/xslaby/buhid/Module.markers -s > > >XXXXXXXXXXXXXXXXXX 20: 0 (2), 4 (4), 8 (4), 12 (8) > > >FATAL: drivers/hid/hid-apple: sizeof(struct hid_device_id)=20 is not a > > >modulo of the size of section __mod_hid_device_table=648. > > >Fix definition of struct hid_device_id in mod_devicetable.h > > >make[2]: *** [__modpost] Error 1 > > >make[1]: *** [modules] Error 2 > > >make: *** [sub-make] Error 2 > > > > > >after sticking echo into: > > > __modpost: $(modules:.ko=.o) FORCE > > >+ @echo YYYYYYYYYYYYYY $(KBUILD_BUILDHOST) $(ARCH) > > > $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) > > > > > Your machine claims it is a x86_64 and you are building for a x86_64 > according to the following line: > > >YYYYYYYYYYYYYY x86_64 x86_64 > > So it looks to me that you are building for 64 bit on a 64 bit machine. > So when you write: > on x86_64 kernel build on 32 bit machine: > > I assume you try to say that your HOSTCC is 32 bit and your > kernel cc is 64 bit (or something similar). > > The commit you reference loosen up the check so we do not do the > check if we _know_ that the host and the target system differs. > The only thing I can imagine right now to solve your issue would > be to skip the check if we do not use the same gcc for target and host? So something like this (entirely untested): --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -65,7 +65,7 @@ modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o))) # Stop after building .o files if NOFINAL is set. Makes compile tests quicker _modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules)) -ifneq ($(KBUILD_BUILDHOST),$(ARCH)) +ifneq ($(CC),$(HOSTCC)) cross_build := 1 endif Only powerpc (and ppc) does seems to do the wrong thing and fiddle with CC: powerpc/Makefile:override CC += -m$(CONFIG_WORD_SIZE) So for most users this is OK. (If it works as expected). Sam ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-15 17:40 ` Sam Ravnborg @ 2008-05-15 19:19 ` Jiri Slaby 2008-05-15 20:46 ` Adrian Bunk 2008-05-18 21:31 ` Sam Ravnborg 0 siblings, 2 replies; 12+ messages in thread From: Jiri Slaby @ 2008-05-15 19:19 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Michael Buesch, Gordon Farquharson Sam Ravnborg napsal(a): > On Thu, May 15, 2008 at 07:35:39PM +0200, Sam Ravnborg wrote: >> On Thu, May 15, 2008 at 07:12:34PM +0200, Jiri Slaby wrote: >>> Well, let's fix sam's email. >>> >>> Jiri Slaby napsal(a): >>>> Hi, >>>> >>>> probably >>>> 4ce6efed48d736e3384c39ff87bda723e1f8e041 >>>> kbuild: soften modpost checks when doing cross builds >>>> >>>> causes build failures on x86_64 kernel build on 32 bit machine: >>>> >>>> make -f /local/xslaby/hid/scripts/Makefile.modpost >>>> YYYYYYYYYYYYYY x86_64 x86_64 >>>> scripts/mod/modpost -m -a -o /local/xslaby/buhid/Module.symvers -S >>>> -K /local/xslaby/buhid/Module.markers -M >>>> /local/xslaby/buhid/Module.markers -s >>>> XXXXXXXXXXXXXXXXXX 20: 0 (2), 4 (4), 8 (4), 12 (8) >>>> FATAL: drivers/hid/hid-apple: sizeof(struct hid_device_id)=20 is not a >>>> modulo of the size of section __mod_hid_device_table=648. >>>> Fix definition of struct hid_device_id in mod_devicetable.h >>>> make[2]: *** [__modpost] Error 1 >>>> make[1]: *** [modules] Error 2 >>>> make: *** [sub-make] Error 2 >>>> >>>> after sticking echo into: >>>> __modpost: $(modules:.ko=.o) FORCE >>>> + @echo YYYYYYYYYYYYYY $(KBUILD_BUILDHOST) $(ARCH) >>>> $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) >>>> >> Your machine claims it is a x86_64 and you are building for a x86_64 >> according to the following line: >>>> YYYYYYYYYYYYYY x86_64 x86_64 >> So it looks to me that you are building for 64 bit on a 64 bit machine. >> So when you write: >> on x86_64 kernel build on 32 bit machine: >> >> I assume you try to say that your HOSTCC is 32 bit and your >> kernel cc is 64 bit (or something similar). >> >> The commit you reference loosen up the check so we do not do the >> check if we _know_ that the host and the target system differs. >> The only thing I can imagine right now to solve your issue would >> be to skip the check if we do not use the same gcc for target and host? Well, the compiler is the same, but it's told to compile the kernel with -m64. It runs on x86_64 kernel and i386 userspace. It's debian i386 gcc package which understands x86_64 objects too. No SUBARCH option, it seems to default to x86_64. > So something like this (entirely untested): > > --- a/scripts/Makefile.modpost > +++ b/scripts/Makefile.modpost > @@ -65,7 +65,7 @@ modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o))) > # Stop after building .o files if NOFINAL is set. Makes compile tests quicker > _modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules)) > > -ifneq ($(KBUILD_BUILDHOST),$(ARCH)) > +ifneq ($(CC),$(HOSTCC)) gcc gcc :) > cross_build := 1 > endif ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-15 19:19 ` Jiri Slaby @ 2008-05-15 20:46 ` Adrian Bunk 2008-05-18 19:55 ` Jan Engelhardt 2008-05-18 21:31 ` Sam Ravnborg 1 sibling, 1 reply; 12+ messages in thread From: Adrian Bunk @ 2008-05-15 20:46 UTC (permalink / raw) To: Jiri Slaby Cc: Sam Ravnborg, Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Thu, May 15, 2008 at 09:19:26PM +0200, Jiri Slaby wrote: > Sam Ravnborg napsal(a): >> On Thu, May 15, 2008 at 07:35:39PM +0200, Sam Ravnborg wrote: >>> On Thu, May 15, 2008 at 07:12:34PM +0200, Jiri Slaby wrote: >>>> Well, let's fix sam's email. >>>> >>>> Jiri Slaby napsal(a): >>>>> Hi, >>>>> >>>>> probably >>>>> 4ce6efed48d736e3384c39ff87bda723e1f8e041 >>>>> kbuild: soften modpost checks when doing cross builds >>>>> >>>>> causes build failures on x86_64 kernel build on 32 bit machine: >>>>> >>>>> make -f /local/xslaby/hid/scripts/Makefile.modpost >>>>> YYYYYYYYYYYYYY x86_64 x86_64 >>>>> scripts/mod/modpost -m -a -o /local/xslaby/buhid/Module.symvers >>>>> -S -K /local/xslaby/buhid/Module.markers -M >>>>> /local/xslaby/buhid/Module.markers -s >>>>> XXXXXXXXXXXXXXXXXX 20: 0 (2), 4 (4), 8 (4), 12 (8) >>>>> FATAL: drivers/hid/hid-apple: sizeof(struct hid_device_id)=20 is >>>>> not a modulo of the size of section __mod_hid_device_table=648. >>>>> Fix definition of struct hid_device_id in mod_devicetable.h >>>>> make[2]: *** [__modpost] Error 1 >>>>> make[1]: *** [modules] Error 2 >>>>> make: *** [sub-make] Error 2 >>>>> >>>>> after sticking echo into: >>>>> __modpost: $(modules:.ko=.o) FORCE >>>>> + @echo YYYYYYYYYYYYYY $(KBUILD_BUILDHOST) $(ARCH) >>>>> $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) >>>>> >>> Your machine claims it is a x86_64 and you are building for a x86_64 >>> according to the following line: >>>>> YYYYYYYYYYYYYY x86_64 x86_64 >>> So it looks to me that you are building for 64 bit on a 64 bit machine. >>> So when you write: >>> on x86_64 kernel build on 32 bit machine: >>> >>> I assume you try to say that your HOSTCC is 32 bit and your >>> kernel cc is 64 bit (or something similar). >>> >>> The commit you reference loosen up the check so we do not do the >>> check if we _know_ that the host and the target system differs. >>> The only thing I can imagine right now to solve your issue would >>> be to skip the check if we do not use the same gcc for target and host? > > Well, the compiler is the same, but it's told to compile the kernel with > -m64. It runs on x86_64 kernel and i386 userspace. It's debian i386 gcc > package which understands x86_64 objects too. No SUBARCH option, it seems > to default to x86_64. >... Unless you manually fiddle with ARCH you can only build a kernel with the same 32<->64bit setting as your currently running kernel (no matter which userspace you use)... cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-15 20:46 ` Adrian Bunk @ 2008-05-18 19:55 ` Jan Engelhardt 2008-05-18 20:42 ` Adrian Bunk 0 siblings, 1 reply; 12+ messages in thread From: Jan Engelhardt @ 2008-05-18 19:55 UTC (permalink / raw) To: Adrian Bunk Cc: Jiri Slaby, Sam Ravnborg, Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Thursday 2008-05-15 22:46, Adrian Bunk wrote: >> >> Well, the compiler is the same, but it's told to compile the kernel with >> -m64. It runs on x86_64 kernel and i386 userspace. It's debian i386 gcc >> package which understands x86_64 objects too. No SUBARCH option, it seems >> to default to x86_64. >>... > >Unless you manually fiddle with ARCH you can only build a kernel with >the same 32<->64bit setting as your currently running kernel (no matter >which userspace you use)... echo -en '#!/bin/bash\nexec gcc -m32 "$@"\n' >/usr/local/bin/i386-linux-gcc make CC=i386-linux-gcc then the if($(CC),$(HOSTCC)) check should get true. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-18 19:55 ` Jan Engelhardt @ 2008-05-18 20:42 ` Adrian Bunk 2008-05-18 21:15 ` Jan Engelhardt 0 siblings, 1 reply; 12+ messages in thread From: Adrian Bunk @ 2008-05-18 20:42 UTC (permalink / raw) To: Jan Engelhardt Cc: Jiri Slaby, Sam Ravnborg, Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Sun, May 18, 2008 at 09:55:58PM +0200, Jan Engelhardt wrote: > > On Thursday 2008-05-15 22:46, Adrian Bunk wrote: > >> > >> Well, the compiler is the same, but it's told to compile the kernel with > >> -m64. It runs on x86_64 kernel and i386 userspace. It's debian i386 gcc > >> package which understands x86_64 objects too. No SUBARCH option, it seems > >> to default to x86_64. > >>... > > > >Unless you manually fiddle with ARCH you can only build a kernel with > >the same 32<->64bit setting as your currently running kernel (no matter > >which userspace you use)... > > echo -en '#!/bin/bash\nexec gcc -m32 "$@"\n' >/usr/local/bin/i386-linux-gcc > make CC=i386-linux-gcc > then the if($(CC),$(HOSTCC)) check should get true. No doubt that you can work around the problem. But that's not a solution. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-18 20:42 ` Adrian Bunk @ 2008-05-18 21:15 ` Jan Engelhardt 2008-05-23 23:58 ` David Woodhouse 0 siblings, 1 reply; 12+ messages in thread From: Jan Engelhardt @ 2008-05-18 21:15 UTC (permalink / raw) To: Adrian Bunk Cc: Jiri Slaby, Sam Ravnborg, Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Sunday 2008-05-18 22:42, Adrian Bunk wrote: >> On Thursday 2008-05-15 22:46, Adrian Bunk wrote: >> >> >> >> Well, the compiler is the same, but it's told to compile the kernel with >> >> -m64. It runs on x86_64 kernel and i386 userspace. It's debian i386 gcc >> >> package which understands x86_64 objects too. No SUBARCH option, it seems >> >> to default to x86_64. >> >>... >> > >> >Unless you manually fiddle with ARCH you can only build a kernel with >> >the same 32<->64bit setting as your currently running kernel (no matter >> >which userspace you use)... >> >> echo -en '#!/bin/bash\nexec gcc -m32 "$@"\n' >/usr/local/bin/i386-linux-gcc >> make CC=i386-linux-gcc >> then the if($(CC),$(HOSTCC)) check should get true. > >No doubt that you can work around the problem. > >But that's not a solution. Of course not. Ever since the arch unification, building for the other bitness in bi- or multiarch systems has become harder. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-18 21:15 ` Jan Engelhardt @ 2008-05-23 23:58 ` David Woodhouse 2008-05-24 4:46 ` Jan Engelhardt 0 siblings, 1 reply; 12+ messages in thread From: David Woodhouse @ 2008-05-23 23:58 UTC (permalink / raw) To: Jan Engelhardt Cc: Adrian Bunk, Jiri Slaby, Sam Ravnborg, Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Sun, 2008-05-18 at 23:15 +0200, Jan Engelhardt wrote: > Of course not. Ever since the arch unification, building for the > other bitness in bi- or multiarch systems has become harder. It works fine for the unified powerpc tree. -- dwmw2 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-23 23:58 ` David Woodhouse @ 2008-05-24 4:46 ` Jan Engelhardt 0 siblings, 0 replies; 12+ messages in thread From: Jan Engelhardt @ 2008-05-24 4:46 UTC (permalink / raw) To: David Woodhouse Cc: Adrian Bunk, Jiri Slaby, Sam Ravnborg, Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Saturday 2008-05-24 01:58, David Woodhouse wrote: >On Sun, 2008-05-18 at 23:15 +0200, Jan Engelhardt wrote: >> Of course not. Ever since the arch unification, building for the >> other bitness in bi- or multiarch systems has become harder. > >It works fine for the unified powerpc tree. That is good for ppc. But for x86, things seem to have changed. Previously, one could just do `make ARCH=x86_64` on an i586 installation, now the required magic is a little bit tougher, unless I am missing something (new). ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: crossbuild fails in modpost 2008-05-15 19:19 ` Jiri Slaby 2008-05-15 20:46 ` Adrian Bunk @ 2008-05-18 21:31 ` Sam Ravnborg 1 sibling, 0 replies; 12+ messages in thread From: Sam Ravnborg @ 2008-05-18 21:31 UTC (permalink / raw) To: Jiri Slaby; +Cc: Linux kernel mailing list, Michael Buesch, Gordon Farquharson On Thu, May 15, 2008 at 09:19:26PM +0200, Jiri Slaby wrote: > Sam Ravnborg napsal(a): > >On Thu, May 15, 2008 at 07:35:39PM +0200, Sam Ravnborg wrote: > >>On Thu, May 15, 2008 at 07:12:34PM +0200, Jiri Slaby wrote: > >>>Well, let's fix sam's email. > >>> > >>>Jiri Slaby napsal(a): > >>>>Hi, > >>>> > >>>>probably > >>>>4ce6efed48d736e3384c39ff87bda723e1f8e041 > >>>>kbuild: soften modpost checks when doing cross builds > >>>> > >>>>causes build failures on x86_64 kernel build on 32 bit machine: > >>>> > >>>>make -f /local/xslaby/hid/scripts/Makefile.modpost > >>>>YYYYYYYYYYYYYY x86_64 x86_64 > >>>> scripts/mod/modpost -m -a -o /local/xslaby/buhid/Module.symvers -S > >>>>-K /local/xslaby/buhid/Module.markers -M > >>>>/local/xslaby/buhid/Module.markers -s > >>>>XXXXXXXXXXXXXXXXXX 20: 0 (2), 4 (4), 8 (4), 12 (8) > >>>>FATAL: drivers/hid/hid-apple: sizeof(struct hid_device_id)=20 is not a > >>>>modulo of the size of section __mod_hid_device_table=648. > >>>>Fix definition of struct hid_device_id in mod_devicetable.h > >>>>make[2]: *** [__modpost] Error 1 > >>>>make[1]: *** [modules] Error 2 > >>>>make: *** [sub-make] Error 2 > >>>> > >>>>after sticking echo into: > >>>>__modpost: $(modules:.ko=.o) FORCE > >>>>+ @echo YYYYYYYYYYYYYY $(KBUILD_BUILDHOST) $(ARCH) > >>>> $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) > >>>> > >>Your machine claims it is a x86_64 and you are building for a x86_64 > >>according to the following line: > >>>>YYYYYYYYYYYYYY x86_64 x86_64 > >>So it looks to me that you are building for 64 bit on a 64 bit machine. > >>So when you write: > >> on x86_64 kernel build on 32 bit machine: > >> > >>I assume you try to say that your HOSTCC is 32 bit and your > >>kernel cc is 64 bit (or something similar). > >> > >>The commit you reference loosen up the check so we do not do the > >>check if we _know_ that the host and the target system differs. > >>The only thing I can imagine right now to solve your issue would > >>be to skip the check if we do not use the same gcc for target and host? > > Well, the compiler is the same, but it's told to compile the kernel with > -m64. It runs on x86_64 kernel and i386 userspace. It's debian i386 gcc > package which understands x86_64 objects too. No SUBARCH option, it seems > to default to x86_64. In that cae modpost tells you to fix your typedefiniton so the size used in the kernel matches what the userspace can see. So what we have here is exactly the kind of issues this check were introduced to catch. Add a bit more alignment to hid_device_id and userspace and kernel should be happy. Sam ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-05-24 4:46 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-05-15 13:44 crossbuild fails in modpost Jiri Slaby 2008-05-15 17:12 ` Jiri Slaby 2008-05-15 17:35 ` Sam Ravnborg 2008-05-15 17:40 ` Sam Ravnborg 2008-05-15 19:19 ` Jiri Slaby 2008-05-15 20:46 ` Adrian Bunk 2008-05-18 19:55 ` Jan Engelhardt 2008-05-18 20:42 ` Adrian Bunk 2008-05-18 21:15 ` Jan Engelhardt 2008-05-23 23:58 ` David Woodhouse 2008-05-24 4:46 ` Jan Engelhardt 2008-05-18 21:31 ` Sam Ravnborg
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.