Closed cianciosa closed 11 months ago
I'm able to reproduce the issue.
Well, that's awesome (in a rhymes-with-aaaaaaarrrrgggghhh kind of way). We were literally just about to release v4.1.6.
Let us dig into this a little...
I note that this issue does not occur on the upcoming v5.0.x branch. We've done a large overhaul of the assembly support in v5.0.x; so it's not entirely unsurprising that the issue is actually fixed over there.
Well investigating a different issue in another project someone pointed out a there's a new linker.
I can confirm that by using the command
./configure LDFLAGS="-ld_classic"
invokes the old linker which doesn't have this issue.
(Hi, Homebrew maintainer here.) Yes, the new linker has quite a number of missing features or bugs. But the old linker will go away at some point, so I would encourage all affected users to file a Feedback with Apple (and share the number here, please). Any regression should be treated: what is the ASM that was working before, and how does it behave now.
The workaround of the classic linker is a good way to build for now, but it is only a workaround.
Reported to Apple as FB13194320. Content of the report is copied there: https://gist.github.com/fxcoudert/7127b8f92223dd2131f191b8b5f6e549
We'll have a patch to fix out today. We had actually removed the hand-coded assembly files before the 4.0 series started, but as an oversight left some of the configuration tests in place. We're going to remove the (unneeded and now broken) tests and the Apple linker will be happy.
I don't think the issue is the linker. Empty assembly functions end up not being in the compiled file, and this leads to inability to link against. There is a really simple fix:
diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4
index 5183c7e082..282ac5dc04 100644
--- a/config/opal_config_asm.m4
+++ b/config/opal_config_asm.m4
@@ -474,6 +474,7 @@ AC_DEFUN([OPAL_CHECK_ASM_PROC],[
OPAL_TRY_ASSEMBLE([
.proc mysym
mysym:
+ ret
.endp mysym],
[opal_cv_asm_need_proc="yes"])
rm -f conftest.out])
It can be augmented with the next patch to prevent picky compilers from complaining about incorrect prototypes.
diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4
index 5183c7e082..282ac5dc04 100644
--- a/config/opal_config_asm.m4
+++ b/config/opal_config_asm.m4
@@ -527,7 +528,7 @@ void gsym_test_func(void);
}
#endif
int
-main()
+main(void)
{
gsym_test_func();
return 0;
Note, that these patches need to be propagated upstream to all projects inheriting our asm detection.
v4.1.x
branch, which should address this issue.@cianciosa @fxcoudert Could you try building the HEAD of the v4.1.x
branch? Or you can wait for a new snapshot tarball to be generated this evening (https://www.open-mpi.org/nightly/v4.1.x/).
@jsquyres I can confirm there are no more configuration errors.
I'm going to close this as fixed; @fxcoudert let us know if you run any further issues.
Thank you for taking the time to submit an issue!
Background information
After updating to Xcode 15, I can no longer configure the build. When attempting to build from source the configure command fails with the following error.
What version of Open MPI are you using? (e.g., v3.0.5, v4.0.2, git branch name and hash, etc.)
openmpi-4.1.5
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
Build from source tarball.
If you are building/installing from a git clone, please copy-n-paste the output from
git submodule status
.Please describe the system on which you are running
Details of the problem
Full output of the configure command is
The config log file shows the error