[OF signal] Compilation errors due to mpi.h

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[OF signal] Compilation errors due to mpi.h

Juan Pablo Carbajal-2
During installation of latest signal package there are errors due to
mpi.h not found. I guess this is another instance of badly defined
CPPFLAGS.

Is there a way we can solve this problem in a consistent way?
This involves improving configure.ac and PKG_ADD. If we can't find the
headers in a few reasonable places then we could prompt the user. Or
is there another way of doing this? (besides asking the user to export
the correct CPPFLAGS, which will put off many users).
Reply | Threaded
Open this post in threaded view
|

Re: [OF signal] Compilation errors due to mpi.h

CdeMills
Juan Pablo Carbajal-2 wrote
During installation of latest signal package there are errors due to
mpi.h not found. I guess this is another instance of badly defined
CPPFLAGS.

Is there a way we can solve this problem in a consistent way?
This involves improving configure.ac and PKG_ADD. If we can't find the
headers in a few reasonable places then we could prompt the user. Or
is there another way of doing this? (besides asking the user to export
the correct CPPFLAGS, which will put off many users).
Is mpi.h really needed by signal ?

"pkg-config" aim is to solve this kind of issue; but the latest release was in July 2013, and the mailing lists are ... not very active. It has a successor called pkgconf In both case, there is a middle-term risk of seeing their support stopping.

Regards

Pascal
Reply | Threaded
Open this post in threaded view
|

Re: [OF signal] Compilation errors due to mpi.h

Mike Miller
In reply to this post by Juan Pablo Carbajal-2
On Fri, Feb 28, 2014 at 11:41:14 +0100, Juan Pablo Carbajal wrote:
> During installation of latest signal package there are errors due to
> mpi.h not found. I guess this is another instance of badly defined
> CPPFLAGS.

This is likely an instance of switching HDF5 libraries after building
Octave. At least that's where I've run into it before. If you build
Octave with the non-MPI HDF5 library, everything is fine. If you then
install one of the MPI-enabled HDF5 libraries, you will not be able to
build any oct-files that include HDF5 header files.

> Is there a way we can solve this problem in a consistent way?
> This involves improving configure.ac and PKG_ADD. If we can't find the
> headers in a few reasonable places then we could prompt the user. Or
> is there another way of doing this? (besides asking the user to export
> the correct CPPFLAGS, which will put off many users).

My suggestion would be to fix it in the HDF5 library ;)

This is not something that Octave Forge packages should have to deal
with, they are simply inheriting the compile flags from Octave. If the
flags don't work without changing anything, that's a bug in Octave. But
as I said above, I'm guessing you installed a new set of HDF5 libraries
which invalidates the flags you built Octave with.

My personal solution has become to always build Octave with
CPPFLAGS=-I/usr/include/mpi, regardless of which HDF5 library I have
installed at the time, and that way the include path is included for all
subsequent builds of Octave or external oct-files. This is similar to
how the Debian Octave packages are patched to accomodate any of the HDF5
libraries.

--
mike
Reply | Threaded
Open this post in threaded view
|

Re: [OF signal] Compilation errors due to mpi.h

c.-2
In reply to this post by Juan Pablo Carbajal-2

On 28 Feb 2014, at 11:41, Juan Pablo Carbajal <[hidden email]> wrote:

> During installation of latest signal package there are errors due to
> mpi.h not found. I guess this is another instance of badly defined
> CPPFLAGS.
>
> Is there a way we can solve this problem in a consistent way?
> This involves improving configure.ac and PKG_ADD. If we can't find the
> headers in a few reasonable places then we could prompt the user. Or
> is there another way of doing this? (besides asking the user to export
> the correct CPPFLAGS, which will put off many users).


autoconf is powerful but cannot work magic, if libraries and headers are installed
in non standard locations the user MUST tell configure where to find them.

So instead of trying too hard to avoid any such option, we should find to define
a convenient way for them to be provided.

Rather than having to set environment variables before doing "pkg install", it would
be probably nicer for users to be able to pass compilation flags as input parameters
to "pkg", something like:

pkg install -forge signal CPPFLAGS=-I/opt/openmpi/1.6/include LDGLAGS=-L/opt/openmpi/1.6/lib

or maybe

pkg install -forge signal --with-mpi=/opt/openmpi/1.6/

c.

Reply | Threaded
Open this post in threaded view
|

Re: [OF signal] Compilation errors due to mpi.h

Juan Pablo Carbajal-2
On Fri, Feb 28, 2014 at 3:12 PM, c. <[hidden email]> wrote:
> to "pkg", something like:
>
> pkg install -forge signal CPPFLAGS=-I/opt/openmpi/1.6/include LDGLAGS=-L/opt/openmpi/1.6/lib
>
> or maybe
>
> pkg install -forge signal --with-mpi=/opt/openmpi/1.6/

Yes, this is what I meant. The "new" pkg was designed to accept this.
Reply | Threaded
Open this post in threaded view
|

Re: [OF signal] Compilation errors due to mpi.h

c.-2

On 28 Feb 2014, at 15:40, Juan Pablo Carbajal <[hidden email]> wrote:

> Yes, this is what I meant. The "new" pkg was designed to accept this.

We should really get that pkg merged whith core Octave!!!
c.