Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to link MPI apps with "--enable-static --disable-shared" master builds; missing zlib symbols #7560

Closed
jsquyres opened this issue Mar 23, 2020 · 5 comments

Comments

@jsquyres
Copy link
Member

Building master with --enable-static --disable-shared builds and installs ok, but when you try to build an MPI application, it fails to link, complaining that it can't find zlib symbols.

For example: https://mtt.open-mpi.org/index.php?do_redir=3212 -- the behavior is basically this:

$ mpicc hello_c.c -o hello
/home/jsquyres/bogus/lib/libopen-pal.a(compress_zlib.o): In function `pmix_compress_zlib_compress_block':
compress_zlib.c:(.text+0x8e): undefined reference to `deflateInit_'
compress_zlib.c:(.text+0xa8): undefined reference to `deflateBound'
compress_zlib.c:(.text+0xc9): undefined reference to `deflateEnd'
compress_zlib.c:(.text+0xf9): undefined reference to `deflateEnd'
compress_zlib.c:(.text+0x14c): undefined reference to `deflate'
compress_zlib.c:(.text+0x15e): undefined reference to `deflateEnd'
/home/jsquyres/bogus/lib/libopen-pal.a(compress_zlib.o): In function `pmix_compress_zlib_uncompress_block':
compress_zlib.c:(.text+0x349): undefined reference to `inflateInit_'
compress_zlib.c:(.text+0x39b): undefined reference to `inflate'
compress_zlib.c:(.text+0x3aa): undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status

The issue is that we recently removed the "compress" framework from OPAL in 66da0c6 (because nothing was using it). Therefore, the wrapper compiler flags no longer get -lz (or whatever "compress" library was selected). But that compress framework effectively migrated over to PMIx, where it is still used. But there's nothing propagating wrapper compiler flags up from PMIx's configure script to Open MPI's configure script.

@gpaulsen
Copy link
Member

Today @jsquyres reported that he and @bwbarrett discussed and that Brian is working on.
Adding Severity: critical, as this may impact both static and non-static builds.

@gpaulsen
Copy link
Member

@bwbarrett Is this work, part of the current configury work you're working on, or is this separate?

@bwbarrett
Copy link
Member

I'm not sure why this bug got assigned to me? No, this is not something I intend to fix as part of my patch series. I'm not entirely sure what the fix will be. With PMIx as a stand-alone project, dependency management of libraries just got really hard.

@rhc54
Copy link
Contributor

rhc54 commented Oct 1, 2020

I would have naively thought that the static build flag would propagate down to PMIx, which would then slurp libz into its static library - yes? So when OMPI then slurps libpmix into its static library, it all should wind up complete.

It sounds like the problem really is that the PMIx compress/zlib component isn't properly slurping in libz when configured static - correct?

@rhc54
Copy link
Contributor

rhc54 commented Mar 24, 2021

This now works on master

@rhc54 rhc54 closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants