Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] OBJ_CLASS_INSTANCE error: initializer element is not constant - Windows 7 64 bit mingw-w64 4.6.3
From: Shiqing Fan (fan_at_[hidden])
Date: 2011-12-29 16:42:00


Hi Roger,

Have you tested also with 32 bit build?
>
> I was able to build the open-rte and the rest by applying g++.exe
> instead of gcc.exe. I couldn't find any combination of --std=C9x to
> make the c compiling happy for gcc.exe.

Actually, the C9x option is not really necessary here, but "-x c" should
do the work. It is defined in the CMake variable OMPI_C_LAN_FLAG, is it
also empty in your CMakeCache file?

>
> For open-rte build I ran into issues with opal_ifisloopback impl
> unreferenced. I'll regenerate my steps and post more discrete pieces.

It would be great if you can provide your CMake Config settings and
log/cache file. Thanks a lot.

Regards,
Shiqing

>
> Regards,
> Roger
>
>
> On 12/28/2011 06:15 PM, Shiqing Fan wrote:
>> Hi Roger,
>>
>> To be honest, this MinGW support for Open MPI was integrated when the
>> 64 bit MinGW wasn't available, so I haven't tested it for the 64 bit
>> build. I'll give a try, and come back to you soon.
>>
>> Thanks for your report.
>>
>> Regards,
>> Shiqing
>>
>> On 2011-12-22 4:54 PM, Roger Martin wrote:
>>> Hi,
>>>
>>> Working on building on windows with MinGW. Have built libopen-pal,
>>> opal-restart, opal-wrapper and am at the open-rte stage of the build.
>>> The OBJ_CLASS_INSTANCE hits errors about 'initializer element is
>>> not constant'. Open-pal also uses OBJ_CLASS_INSTANCE and doesn't
>>> throw this error.
>>> Tried g++ instead of gcc and source such as rmcast_base_open.c
>>> compiled successfully but then I get into name mangling issues.
>>>
>>> Being not familiar with the code I haven't yet determined why
>>> open-pal is successful and open-rte isn't. Flag difference? Is
>>> there code difference between them in how they apply the
>>> OBJ_CLASS_INSTANCE?
>>>
>>> $ ../../mingw64/bin/gcc.exe --version
>>> gcc.exe (GCC) 4.6.3 20111105 (prerelease)
>>>
>>> ..............line 325 of
>>> rmcast_base_open.c.........................................
>>> OBJ_CLASS_INSTANCE(rmcast_base_send_t,
>>> opal_list_item_t,
>>> send_construct,
>>> send_destruct);
>>> ............
>>>
>>> C:\Software\openmpi-build>gmake
>>> [ 14%] Built target libopen-pal
>>> [ 14%] Built target opal-restart
>>> [ 14%] Built target opal-wrapper
>>> [ 14%] Building C object
>>> orte/CMakeFiles/libopen-rte.dir/mca/rmcast/base/rmcast_
>>> base_open.obj
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:325:1:
>>> erro
>>> r: initializer element is not constant
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:325:1:
>>> erro
>>> r: (near initialization for 'rmcast_base_send_t_class.cls_parent')
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:363:1:
>>> erro
>>> r: initializer element is not constant
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:363:1:
>>> erro
>>> r: (near initialization for 'rmcast_base_recv_t_class.cls_parent')
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:403:1:
>>> erro
>>> r: initializer element is not constant
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:403:1:
>>> erro
>>> r: (near initialization for 'rmcast_base_channel_t_class.cls_parent')
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:413:1:
>>> erro
>>> r: initializer element is not constant
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:413:1:
>>> erro
>>> r: (near initialization for 'rmcast_seq_tracker_t_class.cls_parent')
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:434:1:
>>> erro
>>> r: initializer element is not constant
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:434:1:
>>> erro
>>> r: (near initialization for 'rmcast_recv_log_t_class.cls_parent')
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:451:1:
>>> erro
>>> r: initializer element is not constant
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:451:1:
>>> erro
>>> r: (near initialization for 'rmcast_send_log_t_class.cls_parent')
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:466:1:
>>> erro
>>> r: initializer element is not constant
>>> C:\Software\openmpi-1.5.5rc1\orte\mca\rmcast\base\rmcast_base_open.c:466:1:
>>> erro
>>> r: (near initialization for 'orte_rmcast_msg_t_class.cls_parent')
>>> gmake[2]: ***
>>> [orte/CMakeFiles/libopen-rte.dir/mca/rmcast/base/rmcast_base_open.
>>> obj] Error 1
>>> gmake[1]: *** [orte/CMakeFiles/libopen-rte.dir/all] Error 2
>>> gmake: *** [all] Error 2
>>>
>>> _______________________________________________
>>> users mailing list
>>> users_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>
>>
>>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
---------------------------------------------------------------
Shiqing Fan
High Performance Computing Center Stuttgart (HLRS)
Tel: ++49(0)711-685-87234      Nobelstrasse 19
Fax: ++49(0)711-685-65832      70569 Stuttgart
http://www.hlrs.de/organization/people/shiqing-fan/
email: fan_at_[hidden]