Getting error: identifier "__int128_t" is undefined

Getting error: identifier "__int128_t" is undefined

The test program below works in gcc? Is there a header file that I am missing to make this work in icc? Thanks for the help ... John

icc -g -o tst_int128 tst_int128.c
tst_int128.c(5): error: identifier "__int128_t" is undefined
__int128_t x = -1025;
^

compilation aborted for tst_int128.c (code 2)
[root@localhost C]# cat tst_int128.c
#include

int main()
{
__int128_t x = -1025;

printf("Done ");

return 0;
}
[root@localhost C]#

20 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

It looks as if this is a special internal definition in 64-bit gcc only, not visible in headers accessible to icc. It isn't fully supported even in the relevant subset of gcc:

http://gcc.gnu.org/ml/gcc/2002-02/msg00818.html

I agree that extensions of look more appealing than the Windows m128 types, but the opinions of an old Fortran programmer don't sway the world.

Quoting - tim18
It looks as if this is a special internal definition in 64-bit gcc only, not visible in headers accessible to icc. It isn't fully supported even in the relevant subset of gcc:

http://gcc.gnu.org/ml/gcc/2002-02/msg00818.html

I agree that extensions of look more appealing than the Windows m128 types, but the opinions of an old Fortran programmer don't sway the world.

Hi, i had encount the same problem, and is there a workround avalbile to this issus?

hi all,

I'm going to add one more request to have a closer look at this problem, hoping it gets fixed or how I (and lots of others) can work around this to build libffi with icc. this actually breaks the python builds somewhat (no ctypes module :(, which is a bit of a shame for a nice product like icc.

it would be nice if some expert could point out how to get around the libffi build error

thanks a lot,

stijn

more info:

tested with icc 11.1.038 on SL5.3 x86_64 (RHEL5 clone)

libffi build instrutions:

wget ftp://sources.redhat.com/pub/libffi/libffi-3.0.8.tar.gz
tar xzf libffi-3.0.8.tar.gz
cd libffi-3.0.8
export CC=icc
./configure
make

error:
icc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -g -O2 -MT src/x86/ffi64.lo -MD -MP -MF src/x86/.deps/ffi64.Tpo -c src/x86/ffi64.c -fPIC -DPIC -o src/x86/.libs/ffi64.o
src/x86/ffi64.c(43): error: identifier "__int128_t" is undefined
__int128_t sse[MAX_SSE_REGS];
^

offending code from ffi64.c file:

struct register_args
{
/* Registers for argument passing. */
UINT64 gpr[MAX_GPR_REGS];
__int128_t sse[MAX_SSE_REGS];
};

as i have not knowledge/experience to fix this myself (eg can the __int128_t be replaced by any of the __m128 types icc supports?), hints are very much welcome.

I have submitted a feature request to Intel compiler development team. I will update the thread when I have more information on this.

Has there been any progress / word back from the Dev team on this issue?

Quoting - Om Sachan (Intel)

I have submitted a feature request to Intel compiler development team. I will update the thread when I have more information on this.

Dear customer,

Engineering team is still working on this feature.Here is a workaround:

do

typedef struct { int64_t m[2]; } __int128_t;

and then change where the uint64_t is assigned to this to be:

sse[x].m[0] = *(uint64_t*) v;

sse[x].m[1] = 0;

and where the uint32_t is assigned to:

sse[x].m[0] = *(uint32_t*) v;

sse[x].m[1] = 0;

Hope this helps.

Regards,

Feilong

hi feilong,

thanks for the update. i just succesfully build python 2.6.4 with icc 11.1.069. works perfectly.

stijn

Dear Stijn,

Do you still have the source code you modified to make this work? This is still an unresolved issue when compiling ffi.c with icc on Linux, in the latest development branches of both Python versions 2.7 and 3.2.

I'd really appreciate if you posted the patch here so that others such as myself can get this to work.

Thanks, and Kind regards,
Alex

Quoting albl500
Dear Stijn,

Do you still have the source code you modified to make this work? This is still an unresolved issue when compiling ffi.c with icc on Linux, in the latest development branches of both Python versions 2.7 and 3.2.

I'd really appreciate if you posted the patch here so that others such as myself can get this to work.

Thanks, and Kind regards,
Alex

Hi Alex,I'm a colleague of Stijn.Sorry about not getting back on this sooner.Our patch to fix the ffi.c compilation issue with icc is available as a part of the open-source EasyBuild tool we've released recently, seehttps://github.com/hpcugent/easybuild/tree/master/easybuild/easyconfigs/p/Python.regards,Kenneth

Hi Kenneth,

