Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Fwd: Cross compiling for 32 bit from a 64 bit machine
From: Ralph Castain (rhc_at_[hidden])
Date: 2010-10-25 14:45:20


The problem is that you set the build and the host to the -same- architecture - that indicates it isn't a cross-compile situation. The --host flag should indicate the arch of the machines that will run the code - in your case, that would be i386-pc-linux-gnu

On Oct 25, 2010, at 12:30 PM, saahil.in_at_[hidden] wrote:

> I also tried by adding
>
> --host=i686-pc-linux-gnu
>
> alongwith the --build option. Same error :(
>
> On Oct 25, 2010 11:59pm, saahil.in_at_[hidden] wrote:
> > Ralph,
> > As you suggested, I configured with the following options -
> >
> > ./configure --prefix=/home/wolf/openmpi/ CFLAGS=-m32 CXXFLAGS=-m32 FFLAGS=-m32 FCFLAGS=-m32 --build=i686-pc-linux-gnu LDFLAGS=-m32
> >
> > I'm afraid I am still getting the same error messages while making as I did last time. Did I fail to understand what you said? Am I doing something wrong here?
> >
> > Regards,
> > Saahil
> >
> > On Oct 25, 2010 11:35pm, Ralph Castain rhc_at_[hidden]> wrote:
> > > Do ./configure --help and you'll see options for specifying the host and build target. You need to do that when cross-compiling.
> > >
> > >
> > >
> > >
> > >
> > > On Oct 25, 2010, at 12:01 PM, saahil.in_at_[hidden] wrote:
> > >
> > >
> > >
> > > > ---------- Forwarded message ----------
> > >
> > > > From: saahil.in_at_[hidden]
> > >
> > > > Date: Oct 25, 2010 11:26pm
> > >
> > > > Subject: Cross compiling for 32 bit from a 64 bit machine
> > >
> > > > To: users_at_[hidden]
> > >
> > > > CC:
> > >
> > > >
> > >
> > > >
> > >
> > > > > Hello,
> > >
> > > > > I am a beginner using Open MPI to set up a simple Beowulf cluster of PCs for my Distributed Systems lab. My head node is my x86_64 architecture Fedora 12 machine. The rest of my nodes are i386 Fedora 13 machines. I understand that I need to compile Open MPI with CFLAGS=-m32 so that I can use -m32 flag to create a 32 bit compatible binary. I could not do this using yum install. So I am using the tarball for Open MPI 1.5.
> > >
> > > > > my configure command is as follows -
> > >
> > > > >
> > >
> > > > > ./configure --prefix=/home/wolf/openmpi/ CFLAGS=-m32 CXXFLAGS=-m32 FFLAGS=-m32 FCFLAGS=-m32
> > >
> > > > >
> > >
> > > > > This works fine. However, while doing make I get the following errors -
> > >
> > > > >
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(libltdlc_la-preopen.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(libltdlc_la-lt__alloc.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(libltdlc_la-lt_dlloader.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(libltdlc_la-lt_error.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(libltdlc_la-ltdl.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(libltdlc_la-slist.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(lt__strl.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(libltdlcS.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `../opal/libltdl/.libs/libltdlc.a(dlopen.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `asm/.libs/libasm.a(atomic-asm.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `event/.libs/libevent.a(signal.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `event/.libs/libevent.a(epoll.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `event/.libs/libevent.a(poll.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: i386:x86-64 architecture of input file `event/.libs/libevent.a(select.o)' is incompatible with i386 output
> > >
> > > > > /usr/bin/ld: final link failed: Invalid operation
> > >
> > > > > collect2: ld returned 1 exit status
> > >
> > > > > make[2]: *** [libopen-pal.la] Error 1
> > >
> > > > > make[2]: Leaving directory `/home/wolf/Downloads/openmpi-1.5/opal'
> > >
> > > > > make[1]: *** [all-recursive] Error 1
> > >
> > > > > make[1]: Leaving directory `/home/wolf/Downloads/openmpi-1.5/opal'
> > >
> > > > > make: *** [all-recursive] Error 1
> > >
> > > > >
> > >
> > > > >
> > >
> > > > > Any idea as to how to go around fixing this? Any help would be greatly regarded, since I'm supposed to meet a deadline, and half of my semester has been spent trying to get either LAM-MPI or Open MPI (which I was suggested I shift to) to work.
> > >
> > > > > Thank you very much.
> > >
> > > > >
> > >
> > > > > Regards,
> > >
> > > > > Saahil_______________________________________________
> > >
> > > > 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
> > >_______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users