problems in compiling application using IBM XL C/C++ V12.1 and boost1.50.0

Hi All, I am getting compilation errors when I try to build my application code which includes some boost headers using IBM XL C/C++ compiler V12.1. ------------------------------------------------------------------------------------------------ "/opt/boost/include/boost/date_time/time_resolution_traits.hpp", line 71.21: 1540-0063 (S) The text "->" is unexpected. "/opt/boost/include/boost/date_time/time_resolution_traits.hpp", line 135.33: 1540-0040 (S) The text "<" is unexpected. "time_resolution_traits" may be undeclared or ambiguous. "/opt/boost/include/boost/date_time/time_resolution_traits.hpp", line 136.33: 1540-0040 (S) The text "<" is unexpected. "time_resolution_traits" may be undeclared or ambiguous. "/opt/boost/include/boost/date_time/time_resolution_traits.hpp", line 137.33: 1540-0040 (S) The text "<" is unexpected. "time_resolution_traits" may be undeclared or ambiguous. "/opt/boost/include/boost/date_time/posix_time/posix_time_config.hpp", line 40.44: 1540-0040 (S) The text "<" is unexpected. "date_time::time_resolution_traits" may be undeclared or ambiguous. ------------------------------------------------------------------------------------------------- These errors seems come due to the fact that this version of compiler is claimed to have more standard conformance than its predecessors. I confirmed from boost release notes of boost 1.50.0 that V12. of XL C/C++ supports this boost version. But still I encountered above errors. Should I use an older version of XL C/C++ compiler so that such errors can be avoided ? Does anybody encountered similar issues ? I am completely stuck at this point and would greatly appreciate any ideas to understand and resolve this. Thanks, Pravar DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

On Wed, Aug 29, 2012 at 12:51:09PM +0530, Pravar wrote:
Hi All,
I am getting compilation errors when I try to build my application code which includes some boost headers using IBM XL C/C++ compiler V12.1. [snip]
These errors seems come due to the fact that this version of compiler is claimed to have more standard conformance than its predecessors. I confirmed from boost release notes of boost 1.50.0 that V12. of XL C/C++ supports this boost version. But still I encountered above errors.
Should I use an older version of XL C/C++ compiler so that such errors can be avoided ? Does anybody encountered similar issues ?
brezhnev:~> cat date_time.cc
#include

Thanks Lars ! Actually, problem was in header file boost/date_time/time_resolution_traits.hpp which contained in some function a template parameter with name "v_type". During pre-processing phase, this v_type gets replaced by "v_gnode->name" because one of system header files on IBM AIX have a macro defined with same name i.e. v_type. I just changes this name "v_type" to some other name say "var_type" and compilation was successful. The same problem was also described in link, https://svn.boost.org/trac/boost/query?status=!closed&page=5&desc=1&order=status&row=description Thanks and Best Regards, Pravar On 08/29/2012 01:31 PM, Lars Viklund wrote:
On Wed, Aug 29, 2012 at 12:51:09PM +0530, Pravar wrote:
Hi All,
I am getting compilation errors when I try to build my application code which includes some boost headers using IBM XL C/C++ compiler V12.1. [snip] These errors seems come due to the fact that this version of compiler is claimed to have more standard conformance than its predecessors. I confirmed from boost release notes of boost 1.50.0 that V12. of XL C/C++ supports this boost version. But still I encountered above errors.
Should I use an older version of XL C/C++ compiler so that such errors can be avoided ? Does anybody encountered similar issues ? brezhnev:~> cat date_time.cc #include
int main() {} brezhnev:~> xlC_r -c date_time.cc -Iboost_1_50_0 brezhnev:~> xlC_r -c date_time.cc -Iboost_1_50_0 -qlanglvl=extended0x brezhnev:~> xlC_r -qversion IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0000
Do you have a standalone testcase that reproduces this problem, and what exact version of the compiler do you run?
DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

On Mon, Sep 03, 2012 at 09:01:38PM +0530, Pravar wrote:
Thanks Lars !
Actually, problem was in header file boost/date_time/time_resolution_traits.hpp which contained in some function a template parameter with name "v_type". During pre-processing phase, this v_type gets replaced by "v_gnode->name" because one of system header files on IBM AIX have a macro defined with same name i.e. v_type.
Out of curiosity, which AIX release is this? Nothing seems to implicitly include sys/vnode.h on my 5.3 install. -- Lars Viklund | zao@acc.umu.se

On 09/04/2012 03:34 AM, Lars Viklund wrote:
On Mon, Sep 03, 2012 at 09:01:38PM +0530, Pravar wrote:
Thanks Lars !
Actually, problem was in header file boost/date_time/time_resolution_traits.hpp which contained in some function a template parameter with name "v_type". During pre-processing phase, this v_type gets replaced by "v_gnode->name" because one of system header files on IBM AIX have a macro defined with same name i.e. v_type. Out of curiosity, which AIX release is this? Nothing seems to implicitly include sys/vnode.h on my 5.3 install. I am using AIX6.1. Also, error was occurred when I was compiling my application which has included some system header files, which might included sys/vnode.h implicitly. But when I build boost 1.45.0 ( only few libraries like thread, wave, regex, serialization etc.) no error occurred related to this.
DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------
participants (2)
-
Lars Viklund
-
Pravar