View previous topic :: View next topic |
Author |
Message |
ant1688 Tux's lil' helper
Joined: 03 May 2007 Posts: 138
|
Posted: Tue Aug 28, 2012 7:38 pm Post subject: [SOLVED] make kernel-3.4.9 failed |
|
|
my gentoo x86-64 has been upgraded for years, this the fist time failed in making kernel-3.4.9:
Code: | localhost linux # make && make modules_install
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC [M] drivers/scsi/lpfc/lpfc_scsi.o
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl’:
drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ‘rc’
make[3]: *** [drivers/scsi/lpfc/lpfc_scsi.o] Error 1
make[2]: *** [drivers/scsi/lpfc] Error 2
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2 |
how to ?
Thanks!
Last edited by ant1688 on Thu Aug 30, 2012 4:57 pm; edited 1 time in total |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Tue Aug 28, 2012 8:21 pm Post subject: |
|
|
ant1688,
Are you in /usr/src/linux That looks like an error you would get if you weren't _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23076
|
Posted: Wed Aug 29, 2012 1:38 am Post subject: |
|
|
Based on his prompt, he is in a directory named linux. Given that it did attempt to compile, I think it is probably /usr/src/linux, which is unfortunate since that means he is compiling as root. However, the output indicates that he is compiling with -Werror, so a relatively minor warning [-Wunused-variable] was promoted to a fatal error. |
|
Back to top |
|
|
ant1688 Tux's lil' helper
Joined: 03 May 2007 Posts: 138
|
Posted: Wed Aug 29, 2012 7:45 am Post subject: |
|
|
Hu wrote: | Based on his prompt, he is in a directory named linux. Given that it did attempt to compile, I think it is probably /usr/src/linux, which is unfortunate since that means he is compiling as root. However, the output indicates that he is compiling with -Werror, so a relatively minor warning [-Wunused-variable] was promoted to a fatal error. |
Yes, I am in /usr/src/linux as root ... it is changed that the root cannot run make kernel? |
|
Back to top |
|
|
Randy Andy Veteran
Joined: 19 Jun 2007 Posts: 1152 Location: /dev/koelsch
|
Posted: Wed Aug 29, 2012 11:36 am Post subject: |
|
|
ant1688 wrote: | Yes, I am in /usr/src/linux as root ... it is changed that the root cannot run make kernel? |
No, you can build your kernel as root of course.
Does your symlink point to the actually installed kernel sources you actually try to compile?
So please show us :
or more comfortable, use eselect if installed for switching and show us the output of:
Code: | eselect kernel list |
Regards, Andy. _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Wed Aug 29, 2012 12:30 pm Post subject: |
|
|
as Hu pointed out, your problem is rather simple, notice this:
Code: | ...
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
... |
this means that you are compiling the kernel with -Werror which treats all warnings as errors.
try to understand how that flag gets into the compilation process. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
ant1688 Tux's lil' helper
Joined: 03 May 2007 Posts: 138
|
Posted: Thu Aug 30, 2012 4:23 pm Post subject: |
|
|
DaggyStyle wrote: | as Hu pointed out, your problem is rather simple, notice this:
Code: | ...
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
... |
this means that you are compiling the kernel with -Werror which treats all warnings as errors.
try to understand how that flag gets into the compilation process. |
Thank to your hint, I delete the "-Werror-implicit-function-declaration " in line 369 in Makefile.
It seems now compiling kernel 3.4.9 smoothly...there is another Makefiel needs to comment the line of "-Werror" under the folder of drivers...I am adding [SOLVED] on my thread in kernel 3.4.9 now. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Thu Aug 30, 2012 6:22 pm Post subject: |
|
|
ant1688 wrote: | DaggyStyle wrote: | as Hu pointed out, your problem is rather simple, notice this:
Code: | ...
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
... |
this means that you are compiling the kernel with -Werror which treats all warnings as errors.
try to understand how that flag gets into the compilation process. |
Thank to your hint, I delete the "-Werror-implicit-function-declaration " in line 369 in Makefile.
It seems now compiling kernel 3.4.9 smoothly...there is another Makefiel needs to comment the line of "-Werror" under the folder of drivers...I am adding [SOLVED] on my thread in kernel 3.4.9 now. |
I'm not sure this is solved, by default kernel compilation shouldn't fail over errors, I'd recommend to check you CFLAGS. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
thienvu n00b
Joined: 04 Sep 2006 Posts: 4
|
Posted: Tue Sep 04, 2012 3:06 am Post subject: |
|
|
DaggyStyle wrote: | I'm not sure this is solved, by default kernel compilation shouldn't fail over errors, I'd recommend to check you CFLAGS. |
I ran into this problem, it's an issue with gentoo-sources. I'm not sure if it's upstream or if it's a problem with genpatches.
Code: | CFLAGS="-march=k8-sse3 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
|
In drivers/scsi/lpfc/Makefile:
Code: | ccflags-y += -Werror
|
So then when you compile -
Code: | CC [M] drivers/scsi/lpfc/lpfc_scsi.o
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl’:
drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ‘rc’
make[3]: *** [drivers/scsi/lpfc/lpfc_scsi.o] Error 1
|
Makefile should be fixed as a workaround or driver should be fixed. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Tue Sep 04, 2012 5:22 am Post subject: |
|
|
thienvu wrote: | DaggyStyle wrote: | I'm not sure this is solved, by default kernel compilation shouldn't fail over errors, I'd recommend to check you CFLAGS. |
I ran into this problem, it's an issue with gentoo-sources. I'm not sure if it's upstream or if it's a problem with genpatches.
Code: | CFLAGS="-march=k8-sse3 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
|
In drivers/scsi/lpfc/Makefile:
Code: | ccflags-y += -Werror
|
So then when you compile -
Code: | CC [M] drivers/scsi/lpfc/lpfc_scsi.o
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl’:
drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ‘rc’
make[3]: *** [drivers/scsi/lpfc/lpfc_scsi.o] Error 1
|
Makefile should be fixed as a workaround or driver should be fixed. |
actually, you are wrong, it isn't gentoo sources, it is a kernel issue, see: http://lxr.linux.no/linux+v3.5.3/drivers/scsi/lpfc/Makefile
it is a bug in the kernel, I have no idea how in hell the author of the driver released that.
there are two option, upgrade to 3.5.x which seems to solve this issue or enable CONFIG_SCSI_LPFC_DEBUG_FS in the config which will hide it until you upgrade to 3.5.x
you can open a bug in gentoo and request that someone will patch this thing but I'm not sure it worth the time. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
|