Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] PkgSrc build of 1.8.1 gives a portability error
From: Kevin Buckley ([hidden])
Date: 2014-07-17 00:32:48

Hello again OpenMPI folk, been a while.

Have just come to build OpenMPI 1.8.1 within a PkgSrc environment for
our ArchLinux machines (yes, we used to be NetBSD, yes).

Latest PkgSrc build was for 1.6.4.

The 1.6.4 PkgSrc build required 4 patches, 3 of which were PkgSrc-specific
and just defined a

sysconfexampledir = $(pkgdatadir)/examples

so that the PkgSrc build could "Install configuration files into
example directory"

Those patches affected


The 4th patch, affecting


added some "Missing RPATH support"

I fixed up those four patches so that they appled cleanly to 1.8.1 ,
however I have
been informed, by the PkgSrc build process, of the following

=> Checking for portability problems in extracted files
ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] configure: if test "$enable_oshmem" ==
"yes" -a "$ompi_fortran_happy" == "1" -a \

The "test" command, as well as the "[" command, are not required to know
the "==" operator. Only a few implementations like bash and some
versions of ksh support it.

When you run "test foo == foo" on a platform that does not support the
"==" operator, the result will be "false" instead of "true". This can
lead to unexpected behavior.

There are two ways to fix this error message. If the file that contains
the "test ==" is needed for building the package, you should create a
patch for it, replacing the "==" operator with "=". If the file is not
needed, add its name to the CHECK_PORTABILITY_SKIP variable in the
package Makefile.


Obviously, the file that needs to be patched is really

and not


but anyroad, the place at which the oshmen stanza has used the "non-portable"
double-equals construct is shown in the following attempted patch

--- 2014-04-22 14:51:44.000000000 +0000
@@ -611,8 +611,8 @@ m4_ifdef([project_ompi], [OMPI_SETUP_MPI

- [test "$enable_oshmem" == "yes" -a "$ompi_fortran_happy" == "1" -a \
+ [test "$enable_oshmem" = "yes" -a "$ompi_fortran_happy" = "1" -a \
           "$enable_oshmem_fortran" != "no"])

 # checkpoint results

Someone may wish to give that the "once over" ahead of the 1.8.2 release, in
light of what PkgSrc considers to be portable.

All the best,
Kevin M. Buckley

eScience Consultant
School of Engineering and Computer Science
Victoria University of Wellington
New Zealand