Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] [sm-discuss] Any one familiar with always_inline attribute problems with new gcc 4.7.2?

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Javier Vasquez <j.e.vasquez.v AT gmail.com>
  • To: "sm, discuss" <sm-discuss AT lists.ibiblio.org>
  • Subject: [SM-Discuss] [sm-discuss] Any one familiar with always_inline attribute problems with new gcc 4.7.2?
  • Date: Sun, 10 Mar 2013 11:34:11 -0600

Any one familiar with this gcc error?

inlining failed in call to always_inline '<function>': function body
can be overwritten at link time

See below for the particular spell problems where I found this, with
new gcc 4.7.2 on test...

Thanks,

Javier.



---------- Forwarded message ----------
From: <chiliproject AT sourcemage.org>
Date: Sun, Mar 10, 2013 at 11:29 AM
Subject: [Grimoire - Bug #526] (New) [ogle] always_inline attribute
problems with new gcc 4.7.2
To: j.e.vasquez.v AT gmail.com




Issue #526 has been reported by Javier Vasquez.

----------------------------------------
Bug #526: [ogle] always_inline attribute problems with new gcc 4.7.2
http://www.sourcemage.org/issues/526

Author: Javier Vasquez
Status: New
Priority: Normal
Assignee:
Category: Video
Target version:
Grimoire: Test


ogle refuses to compile (cast), with error:

gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ogle\"
-DVERSION=\"0.9.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-Dinline=__attribute__\ \(\(__always_inline__\)\) -DHAVE_BYTESWAP_H=1
-DHAVE_SYS_PARAM_H=1 -DHAVE_STROPTS_H=1 -DHAVE_XSHM=1 -DHAVE_XV=1
-DHAVE_CLOCK_GETTIME=1 -DHAVE_MADVISE=1 -DLIBOGLEAO_NULL=
-DLIBOGLEAO_OSS= -DLIBOGLEAO_ALSA= -DHAVE_XML=1 -DHAVE_XF86VIDMODE=1
-DHAVE_XINERAMA=1 -DCONFIG_FILE=\"/usr/share/ogle/oglerc\" -I. -I.
-I.. -I../include -I/usr/include/libxml2 -O3 -march=native
-mtune=native -m64 -pipe -DPIC -fPIC -O3 -O3 -Wall -c `test -f
'c_mlib.c' || echo './'`c_mlib.c
c_mlib.c:669:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:605:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:530:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:207:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:188:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:171:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:150:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:130:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:112:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:96:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:79:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c:66:1: warning: always_inline function might not be inlinable
[-Wattributes]
c_mlib.c: In function 'mlib_VideoCopyRef_U8_U8_16x16':
c_mlib.c:79:1: error: inlining failed in call to always_inline
'mlib_VideoCopyRef_U8_U8': function body can be overwritten at link
time
c_mlib.c:263:27: error: called from here
c_mlib.c: In function 'mlib_VideoCopyRef_U8_U8_16x8':
c_mlib.c:79:1: error: inlining failed in call to always_inline
'mlib_VideoCopyRef_U8_U8': function body can be overwritten at link
time
c_mlib.c:271:27: error: called from here
c_mlib.c: In function 'mlib_VideoCopyRef_U8_U8_8x8':
c_mlib.c:79:1: error: inlining failed in call to always_inline
'mlib_VideoCopyRef_U8_U8': function body can be overwritten at link
time
c_mlib.c:279:27: error: called from here
c_mlib.c: In function 'mlib_VideoCopyRef_U8_U8_8x4':
c_mlib.c:79:1: error: inlining failed in call to always_inline
'mlib_VideoCopyRef_U8_U8': function body can be overwritten at link
time
c_mlib.c:287:27: error: called from here
make[1]: *** [c_mlib.o] Error 1
make[1]: Leaving directory `/home/sorcery/src/ogle-0.9.2/mpeg2_video'
make: *** [all-recursive] Error 1
! Problem Detected !

I've read several links about always_inline, and they all tend to
indicate the function itself needs to be inline, for example:

http://stackoverflow.com/questions/13472341/inlining-failed-function-body-can-be-overwritten-at-link-time

However the failing function is actually inline itself:

ogle-0.9.2/mpeg2_video/c_mlib.c
...
inline void
mlib_VideoCopyRef_U8_U8 (uint8_t *curr_block,
const uint8_t *ref_block,
const int32_t width,
const int32_t height,
int32_t stride)
{
int x, y;

for (y = 0; y < height; y++) {
for (x = 0; x < width; x++)
curr_block[x] = ref_block[x];
ref_block += stride;
curr_block += stride;
}
}

The attribute is provided through the Makefiles:

ogle-0.9.2/mpeg2_video/Makefile
...
DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE=\"ogle\" -DVERSION=\"0.9.2\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -Dinline=__attribute__\ \(\(__always_inline__\)\)
-DHAVE_BYTESWAP_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_STROPTS_H=1
-DHAVE_XSHM=1 -DHAVE_XV=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_MADVISE=1
-DLIBOGLEAO_NULL= -DLIBOGLEAO_OSS= -DLIBOGLEAO_ALSA= -DHAVE_XML=1
-DHAVE_XF86VIDMODE=1 -DHAVE_XINERAMA=1
-DCONFIG_FILE=\"/usr/share/ogle/oglerc\"

BTW, there are several Makefiles, besides the mpeg2_video using the
attribute...

Any suggested way to overcome this, other than removing the attribute,
which is supposed to provide some performance benefit?



--
You have received this notification because you have either subscribed
to it, or are involved in it.
To change your notification preferences, please click here:
http://www.sourcemage.org/my/account


--
Javier.




Archive powered by MHonArc 2.6.24.

Top of Page