[openib-general] [libibcm] compilation of code that uses libibcm may fail

Hal Rosenstock halr at voltaire.com
Tue Aug 8 11:10:04 PDT 2006


On Sun, 2006-08-06 at 08:44, Dotan Barak wrote:
> Hi.
> 
> I compiled code of a test that we wrote and i get compilaton error, here is the compilation error:
> 
> cc -c -g -O2 -Wall -W -Werror -I/usr/mst/include -I/usr/local/include/infiniband async_event_test.c
> In file included from /usr/include/vl_gen2u_str.h:40,
>                  from /usr/include/vl.h:49,
>                  from async_event_test.c:38:
> /usr/local/include/infiniband/cm.h:209: error: syntax error before numeric constant
> make: *** [async_event_test.o] Error 1
> 
> 
> when i looked at a preprocessed code of the test i noticed the following code:
> 
> enum ib_cm_sidr_status {
>  0,
>  1,
>  2,
>  3,
>  4,
>  IB_SIDR_UNSUPPORTED_VERSION
> };
> 
> it seems that the enumerations values were replaced with integers.
> 
> when i searched for the values that were enumerated in the headre files i found the following defines in ib_types.h:
> 
> #define IB_SIDR_SUCCESS                                         0
> #define IB_SIDR_UNSUPPORTED                                     1
> #define IB_SIDR_REJECT                                          2
> #define IB_SIDR_NO_QP                                           3
> #define IB_SIDR_REDIRECT                                        4
> 
> 
> I think that the problem was that ib_types.h was included in a file that includes the cm.h and the preprocessor replaced the
> enumeration names with the integer values.
> 
> who can check this issue?

There is a slight naming inconsistency here. The ib_types.h definition
name should be IB_SIDR_UNSUPPORTED_VER. Do you have an old version of
this file ?

-- Hal

> 
> thanks
> Dotan
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 





More information about the general mailing list