Intel® oneAPI Base Toolkit
Support for core tools and libraries to build and deploy high-performance data-centric applications

svrng compilation fails

SGold21
Beginner
1,218 Views

I am trying to compile a project on Linux with oneAPI using Eclipse.

The include to svrng.h fails because:

/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))

 

What might be the problem?

Thank you

 

0 Kudos
1 Solution
ayu1
Employee
1,009 Views

From the pictures and log you've supplied, you're using Intel oneAPI DPC++ compiler. Since you mentioned that it's a pure C++ application, you should use icx compiler instead and this problem should go away.


View solution in original post

10 Replies
ayu1
Employee
1,185 Views

Can you please supply reproducer?


SGold21
Beginner
1,165 Views

just include "svrng.h" 

I included it (just #include "svrng.h" line)  to a working project - and it fails.

ayu1
Employee
1,103 Views

Can you please tell me which compiler you tried to use? Is it a DPC++ or C++ application?


SGold21
Beginner
1,082 Views

It's a pure C++ application that compiles fine with the OneAPI compiler up to the point where I include "svrng.h"

ayu1
Employee
1,063 Views

Can you please provide a screen shot of project settings/compiler settings in Eclipse, and a copy of your verbose build log?


SGold21
Beginner
1,037 Views

These are the settings I change:

 

SGold21_0-1631450558694.png

 

SGold21_1-1631450632530.png

SGold21_2-1631450764306.png

 

 

 

 

 

The log:

 

Building file: ../JustTimeDelay.cpp
Invoking: Intel(R) oneAPI DPC++ Compiler
dpcpp -Wall -O2 -ipp=common -I/home/user/eclipse-workspace/TimeDelay -fPIC -mavx2 -MMD -MP -c -o "JustTimeDelay.o" "../JustTimeDelay.cpp"
In file included from ../JustTimeDelay.cpp:7:
In file included from /home/user/eclipse-workspace/TimeDelay/TimeDelay.h:5:
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: incomplete result type 'struct __declspec' in function definition
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:45: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: note: forward declaration of '__declspec'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:34: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:65: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_uint32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_uint32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:89: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_uint32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_ulong8_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_ulong8_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:65: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_ulong8_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_ulong16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_ulong16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:89: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_ulong16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:365:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; __m256i r5; __m256i r6; __m256i r7; __m256i r8; } svrng_ulong32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:365:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:365:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [subdir.mk:23: JustTimeDelay.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

ayu1
Employee
1,010 Views

From the pictures and log you've supplied, you're using Intel oneAPI DPC++ compiler. Since you mentioned that it's a pure C++ application, you should use icx compiler instead and this problem should go away.


SGold21
Beginner
999 Views

I have the option of Intel Compiler Classic.

Is it the one you refer to?

If not,  which one is it?

Thanks.

ayu1
Employee
981 Views

An Intel Classic compiler should be able to compile your application. You can also use new Intel oneAPI C++ compiler. Please refer to this article:

https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-gui...


Adding the Compiler to Eclipse*

This step is needed only if you are manually installing the Intel® oneAPI DPC++/C++ Compiler plug-in for Eclipse*.

To add the Intel oneAPI DPC++/C++ Compiler product extension to your Eclipse configuration:

  1. Start Eclipse.
  2. Select Help > Install New Software.
  3. Next to the Work with field, click the Add button. The Add Repository dialog box opens.
  4. Click the Archive button and browse to the <install_dir>/compiler/<version>/linux/ide_support directory. Select the .zip file that starts with com.intel.compiler for C++ or com.intel.dpcpp.compiler for DPC++, then click OK.
  5. Select Intel® Software Development ToolsIntel® C++ Compiler for C++ or Intel® oneAPI DPC++ CompilerIntel® oneAPI DPC++ Compiler for DPC++, then click OK.
  6. Follow the installation instructions.
  7. When asked if you want to restart Eclipse, select Yes.

When Eclipse restarts, you can create and work with CDT projects that use the Intel oneAPI DPC++/C++ Compiler.


ayu1
Employee
936 Views

I am going to close this case for now as a solution has been provided.


Reply