Hi Mark,

as Heiko already mentioned the gcc error message is caused by a bogus
always_inline attribute. Declaring a function as always_inline in the
prototype and not giving gcc the function body at compile time is simply
wrong. However I must say that the gcc message of "sorry, unimplemented"
isn't very helpful here - to my mind a simple error would be the better
choice. This topic has been discussed on the gcc mailing list in 2004 (see
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01032.html).
They agreed to emit this "sorry" message since the code is syntactically
correct. You get the very same message with gcc 4.1 and 4.2.

> dasd_int.h:493: sorry, unimplemented: inlining failed in call to
> 'dasd_chanq_deq': function body not available
> dasd_3990_erp.c:2999: sorry, unimplemented: called from here

But it looks like a problem to me that gcc isn't very consistent when to
issue that message. You get the message for the following example:

__attribute__ ((always_inline)) void foo ();
static __inline__ __attribute__ ((always_inline)) void bar ()
{
}

a ()
{
  foo ();
  bar ();
}

But not for:

__attribute__ ((always_inline)) void foo ();

a ()
{
  foo ();
}

The code path in gcc which issues the message is not entered when there is
no function which could successfully be inlined. I will discuss this on the
gcc mailing list.

Mit  freundlichem Gruß / Kind regards,
Andreas Krebbel

***********************************************************
IBM Deutschland Entwicklung GmbH
Linux on zSeries Development & Service, Dept. D1419
Schönaicherstr. 220, 71032 Böblingen

Office: 06/124 --- Phone: +49-(0)7031-16-1089
External mail: [EMAIL PROTECTED]


                                                                       
             Ulrich                                                    
             Weigand/Germany/I                                         
             BM                                                         To
                                       Andreas Krebbel1/Germany/[EMAIL 
PROTECTED],
             09/11/2006 04:02          Martin                          
             PM                        Schwidefsky/Germany/[EMAIL PROTECTED]   
                                                                        cc
                                                                       
                                                                   Subject
                                       Fw: Kernel Compilation Failure with
                                       gcc 3.4.6                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       



Martin,

hatten wir sowas auch mal gesehen?

Andreas,

kannst Du da mal reinschauen ...

Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  GNU compiler/toolchain for Linux on System z and Cell BE
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: [EMAIL PROTECTED]
----- Forwarded by Ulrich Weigand/Germany/IBM on 09/11/06 04:01 PM -----
                                                                       
             "Post, Mark K"                                            
             <[EMAIL PROTECTED]                                         
             m>                                                         To
                                       BOEBLINGEN                      
             09/11/06 05:31 AM         LINUX390/Germany/[EMAIL PROTECTED], 
"Linux
                                       on 390 Port"                    
                                       <[email protected]>       
                                                                        cc
                                                                       
                                                                   Subject
                                       Kernel Compilation Failure with gcc
                                       3.4.6                           
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       




I'm trying to compile the 2.4.33.2 kernel with gcc 3.4.6, and I'm
getting a compilation error (shown below).  The same code compiles with
gcc 3.3.4, so I went looking for a gcc bug.  I think I found it at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14756.  The problem I have
is that the patch shown for that bug report:
- doesn't apply cleanly
- if tweaked to apply, the updated cgraphunit.c module doesn't compile

The kernel compile error is this:
make[3]: Entering directory
`/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/drivers/s390/block'
ld -m elf64_s390 -r -o dasd_mod.o dasd.o
gcc -D__KERNEL__
-I/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -fno-strength-reduce   -nostdinc -iwithprefix
include -DKBUILD_BASENAME=dasd_3990_erp  -c -o dasd_3990_erp.o
dasd_3990_erp.c
In file included from dasd_3990_erp.c:15:
/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/include/asm/idals.h:
In function `idal_buffer_to_user':
/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/include/asm/idals.h:
231: warning: use of cast expressions as lvalues is deprecated
/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/include/asm/idals.h:
231: warning: use of cast expressions as lvalues is deprecated
/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/include/asm/idals.h:
In function `idal_buffer_from_user':
/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/include/asm/idals.h:
252: warning: use of cast expressions as lvalues is deprecated
/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/include/asm/idals.h:
252: warning: use of cast expressions as lvalues is deprecated
dasd_3990_erp.c: In function `dasd_3990_erp_handle_match_erp':
dasd_int.h:493: sorry, unimplemented: inlining failed in call to
'dasd_chanq_deq': function body not available
dasd_3990_erp.c:2999: sorry, unimplemented: called from here
make[3]: *** [dasd_3990_erp.o] Error 1
make[3]: Leaving directory
`/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/drivers/s390/block'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory
`/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/drivers/s390/block'
make[1]: *** [_subdir_block] Error 2
make[1]: Leaving directory
`/tmp/kernel-default-2.4.33.2/usr/src/linux-2.4.33.2/drivers/s390'
make: *** [_dir_drivers/s390] Error 2


Reducing the optimization level to -O0 didn't help.  From my searches on
Google, it appears that a lot of people have run into similar issues
with lots of kernel modules.  The only solution seems to have been
removing the inline attribute.  If I try to remove the inline attribute
for the function, the problem just crops up in another function.  Then
another, and another.  Not a good solution, it seems.

It looks like the Intel version of Slackware 11.0 is going to ship with
gcc 3.4.6 as the default compiler, so I'd prefer to stay with that
version myself, if possible.  Is there a better fix to gcc 3.4.6 (or the
kernel?) that would resolve this problem?


Thanks,

Mark Post

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to