fix check in Score-P's configure scripts that may fail if the path to certain dependencies include yes or no#3496
Conversation
|
Thanks a lot for the PR. The fix certainly goes in the correct direction, but doesn't fully fix the issue. With the proposed change, passing This is the broken check in Score-P 8.x (https://gitlab.com/score-p/scorep/-/blob/b84a3703563b61d99312169b4f6a6cef1c050005/build-config/common/m4/afs_external_lib.m4#L209): AS_CASE([${_afs_lib_withval_lib}${_afs_lib_withval_include}],
[*yes*|*no*], [AC_MSG_ERROR([Both, --with-_afs_lib_name-lib and --with-_afs_lib_name-include require a <path>.])],
[...]our current idea is to replace this with the following block (not yet tested): [AS_CASE([${_afs_lib_withval_lib},${_afs_lib_withval_include}],
[yes,*|no,*|*,yes|*,no], [AC_MSG_ERROR([Both, --with-_afs_lib_name-lib and --with-_afs_lib_name-include require a <path>.])],
[...]This should fix the issue reported in https://gitlab.com/score-p/scorep/-/issues/1008. Fixing this in the EasyBlock will require a few more replacements aside from the one for However, given that the EasyBlock always tries to pass full paths for the dependencies this fix might be sufficient enough for now |
|
Oh, right, I overlooked that the values are concatenated. Thanks! I'll change the regex and replace it by the one you provided (
The current regex should replace all |
…ues are concatened
There's a very tiny additional difference, which is needed for the check to succeed: - AS_CASE([${_afs_lib_withval_lib}${_afs_lib_withval_include}],
+ AS_CASE([${_afs_lib_withval_lib},${_afs_lib_withval_include}],In the resulting configure, this means that the check for --- build-backend/configure.old 2024-10-29 12:44:11.495387487 +0100
+++ build-backend/configure 2024-10-29 12:44:40.043430447 +0100
@@ -37729,8 +37729,8 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_libbfd_lib}${with_libbfd_include} in #(
- *yes*|*no*) :
+ case ${with_libbfd_lib},${with_libbfd_include} in #(
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libbfd-lib and --with-libbfd-include require a <path>." "$LINENO" 5 ;; #(
*) :
@@ -46862,8 +46862,8 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_libunwind_lib}${with_libunwind_include} in #(
- *yes*|*no*) :
+ case ${with_libunwind_lib},${with_libunwind_include} in #(
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libunwind-lib and --with-libunwind-include require a <path>." "$LINENO" 5 ;; #(
*) :
@@ -53492,8 +53492,8 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_libnvToolsExt_lib}${with_libnvToolsExt_include} in #(
- *yes*|*no*) :
+ case ${with_libnvToolsExt_lib},${with_libnvToolsExt_include} in #(
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libnvToolsExt-lib and --with-libnvToolsExt-include require a <path>." "$LINENO" 5 ;; #(
*) :
@@ -57476,8 +57476,8 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_liblustreapi_lib}${with_liblustreapi_include} in #(
- *yes*|*no*) :
+ case ${with_liblustreapi_lib},${with_liblustreapi_include} in #(
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-liblustreapi-lib and --with-liblustreapi-include require a <path>." "$LINENO" 5 ;; #(
*) :
That's true. We call the same check for |
|
This additional change should be sufficient to add the $ diff -u build-backend/configure.old build-backend/configure
$ sed -i 's/_lib}${with_/_lib},${with_/g' build-*/configure
$ diff -u build-backend/configure.old build-backend/configure
--- build-backend/configure.old 2024-10-29 12:44:11.495387487 +0100
+++ build-backend/configure 2024-10-29 12:57:00.940559462 +0100
@@ -37729,7 +37729,7 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_libbfd_lib}${with_libbfd_include} in #(
+ case ${with_libbfd_lib},${with_libbfd_include} in #(
*yes*|*no*) :
as_fn_error $? "Both, --with-libbfd-lib and --with-libbfd-include require a <path>." "$LINENO" 5 ;; #(
*) :
@@ -46862,7 +46862,7 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_libunwind_lib}${with_libunwind_include} in #(
+ case ${with_libunwind_lib},${with_libunwind_include} in #(
*yes*|*no*) :
as_fn_error $? "Both, --with-libunwind-lib and --with-libunwind-include require a <path>." "$LINENO" 5 ;; #(
*) :
@@ -53492,7 +53492,7 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_libnvToolsExt_lib}${with_libnvToolsExt_include} in #(
+ case ${with_libnvToolsExt_lib},${with_libnvToolsExt_include} in #(
*yes*|*no*) :
as_fn_error $? "Both, --with-libnvToolsExt-lib and --with-libnvToolsExt-include require a <path>." "$LINENO" 5 ;; #(
*) :
@@ -57476,7 +57476,7 @@
fi ;;
esac ;; #(
set2set3) :
- case ${with_liblustreapi_lib}${with_liblustreapi_include} in #(
+ case ${with_liblustreapi_lib},${with_liblustreapi_include} in #(
*yes*|*no*) :
as_fn_error $? "Both, --with-liblustreapi-lib and --with-liblustreapi-include require a <path>." "$LINENO" 5 ;; #(
*) : |
|
Thanks @Thyre , I was clearly too hasty here... 😅 I've added the additional regex, and also added a fix for the other one, as it didn't completely do the right thing. I've just done a build with the latest changes, and got the following diff for these two configure scripts: I think this is the right result? Edit: let me also change the |
|
This seems to look good now, yeah. Any objections @cfeld, @geimer?
We need to touch I'll do some test installations later on our systems if I find the time, hopefully today. |
|
Also applied the same regex to |
yes|no instead of *yes*|*no* in Score-P's configure scriptsyes or no
|
Test report by @bedroge Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
|
@boegelbot please test @ generoso |
|
@bedroge: Request for testing this PR well received on login1 PR test command '
Test results coming soon (I hope)... Details- notification for comment with ID 2444177078 processed Message to humans: this is just bookkeeping information for me, |
|
Tested on a whole bunch of CPUs (including three Arm CPUs, all of them have |
|
Test report by @boegelbot Overview of tested easyconfigs (in order)
Build succeeded for 3 out of 5 (4 easyconfigs in total) |
|
The failure in #3496 (comment) is due to a failed download of PDT and not relevant to this PR |
This prevents issues with dependencies located in paths containing
yesorno, see:https://gitlab.com/score-p/scorep/-/issues/1008
I'm restricting this to versions 8.0-8.4, as @Thyre mentioned that it will probably be fixed soon, and version 7 doesn't seem to have this check.