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: Roger Martin (roger_at_[hidden])
Date: 2011-12-28 18:28:47


Hi Shiqing,

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.

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

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
>>
>
>