I see on libffi-discuss [1] where there are still issues when building upstream libffi with icc. Do y'all plan to push the patches you have for EasyBuild to upstream libffi?

-- Meador

[1] http://sourceware.org/ml/libffi-discuss/2012/msg00179.html

Hi Meador,We won't be actively pushing the patch to upstream libffi ourselves, I don't really have time to follow up on that (e.g. run tests, etc).But, since the patch is available anyone else can get it into upstream libffi.Feel free to let that person know about the patch on the libffi-discuss mailing list.Kenneth

This has been fixed in latest Intel Composer XE 2013.

 

Om

I wanted to detect face from a web camera. I found an example of face detection in samples folder.But they have provided a wrapper class called as CIppiImage . I am retriving frame using open cv,so I am not able to figure out that How I will be able to convert Mat Image or IplImage to the type of CIppiImage

>>I wanted to detect face from a web camera. I found an example of face detection in samples folder.But they have
>>provided a wrapper class called as CIppiImage. I am retriving frame using open cv,so I am not able to figure out
>>that How I will be able to convert Mat Image or IplImage to the type of CIppiImage...

Please re-post your questions on:

software.intel.com/en-us/forums/intel-integrated-performance-primitives

or

software.intel.com/en-us/forums/intel-perceptual-computing-sdk

Quote:

om-sachan (Intel) wrote:

This has been fixed in latest Intel Composer XE 2013.

Om

I have tried to use the latest version of icc while compiling Python 2.7.5 :

[username@ws Python-2.7.5]$ which icc
/opt/intel/composer_xe_2013.4.183/bin/intel64/icc

For original code of ffi64.c I have an error as below:

/home/.../x86/ffi64.c(56): error: identifier "__m128" is undefined
    UINT128 i128;
then I have changed the code of ffi64.c as proposed in a workaround above:

[use@ws x86]$ diff ffi64.c ffi64_old.c
42c42
< typedef struct { int64_t m[2]; } __int128_t;
---
> #define UINT128 __m128
510,511c510
<             reg_args->sse[ssecount].m[0] = *(UINT64 *) a;
<             reg_args->sse[ssecount++].m[1] = 0;
---
>           reg_args->sse[ssecount++].i64 = *(UINT64 *) a;
514,515c513
<                   reg_args->sse[ssecount].m[0] = *(UINT32 *) a;
<                   reg_args->sse[ssecount++].m[1] = 0;
---
>           reg_args->sse[ssecount++].i32 = *(UINT32 *) a;

Now I have following errors :

/home/.../x86/ffi64.c(42): error: invalid redeclaration of type name "__int128_t"
  typedef struct { int64_t m[2]; } __int128_t;
                                   ^
/home/.../x86/ffi64.c(56): error: identifier "UINT128" is undefined
    UINT128 i128;
    ^

Any suggestions?

>>< typedef struct { int64_t m[2]; } __int128_t;
>>---
>>> #define UINT128 __m128
>>510,511c510
>>< reg_args->sse[ssecount].m[0] = *(UINT64 *) a;
>>< reg_args->sse[ssecount++].m[1] = 0;
>>---
>>> reg_args->sse[ssecount++].i64 = *(UINT64 *) a;
>>514,515c513
>>< reg_args->sse[ssecount].m[0] = *(UINT32 *) a;
>>< reg_args->sse[ssecount++].m[1] = 0;
>>---
>>> reg_args->sse[ssecount++].i32 = *(UINT32 *) a;
>>
>>Now I have following errors :
>>
>>/home/.../x86/ffi64.c(42): error: invalid redeclaration of type name "__int128_t"
>> typedef struct { int64_t m[2]; } __int128_t;
>> ^
>>/home/.../x86/ffi64.c(56): error: identifier "UINT128" is undefined
>> UINT128 i128;
>> ^
>>
>>Any suggestions?

I see two issues:

1. It looks like your update removed declaration of #define UINT128 __m128 macro.

2. '...ffi64.c(42): error: invalid redeclaration of type name "__int128_t"...' and it means it is declared somewhere else (!). If __int128_t is the built-in type you can not re-declare it ( try to re-declare a char type and you could see a similar error ). If it was declared in some header with typedef struct statement you need to find that header and please post it for review.

>>>error: identifier "__m128" is undefined>>>

As Sergey pointed it out you must to find header file for this declaration.

>>>error: identifier "__m128" is undefined>>>

As Sergey pointed it out you must to find header file for this declaration.

The __m128 is defined in #include "xmmintrin.h".

Melden Sie sich an, um einen Kommentar zu hinterlassen.