- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I installed the intel c/c++ compilers on opensuse 11.3 m7updated to current factory... unfortunately I got into this nasty bug alin@felix:~> icpc -o a bug.cpp /usr/include/c++/4.5/iomanip(64): error: expected an expression { return { __mask }; } ^ /usr/include/c++/4.5/iomanip(94): error: expected an expression { return { __mask }; } ^ /usr/include/c++/4.5/iomanip(125): error: expected an expression { return { __base }; } ^ /usr/include/c++/4.5/iomanip(193): error: expected an expression { return { __n }; } ^ /usr/include/c++/4.5/iomanip(223): error: expected an expression { return { __n }; } ^ compilation aborted for bug.cpp (code 2) here are the versions alin@felix:~> icpc --version icpc (ICC) 11.1 20100414 Copyright (C) 1985-2010 Intel Corporation. All rights reserved. alin@felix:~> g++ --version g++ (SUSE Linux) 4.5.0 20100521 [gcc-4_5-branch revision 159657] Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AlinPlease find the bug.cpp in theattachment.
Link Copied
- « Previous
-
- 1
- 2
- Next »
38 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RDA-
Thanks for the suggestion. Unfortunately, (with 11.1 at least) adding that flag just results in a DIFFERENT compilation error:
BEFORE:
/usr/include/c++/4.5.1/iomanip(64): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5.1/iomanip(94): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5.1/iomanip(125): error: expected an expression
{ return { __base }; }
^
/usr/include/c++/4.5.1/iomanip(193): error: expected an expression
{ return { __n }; }
^
/usr/include/c++/4.5.1/iomanip(223): error: expected an expression
{ return { __n }; }
AFTER:
/usr/include/c++/4.5.1/bits/stringfwd.h(74): error: identifier "char16_t" is undefined
template<> struct char_traits;
^
/usr/include/c++/4.5.1/bits/stringfwd.h(75): error: identifier "char32_t" is undefined
template<> struct char_traits;
^
[....many more similar errors....]
/usr/include/c++/4.5.1/type_traits(106): error: expected a ">"
struct remove_reference<_Tp&&>
^
/usr/include/c++/4.5.1/type_traits(136): catastrophic error: rvalue references not yet implemented
{ typedef _Tp&& type; };
^
compilation aborted for test.cc (code 4)
Do I need to bump back up to 12.0 for that compiler flag to work?
Thanks
-Steven
Thanks for the suggestion. Unfortunately, (with 11.1 at least) adding that flag just results in a DIFFERENT compilation error:
BEFORE:
/usr/include/c++/4.5.1/iomanip(64): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5.1/iomanip(94): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5.1/iomanip(125): error: expected an expression
{ return { __base }; }
^
/usr/include/c++/4.5.1/iomanip(193): error: expected an expression
{ return { __n }; }
^
/usr/include/c++/4.5.1/iomanip(223): error: expected an expression
{ return { __n }; }
AFTER:
/usr/include/c++/4.5.1/bits/stringfwd.h(74): error: identifier "char16_t" is undefined
template<> struct char_traits
^
/usr/include/c++/4.5.1/bits/stringfwd.h(75): error: identifier "char32_t" is undefined
template<> struct char_traits
^
[....many more similar errors....]
/usr/include/c++/4.5.1/type_traits(106): error: expected a ">"
struct remove_reference<_Tp&&>
^
/usr/include/c++/4.5.1/type_traits(136): catastrophic error: rvalue references not yet implemented
{ typedef _Tp&& type; };
^
compilation aborted for test.cc (code 4)
Do I need to bump back up to 12.0 for that compiler flag to work?
Thanks
-Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did check that the case is accepted by icpc 12.0 under -std=c++0x
That option is better implemented in 12.0.
That option is better implemented in 12.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Will 12.0 be available anytime soon? The new naming on the web site doesn't make it clear what version is available now. However, section 3.6.4 "TR1 System Headers" seems to imply that the current release is still an 11.X version which does not fix this issue.
Is it possible to get a beta version of 12.0?
Is it possible to get a beta version of 12.0?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
xe 2011 is the marketing name for the 12.0 compilers. The beta licenses have expired; if you are still within the active term of your license, you can download the new compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With version 12.0.2 20110112 compiling with -std=c++0x still gives the same problem, but the workaround to use CPPFLAGS += -std=c++0x still works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am evaluating icc version 12.0.2, and this problem persists on openSUSE 11.3 (x86_64)
VERSION = 11.3.
Is there a fix, or sould one use a old iomanip.h file localy?
usr/include/c++/4.5/iomanip(64): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5/iomanip(94): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5/iomanip(125): error: expected an expression
{ return { __base }; }
^
/usr/include/c++/4.5/iomanip(193): error: expected an expression
{ return { __n }; }
^
/usr/include/c++/4.5/iomanip(223): error: expected an expression
{ return { __n }; }
Thanks!
VERSION = 11.3.
Is there a fix, or sould one use a old iomanip.h file localy?
usr/include/c++/4.5/iomanip(64): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5/iomanip(94): error: expected an expression
{ return { __mask }; }
^
/usr/include/c++/4.5/iomanip(125): error: expected an expression
{ return { __base }; }
^
/usr/include/c++/4.5/iomanip(193): error: expected an expression
{ return { __n }; }
^
/usr/include/c++/4.5/iomanip(223): error: expected an expression
{ return { __n }; }
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot, rda, That worked perfectly for me!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By the way, do you know how can I include the -std=c+0x flag in a makefile? I've tried "CXXFLAGS = -std=c++0x", but it doesn't work..
Thanks in advance
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That would be a normal way, if $(CXXFLAGS) is included explicitly in the rules for making .o files from C++ sources. If the Makefile uses ($CXXFLAGS), you would be adding the option to those already set. This surely depends on how the Makefile is set up.
If you wish the flag to be always set for icpc, you can include it in icpc.cfg in your compiler installation.
If you wish the flag to be always set for icpc, you can include it in icpc.cfg in your compiler installation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you TimP. I'm sorry because I'm a newbie and still don't know very well how to do it. I wrote this in the makefile:
CPPOPTIONS = -I$(NETCDF)/include
CXX = icpc
CXXOPTIONS = -o3
CXXFLAGS = -std=c++0x
DEBUG =-g -D DEBUG
$(CXX):$(CXXFLAGS)$(CXXOPTIONS)$(DEBUG)-c $*.cpp
$(MAKE)$(MAKEFILE)DEBUG="-g -D DEBUG"
and I got this error:
make: *** No rule to make target `-std=c++0x-o3', needed by `icpc'. Stop.
So, as you said, I need to specify it somewhat in the rules...
CPPOPTIONS = -I$(NETCDF)/include
CXX = icpc
CXXOPTIONS = -o3
CXXFLAGS = -std=c++0x
DEBUG =-g -D DEBUG
$(CXX):$(CXXFLAGS)$(CXXOPTIONS)$(DEBUG)-c $*.cpp
$(MAKE)$(MAKEFILE)DEBUG="-g -D DEBUG"
and I got this error:
make: *** No rule to make target `-std=c++0x-o3', needed by `icpc'. Stop.
So, as you said, I need to specify it somewhat in the rules...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting ascotilla
Thank you TimP. I'm sorry because I'm a newbie and still don't know very well how to do it. I wrote this in the makefile:
CPPOPTIONS = -I$(NETCDF)/include
CXX = icpc
CXXOPTIONS = -o3
CXXFLAGS = -std=c++0x
DEBUG =-g -D DEBUG
$(CXX):$(CXXFLAGS)$(CXXOPTIONS)$(DEBUG)-c $*.cpp
$(MAKE)$(MAKEFILE)DEBUG="-g -D DEBUG"
and I got this error:
make: *** No rule to make target `-std=c++0x-o3', needed by `icpc'. Stop.
So, as you said, I need to specify it somewhat in the rules...
CPPOPTIONS = -I$(NETCDF)/include
CXX = icpc
CXXOPTIONS = -o3
CXXFLAGS = -std=c++0x
DEBUG =-g -D DEBUG
$(CXX):$(CXXFLAGS)$(CXXOPTIONS)$(DEBUG)-c $*.cpp
$(MAKE)$(MAKEFILE)DEBUG="-g -D DEBUG"
and I got this error:
make: *** No rule to make target `-std=c++0x-o3', needed by `icpc'. Stop.
So, as you said, I need to specify it somewhat in the rules...
Please start with simple examples, e.g. from the manual
If you want to have all compilations of .cpp files which you don't take care of specifically use CXXFLAGS, you would have a rule at the bottom like
.cpp.o:
That rule should exist by default as an implicit rule.
If you're using netcdf, you must be able to get a working example to start from.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks TimP, I tried to adapt what I found in other forums to my case, but it will definitely better to start from the beginning (I don't have so much time so I was trying to avoid that, as I'm not suposed to modify the makefile, but it's the only way I found to avoid the bug.
Cheers
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can over-ride makefile variables at invocation, e.g.
make CXX=icpc CXXFLAGS='-fp-model source -std=c++0x'
should you choose to do so, but perhaps you should use icpc.cfg
make CXX=icpc CXXFLAGS='-fp-model source -std=c++0x'
should you choose to do so, but perhaps you should use icpc.cfg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately that didn't work, so I'll try with the icpc.cfg
Thank you!!
Thank you!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I finally could do it with the help of a friend.. It was quite silly, as the first thing I tried was to add the flag -std=c++0x to the CXXOPTIONS, but I had two (one general, and another for the options, I think)...and I just had tried the general. Adding the flag to the other CXXOPTIONS it worked perfectly... Newbie's stupid mistakes...
Thanks a lot!
Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We found this issue can reproduce with the latest version and gcc 4.5.1 on Fedora 14.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found our new version fixed this issue now.
Could you double check it?
Thanks,
Wise
Could you double check it?
Thanks,
Wise
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wise, I think I can validate that the newest version is working. I was having this problem when compiling openmpi 1.4.3 on F14 (I think it was with 11.1, though), updated to 2011.4.191, and openmpi compiled fine.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »