[mpich-discuss] Linking problem
Kunal Rao
kunalgrao at gmail.com
Wed Oct 6 15:41:22 CDT 2010
Hi
I tried with mingw gcc compiler in cygwin and used "-m64" flag, but during
"configure" it stopped at the message:
---------
checking for ANSI C header files...
---------
That portion of config.log looks like this:
---------------
configure:22888: checking for ANSI C header files
configure:22918: /usr/bin/x86_64-w64-mingw32-gcc -c -m64 -O2
-I/cygdrive/c/users/kunal/desktop/mpich2-1.2.1p1/src/openpa/src
-I/cygdrive/c/users/kunal/des
ktop/mpich2-1.2.1p1/src/openpa/src conftest.c >&5
configure:22925: $? = 0
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_c_bigendian=no
ac_cv_c_compiler_gnu=yes
'
'
'
'
'
configure: caught signal 2
configure: exit 1
----------------
I am attaching the complete config.log for your reference. Let me know if
you get any hints from that.
Thanks & Regards,
Kunal
On Wed, Oct 6, 2010 at 9:51 AM, Kunal Rao <kunalgrao at gmail.com> wrote:
> Hi
>
> Thanks for your suggestion. I will try with Mingw and use gcc 4.5.x and
> check if it works.
>
> Thanks & Regards,
> Kunal
>
>
> On Tue, Oct 5, 2010 at 6:10 PM, <jayesh at mcs.anl.gov> wrote:
>
>> Hi,
>> Mingw supports 32-bit and 64-bit builds (
>> http://sourceforge.net/projects/mingw-w64/). gcc 4.5.x supports the
>> "-m64" (64-bit builds) on Cygwin (However I haven't been able to
>> successfully compile it in the past).
>>
>> Regards,
>> Jayesh
>> ----- Original Message -----
>> From: "Kunal Rao" <kunalgrao at gmail.com>
>> To: "Anthony Chan" <chan at mcs.anl.gov>
>> Cc: mpich-discuss at mcs.anl.gov, parallel-netcdf at lists.mcs.anl.gov, "Jayesh
>> Krishna" <jayesh at mcs.anl.gov>
>> Sent: Tuesday, October 5, 2010 4:48:46 PM GMT -06:00 US/Canada Central
>> Subject: Re: [mpich-discuss] Linking problem
>>
>> Hi Anthony
>>
>> Thanks for your suggestion. I would like to do it the other way round.
>> i.e. build library as well with 64-bit and link with
>> my 64-bit application. What do I need to do for that ? Install some other
>> version of gcc for cygwin ? If yes, which version
>> and how do I do that ?
>>
>>
>> Thanks & Regards,
>> Kunal
>>
>>
>> On Tue, Oct 5, 2010 at 5:41 PM, < chan at mcs.anl.gov > wrote:
>>
>>
>>
>>
>> ----- "Kunal Rao" < kunalgrao at gmail.com > wrote:
>>
>>
>>
>> > configure:2218: checking for C compiler default output file name
>> > configure:2245: gcc -m64 conftest.c >&5
>> > conftest.c:1: sorry, unimplemented: 64-bit mode not compiled in
>> > configure:2248: $? = 1
>>
>>
>> > Also, just to confirm, cygwin should be able to build 64-bit library
>> > with gcc and gfortran, right ?
>>
>> It appears your cygwin gcc installation supports only 32-bit build.
>> Can you try building everything in 32-bit, including your fortran app.
>>
>> A.Chan
>>
>>
>>
>>
>> >
>> > Thanks & Regards,
>> > Kunal
>> >
>> > On Tue, Oct 5, 2010 at 4:24 PM, Jayesh Krishna < jayesh at mcs.anl.gov >
>> > wrote:
>> >
>> > > Hi,
>> > > Ok, then it looks like your application is 64-bit (x64) and the
>> > netcdf
>> > > library is compiled as a 32-bit library (Unless you have a fairly
>> > recent
>> > > version of gcc - Not the ones installed using Cygwin installer from
>> > most
>> > > repos - & you use -m64 flag to compile your code, the default builds
>> > are
>> > > 32-bit).
>> > > The error message states that you are trying to link x86 (IA32 -
>> > 32-bit)
>> > > binary/lib with a x64 (x86_64 - 64-bit) binary/lib.
>> > >
>> > > Regards,
>> > > Jayesh
>> > > ----- Original Message -----
>> > > From: "Kunal Rao" < kunalgrao at gmail.com >
>> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >
>> > > Cc: parallel-netcdf at lists.mcs.anl.gov , mpich-discuss at mcs.anl.gov
>> > > Sent: Tuesday, October 5, 2010 2:29:36 PM GMT -06:00 US/Canada
>> > Central
>> > > Subject: Re: [mpich-discuss] Linking problem (underscore prefix)
>> > >
>> > > Hi
>> > >
>> > >
>> > > I have not used the MPICH2 installers (i.e. *.msi binary packages)
>> > for
>> > > Windows. I have picked up the source code
>> > > (mpich2-1.2.1p1.tar.gz) and did configure/make/make install in
>> > cygwin env.
>> > > on Windows and then used this MPI implementation
>> > > while building parallel netcdf.
>> > >
>> > >
>> > > Thanks & Regards,
>> > > Kunal
>> > >
>> > >
>> > > On Tue, Oct 5, 2010 at 3:10 PM, Jayesh Krishna < jayesh at mcs.anl.gov
>> > >
>> > > wrote:
>> > >
>> > >
>> > > Hi,
>> > > It looks like you have installed 32-bit versions of netcdf and using
>> > 64-bit
>> > > version of MPICH2.
>> > > Uninstall the existing version of MPICH2 and install the 32-bit
>> > version
>> > > (mpich2-1.2.1p1-win-ia32.msi) and let us know if it works.
>> > >
>> > >
>> > > Regards,
>> > > Jayesh
>> > > ----- Original Message -----
>> > > From: "Kunal Rao" < kunalgrao at gmail.com >
>> > >
>> > >
>> > >
>> > > To: mpich-discuss at mcs.anl.gov , parallel-netcdf at lists.mcs.anl.gov
>> > > Sent: Monday, October 4, 2010 2:49:44 PM GMT -06:00 US/Canada
>> > Central
>> > > Subject: Re: [mpich-discuss] Linking problem (underscore prefix)
>> > >
>> > >
>> > > Hi
>> > >
>> > >
>> > > Thanks for creating the bug report. Hope that will be fixed soon.
>> > >
>> > >
>> > > Until then, do you guys have any suggestions, that I could try out ?
>> > I have
>> > > parallel netcdf library built on Windows ( using gcc and gfortran
>> > while
>> > > building MPICH2 and parallel netcdf ). Now while linking with my
>> > application
>> > > built with Intel compiler, as discussed before, there is unresolved
>> > external
>> > > symbol errors. ( prefix appended to the parallel netcdf symbols).
>> > >
>> > >
>> > >
>> > > I tried using the objcopy tool to remove those prefixes from the
>> > library
>> > > using:
>> > >
>> > >
>> > > $objcopy --remove-leading-char libpnetcdf.lib libpnetcdf.lib
>> > >
>> > >
>> > > It then removed all those underscore prefix from the symbols, but
>> > then
>> > > while linking with the application, it gave the following error:
>> > > --------
>> > > libpnetcdf.lib(dim.o) : fatal error LNK1112: module machine type
>> > 'X86'
>> > > conflicts with target machine type 'x64'
>> > > -----
>> > >
>> > >
>> > > I am working on Windows Server 2008 R2, Enterprise Edition. Please
>> > let me
>> > > know if you have any ideas/suggestions that I could try out.
>> > >
>> > >
>> > > Thanks & Regards,
>> > > Kunal
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Mon, Oct 4, 2010 at 3:26 PM, < chan at mcs.anl.gov > wrote:
>> > >
>> > >
>> > >
>> > > Hi Kunal,
>> > >
>> > > Thanks for informing us the problem. There are bugs in Fortran77
>> > binding
>> > > configure tests that prevent one from using windows version of ifort
>> > on
>> > > cygwin, namely these tests hardwire ".o" as object file extension
>> > instead
>> > > of using the portable OBJEXT (same for EXEEXT). I created a bug
>> > report for
>> > > this problem...
>> > >
>> > > https://trac.mcs.anl.gov/projects/mpich2/ticket/1111
>> > >
>> > > A.Chan
>> > >
>> > >
>> > >
>> > >
>> > > ----- "Kunal Rao" < kunalgrao at gmail.com > wrote:
>> > >
>> > > > Hi Jayesh,
>> > > >
>> > > > Thanks for your reply. Well, I tried compiling MPICH2 with Intel
>> > > > compiler
>> > > > but it failed during "configure" with the following error
>> > message:
>> > > >
>> > > > -------------------
>> > > >
>> > > > configure: error: Unable to configure with Fortran support
>> > because
>> > > > configure
>> > > > could not determine the size of a Fortran INTEGER. Consider
>> > setting
>> > > > CROSS_F77
>> > > > _SIZEOF_INTEGER to the length in bytes of a Fortran INTEGER
>> > > >
>> > > > -------------------
>> > > >
>> > > > I am attaching the config.log created while configuring MPICH2
>> > with
>> > > > Intel
>> > > > compiler.
>> > > >
>> > > > So as of now, MPICH2 and parallel netcdf are built with gcc and
>> > > > gfortran.
>> > > > Whereas my application is being built with Intel compiler (it is
>> > a
>> > > > requirement to use Intel compiler). So, there is some naming
>> > > > convention
>> > > > issue here I guess.
>> > > >
>> > > > Thanks & Regards,
>> > > > Kunal
>> > > > On Mon, Oct 4, 2010 at 10:16 AM, Jayesh Krishna <
>> > jayesh at mcs.anl.gov >
>> > > > wrote:
>> > > >
>> > > > > Hi,
>> > > > > Did you try using the same compiler (Intel compiler) for
>> > building
>> > > > MPICH2,
>> > > > > netcdf & your application ?
>> > > > >
>> > > > > Regards,
>> > > > > Jayesh
>> > > > > ----- Original Message -----
>> > > > > From: "Kunal Rao" < kunalgrao at gmail.com >
>> > > > > To: mpich-discuss at mcs.anl.gov
>> > > > > Cc: parallel-netcdf at lists.mcs.anl.gov
>> > > > > Sent: Monday, October 4, 2010 11:19:04 AM GMT -06:00 US/Canada
>> > > > Central
>> > > > > Subject: Re: [mpich-discuss] Linking problem (underscore
>> > prefix)
>> > > > >
>> > > > >
>> > > > > Hi
>> > > > >
>> > > > >
>> > > > > As discussed before, I was able to create the parallel netcdf
>> > > > library on
>> > > > > Windows using the cygwin environment. I am having some issues
>> > while
>> > > > linking
>> > > > > this library with my application built with intel compilers ( I
>> > am
>> > > > using
>> > > > > intel compilers also through cygwin ).
>> > > > >
>> > > > >
>> > > > > I know this kind of setup is not supported, but I would like to
>> > get
>> > > > your
>> > > > > inputs on this. Here is what I did:
>> > > > >
>> > > > >
>> > > > > 1) The libpnetcdf.a library was created in /usr/local/lib
>> > folder. I
>> > > > built
>> > > > > libpnetcdf.lib library from this *.a library through the
>> > lib.exe
>> > > > tool as
>> > > > > follows:
>> > > > >
>> > > > >
>> > > > > $ lib.exe /OUT:libpnetcdf.lib libpnetcdf.a
>> > > > >
>> > > > >
>> > > > > 2) Now, I am trying to link this libpnetcdf.lib library with my
>> > > > application
>> > > > > ( using Intel compilers for building the application ). But
>> > while
>> > > > linking, I
>> > > > > am getting 28 unresolved external symbol (all related to the
>> > > > libpnetcdf.lib
>> > > > > library) errors such as this:
>> > > > >
>> > > > >
>> > > > > ------------
>> > > > > io_ncmpi_def_dims.o : error LNK2019: unresolved external symbol
>> > > > > ncmpi_def_dim referenced in function io_ncmpi_def_dims_
>> > > > > -----------
>> > > > >
>> > > > >
>> > > > > 3) When I checked in io_ncmpi_def_dim.o file for the symbol
>> > using :
>> > > > $
>> > > > > dumpbin.exe /SYMBOLS io_ncmpi_def_dim.o
>> > > > >
>> > > > > I see this symbol as follows:
>> > > > >
>> > > > > -----------
>> > > > > 008 00000000 UNDEF notype () External | ncmpi_def_dim
>> > > > > -----------
>> > > > >
>> > > > >
>> > > > >
>> > > > > 4) When I check the same symbol in the libpnetcdf.lib library, I
>> > see
>> > > > it as
>> > > > > follows:
>> > > > >
>> > > > > -----------
>> > > > > 01B 00000000 UNDEF notype () External | _ncmpi_def_dim
>> > > > > -----------
>> > > > >
>> > > > >
>> > > > >
>> > > > > So basically, there is an underscore prefix in the symbol in
>> > the
>> > > > library
>> > > > > where as it is not there in the object file. Any thoughts on how
>> > to
>> > > > resolve
>> > > > > this ?
>> > > > >
>> > > > >
>> > > > > Thanks & Regards,
>> > > > > Kunal
>> > > > >
>> > > > >
>> > > > > On Sat, Oct 2, 2010 at 7:11 PM, Kunal Rao < kunalgrao at gmail.com
>> > >
>> > > > wrote:
>> > > > >
>> > > > >
>> > > > > Hi
>> > > > >
>> > > > >
>> > > > > I was able to configure and build the parallel netcdf library
>> > on
>> > > > Windows
>> > > > > using the cygwin environment and MPICH2 as the MPI
>> > implementation. I
>> > > > still
>> > > > > have to check if this library works with the application that I
>> > am
>> > > > trying to
>> > > > > link it to.
>> > > > >
>> > > > >
>> > > > > Here are the steps that I have followed:
>> > > > > a) Downloaded the MPICH2 source code (1.2.1p1) from
>> > > > > http://www.mcs.anl.gov/research/projects/mpich2/
>> > > > > b) Did the regular configure/make/make install steps in the
>> > cygwin
>> > > > > environment in Windows.
>> > > > > ( set C compiler as gcc and Fortran compiler as gfortran)
>> > > > > c) Downloaded parallel netcdf (parallel-netcdf-1.2.0.tar.gz)
>> > from
>> > > > > http://trac.mcs.anl.gov/projects/parallel-netcdf/wiki/Download
>> > > > > d) Again, did the regular configure/make/make install steps for
>> > > > parallel
>> > > > > netcdf in cygwin environment in Windows and used the previously
>> > > > built MPICH2
>> > > > > as the mpi implementation ( for the --with-mpi option)
>> > > > >
>> > > > >
>> > > > > The steps went fine and the libpnetcdf.a library has been built
>> > on
>> > > > Windows
>> > > > > through the cygwin environment. I will next check if this links
>> > > > properly and
>> > > > > works with the application.
>> > > > >
>> > > > >
>> > > > > Thanks & Regards,
>> > > > > Kunal
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > On Sat, Oct 2, 2010 at 2:49 PM, Jayesh Krishna <
>> > jayesh at mcs.anl.gov
>> > > > >
>> > > > > wrote:
>> > > > >
>> > > > >
>> > > > > Hi,
>> > > > > As Rob mentioned the error might be due to the way netcdf checks
>> > for
>> > > > MPI-IO
>> > > > > support.
>> > > > > Can you give us details on how you configure netcdf with MPICH2
>> > ?
>> > > > >
>> > > > > (PS: MPI-IO is available with MPICH2 on windows even if you use
>> > the
>> > > > > installers for your installation.)
>> > > > >
>> > > > >
>> > > > > Regards,
>> > > > > Jayesh
>> > > > > ----- Original Message -----
>> > > > > From: "Kunal Rao" < kunalgrao at gmail.com >
>> > > > > To: mpich-discuss at mcs.anl.gov
>> > > > >
>> > > > >
>> > > > >
>> > > > > Sent: Saturday, October 2, 2010 12:08:52 PM GMT -06:00
>> > US/Canada
>> > > > Central
>> > > > > Subject: Re: [mpich-discuss] query on MPICH2 on Windows
>> > > > >
>> > > > >
>> > > > > Hi
>> > > > >
>> > > > >
>> > > > > Initially, I had used the installers availabe at the MPICH 2
>> > website
>> > > > and
>> > > > > that was giving the error mentioned before. I then, downloaded
>> > > > > the source code and built MPICH2 from that (configure/make/make
>> > > > install) in
>> > > > > cygwin and linked this MPI while configuring parallel
>> > > > > netcdf. Now, it is not giving that error and it moved ahead.
>> > > > >
>> > > > >
>> > > > > Thanks & Regards,
>> > > > > Kunal
>> > > > >
>> > > > >
>> > > > > On Fri, Oct 1, 2010 at 8:18 PM, Jayesh Krishna <
>> > jayesh at mcs.anl.gov
>> > > > >
>> > > > > wrote:
>> > > > >
>> > > > >
>> > > > > Hi,
>> > > > > Did you build MPICH2 from source (configure/make/make install)
>> > under
>> > > > cygwin
>> > > > > environment ? Or did you install MPICH2 using installers
>> > available
>> > > > at the
>> > > > > MPICH2 website ?
>> > > > >
>> > > > > Regards,
>> > > > > Jayesh
>> > > > >
>> > > > >
>> > > > >
>> > > > > ----- Original Message -----
>> > > > > From: "Kunal Rao" < kunalgrao at gmail.com >
>> > > > > To: mpich-discuss at mcs.anl.gov
>> > > > > Sent: Friday, October 1, 2010 5:01:38 PM GMT -06:00 US/Canada
>> > > > Central
>> > > > > Subject: [mpich-discuss] query on MPICH2 on Windows
>> > > > >
>> > > > >
>> > > > >
>> > > > > Hi
>> > > > >
>> > > > >
>> > > > > Does MPICH2 on Microsoft Windows support MPI-IO ?
>> > > > >
>> > > > >
>> > > > > I was checking on this site
>> > > > > http://www.mcs.anl.gov/research/projects/romio/ where it says
>> > that
>> > > > ROMIO
>> > > > > is included as a part of MPICH 2.
>> > > > >
>> > > > >
>> > > > > The reason I ask this is because I am trying to configure
>> > parallel
>> > > > netcdf
>> > > > > library on Windows through the cygwin environment. While doing
>> > > > "configure"
>> > > > > it stops with the following message:
>> > > > >
>> > > > >
>> > > > >
>> > > > > ----------------
>> > > > >
>> > > > >
>> > > > > checking MPI-IO support in MPI implementation... configure:
>> > error:
>> > > > mpi
>> > > > > implementation does not support MPI-IO
>> > > > >
>> > > > >
>> > > > > ---------------
>> > > > >
>> > > > >
>> > > > > The MPI implementation I used is MPICH2 which I was assuming
>> > > > supported
>> > > > > MPI-IO on Windows as well. I tried using MSMPI but even that
>> > stopped
>> > > > with
>> > > > > the same message. Any thoughts on this ?
>> > > > >
>> > > > >
>> > > > > Thanks & Regards,
>> > > > > Kunal
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > _______________________________________________
>> > > > > mpich-discuss mailing list
>> > > > > mpich-discuss at mcs.anl.gov
>> > > > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>> > > > >
>> > > > >
>> > > > > _______________________________________________
>> > > > > mpich-discuss mailing list
>> > > > > mpich-discuss at mcs.anl.gov
>> > > > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>> > > > >
>> > > > >
>> > > > >
>> > > > > _______________________________________________
>> > > > > mpich-discuss mailing list
>> > > > > mpich-discuss at mcs.anl.gov
>> > > > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>> > > > >
>> > > >
>> > > > _______________________________________________
>> > > > mpich-discuss mailing list
>> > > > mpich-discuss at mcs.anl.gov
>> > > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>> > > _______________________________________________
>> > > mpich-discuss mailing list
>> > > mpich-discuss at mcs.anl.gov
>> > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>> > >
>> > >
>> > > _______________________________________________
>> > > mpich-discuss mailing list
>> > > mpich-discuss at mcs.anl.gov
>> > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>> > >
>> > >
>> >
>> > _______________________________________________
>> > mpich-discuss mailing list
>> > mpich-discuss at mcs.anl.gov
>> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20101006/fb6a5250/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 77822 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20101006/fb6a5250/attachment-0001.obj>
More information about the mpich-discuss
mailing list