-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stealing some pieces of Josh Hursey's PR #1583 and modifying a bit, a…
…llow the opal/pmix external component to handle both PMIx 1.1.4 and PMIx 2.0 versions. Automatically detect the version of the target external library and adjust the only two APIs that changed (PMIx_Init and PMIx_Finalize) Rename temp vars in .m4 to avoid conflict with Travis
- Loading branch information
Ralph Castain
committed
May 27, 2016
1 parent
d25b846
commit 55923ea
Showing
6 changed files
with
176 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
dnl -*- shell-script -*- | ||
dnl | ||
dnl Copyright (c) 2016 IBM Corporation. All rights reserved. | ||
dnl $COPYRIGHT$ | ||
dnl | ||
dnl Additional copyrights may follow | ||
dnl | ||
dnl $HEADER$ | ||
dnl | ||
|
||
# Parameters: (use a version "1.1.4rc2" as the example) | ||
# * prefix | ||
# Will export a variable $prefix_version_cmp | ||
# - action_if_less => "less" | ||
# - action_if_equal => "equal" | ||
# - action_if_equal_series => "series" | ||
# - action_if_greater => "greater" | ||
# * version_actual | ||
# Actual version string | ||
# * version_desired | ||
# Desired version string to check against | ||
# * action_if_less | ||
# Action to take if the version is strictly less than | ||
# "1.1.3" < "1.1.4rc2" | ||
# * action_if_equal | ||
# Action to take if the version matches exactly | ||
# "1.1.4rc2" = "1.1.4rc2" | ||
# * action_if_equal_series | ||
# Action to take if the version matches to this series | ||
# "1.1.4rc1" ~=~ "1.1.4rc2" | ||
# "1.1.4" ~=~ "1.1.4rc2" | ||
# * action_if_greater | ||
# Action to take if the version is strictly greater than | ||
# "1.1.5" > "1.1.4rc2" | ||
# "2.0" > "1.1.4rc2" | ||
# | ||
# See documentation on m4_version_compare and AS_VERSION_COMPARE for more | ||
# precise definitions | ||
# OPAL_CHECK_VERSION(prefix, version_actual, version_desired, | ||
# action_if_less, action_if_equal, action_if_equal_series, | ||
# action_if_greater) | ||
# ---------------------------------------------------- | ||
AC_DEFUN([OPAL_CHECK_VERSION],[ | ||
version_actual=$2 | ||
version_desired=$3 | ||
|
||
AC_MSG_CHECKING([Checking library version is $version_desired]) | ||
# | ||
# Example: If version_desired=1.1.4 and | ||
# version_actual=1.1.3 -> -1 | ||
# version_actual=1.1.4 -> 0 | ||
# version_actual=1.1.4rc1 -> 1 | ||
# version_actual=1.1.5 -> 1 (need further check) | ||
# | ||
AS_VERSION_COMPARE(["$version_actual"], [$version_desired], | ||
[AC_MSG_RESULT([Earlier than expected ($version_actual < $$version_desired)]) | ||
$1_version_cmp="less" | ||
$4], | ||
[AC_MSG_RESULT([Equal]) | ||
$1_version_cmp="equal" | ||
$5], | ||
[ | ||
# Need further check to make sure we are < 1.1.5 | ||
# version_actual=1.1.4rc1 -> -1 | ||
# version_actual=1.1.4 -> 0 (caught above) | ||
# version_actual=1.1.5 -> 1 | ||
AS_VERSION_COMPARE(["$version_actual"], [$version_desired"zzzz"], | ||
[AC_MSG_RESULT([Within release series ($version_actual)]) | ||
$1_version_cmp="series" | ||
$6], | ||
[AC_MSG_RESULT([Within release series ($version_actual)]) | ||
$1_version_cmp="series" | ||
$6], | ||
[AC_MSG_RESULT([Later than expected ($version_actual > $$version_desired)]) | ||
$1_version_cmp="greater" | ||
$7] | ||
)] | ||
) | ||
])dnl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55923ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jjhursey @rhc54 @jsquyres
i got some error because of this commit.
the root cause is external pmix is not in my
LD_LIBRARY_PATH
in my environmentthe inline patch
LD_LIBRARY_PATH
(vs overwrite)LD_LIBRARY_PATH
AC_RUN_IFELSE
instead of deprecatedAC_TRY_RUN
it might be easier/better to check pmix version by compiling some test programs (with
#if
and#error
) instead of building one and running it. no more need to set/restoreLD_LIBRARY_PATH
and no more error when cross compiling.bottom line, i did not commit that patch.
any thoughts ?
55923ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and created a new PR #1730 with this patch. There are two alternative approaches we have considered:
So hopefully this will work for now, and we'll go with one of the above fairly soon.
55923ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is a patch that uses
PMIX_VERSION
only PMIx include files are required, and there is no need to link with PMIx libs.
that being said, a program has to run, and hence, it still does not work when cross compiling.