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

RFC: Remove embedded libltdl #366

Closed

Conversation

jsquyres
Copy link
Member

Per #311, and per the discussions in the Dallas OMPI dev meeting, remove the embedded libltdl from Open MPI.

There are two minor commits and then the major commit of removing the libltdl:

  1. Remove some extraneous $(LTDLINCL)s
  2. Add lt_dladvise support into ompi_info and friends
  3. Remove embedded libltdl

There was some discussion in Dallas about what the default should be if libltdl support is not found on a machine when building Open MPI. Here's the behavior defined in the initial version of this PR, which I think gives a good compromise of what everyone wanted:

  • If --disable-dlopen is specified, it behaves as it always has: libltdl support is wholly disabled, and all plugins are slurped into their higher-level libraries.
  • If --enable-dlopen is specified, configure will abort if it cannot find properl libltdl support.
  • If neither of these are specified, configure will behave differently between a developer build (i.e., where a .git directory is present in the source tree) and non-developer build:
    • In a developer build, --enable-dlopen is assumed (i.e., configure will abort if libltdl support cannot be found). --disable-dlopen must be specified if you do not have libltdl support.
    • In a non-developer build:
      • If configure finds libltdl support, it will build dlopen support and build plugins as DSOs.
      • If configure does not find libltdl support, it will disable dlopen support and slurp plugins into higher level libraries.

The developer build behavior is because dlopen support is usually highly valued (e.g., being able to repeatedly build individual plugins), and libltdl-devel may not be installed by default on Linux distros and OSX. Hence, developers may inadvertently build without dlopen support without this special developer-build provision.

@jsquyres jsquyres force-pushed the topic/remove-embedded-libltdl branch from 79425da to 625dec4 Compare January 30, 2015 01:21
@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/199/

Build Log
last 50 lines

[...truncated 1691 lines...]
checking for struct statvfs.f_basetype... no
checking for struct statvfs.f_fstypename... no
checking for pointer diff type... ptrdiff_t (size: 8)
checking for type of MPI_Aint... ptrdiff_t (size: 8)
checking for type of MPI_Count... long long (size: 8)
checking for type of MPI_Offset... long long (size: 8)
checking for an MPI datatype for MPI_Offset... MPI_LONG_LONG
checking for MPI_INTEGER_KIND... 4
checking for MPI_ADDRESS_KIND... 8
checking for MPI_COUNT_KIND... 8
checking for MPI_OFFSET_KIND... 8

============================================================================
== Library and Function tests
============================================================================
checking for library containing openpty... -lutil
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing sched_yield... none required
checking for library containing dirname... none required
checking for library containing ceil... -lm
checking for library containing clock_gettime... -lrt
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
configure: WARNING: Cannot find libltdl support,
configure: WARNING: but --enable-dlopen was specified
configure: WARNING: or this is a developer build.
configure: error: Cannot continue.
+ '[' no = yes ']'
+ '[' no = yes ']'
+ '[' -n 1 ']'
+ '[' no = yes ']'
++ echo /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1
+ for OMPI_HOME in '$(echo $ompi_home_list)'
+ '[' yes = yes ']'
+ exe_dir=/var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1/examples
+ '[' '!' -d /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1/examples ']'
+ echo 'Running examples for /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1'
Running examples for /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1
+ cp -prf /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/examples /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1
+ PATH=/var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1/bin:/hpc/local/bin::/usr/local/bin:/bin:/usr/bin:/usr/sbin:/hpc/local/bin:/hpc/local/bin/:/hpc/local/bin/:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/opt/ibutils/bin
+ LD_LIBRARY_PATH=/var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1/lib:
+ make -C /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1/examples all
make: *** /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace/ompi_install1/examples: No such file or directory.  Stop.
Build step 'Execute shell' marked build as failure
[BFA] Scanning build for known causes...

[BFA] Done. 0s

Test FAILed.

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/200/

Build Log
last 50 lines

[...truncated 1691 lines...]
checking for struct statvfs.f_basetype... no
checking for struct statvfs.f_fstypename... no
checking for pointer diff type... ptrdiff_t (size: 8)
checking for type of MPI_Aint... ptrdiff_t (size: 8)
checking for type of MPI_Count... long long (size: 8)
checking for type of MPI_Offset... long long (size: 8)
checking for an MPI datatype for MPI_Offset... MPI_LONG_LONG
checking for MPI_INTEGER_KIND... 4
checking for MPI_ADDRESS_KIND... 8
checking for MPI_COUNT_KIND... 8
checking for MPI_OFFSET_KIND... 8

============================================================================
== Library and Function tests
============================================================================
checking for library containing openpty... -lutil
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing sched_yield... none required
checking for library containing dirname... none required
checking for library containing ceil... -lm
checking for library containing clock_gettime... -lrt
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
configure: WARNING: Cannot find libltdl support,
configure: WARNING: but --enable-dlopen was specified
configure: WARNING: or this is a developer build.
configure: error: Cannot continue.
+ '[' no = yes ']'
+ '[' no = yes ']'
+ '[' -n 1 ']'
+ '[' no = yes ']'
++ echo /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1
+ for OMPI_HOME in '$(echo $ompi_home_list)'
+ '[' yes = yes ']'
+ exe_dir=/var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1/examples
+ '[' '!' -d /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1/examples ']'
+ echo 'Running examples for /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1'
Running examples for /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1
+ cp -prf /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/examples /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1
+ PATH=/var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1/bin:/hpc/local/bin::/usr/local/bin:/bin:/usr/bin:/usr/sbin:/hpc/local/bin:/hpc/local/bin/:/hpc/local/bin/:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/opt/ibutils/bin
+ LD_LIBRARY_PATH=/var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1/lib:
+ make -C /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1/examples all
make: *** /var/lib/jenkins/jobs/gh-ompi-master-pr/workspace-2/ompi_install1/examples: No such file or directory.  Stop.
Build step 'Execute shell' marked build as failure
[BFA] Scanning build for known causes...

[BFA] Done. 0s

Test FAILed.

@jsquyres
Copy link
Member Author

@miked-mellanox Can you please install libltdl-devel on the build system (or whatever RPM includes ltdl.h)?

@rhc54
Copy link
Contributor

rhc54 commented Jan 30, 2015

Also need to warn all MTT installations!

@mike-dubman
Copy link
Member

retest this please

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/201/
Test PASSed.

@mike-dubman
Copy link
Member

done, btw on rhel 6.5 it is libtool-ltdl-devel

@jsquyres
Copy link
Member Author

Yes, good point -- MTT installations as a good barometer for what will happen in the rest of the world...

I.e., I'll bet that that with this RFC, many (most?) users will effectively be building with --disable-dlopen. This may not be a tragedy, though.

@jsquyres jsquyres changed the title Remove embedded libltdl RFC: Remove embedded libltdl Jan 30, 2015
@jsquyres jsquyres force-pushed the topic/remove-embedded-libltdl branch from 625dec4 to a8ce0fc Compare January 30, 2015 11:34
@mike-dubman
Copy link
Member

maybe --disable-dlopen should be the default than?
when --disable-dlopen is used, does it mean that rpath and compile time linker is used instead?

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/202/
Test PASSed.

@jsquyres
Copy link
Member Author

There is an assumption that developers will highly value dlopen functionality. See what I just posted here: http://www.open-mpi.org/community/lists/devel/2015/01/16851.php

Actually, I take back what I said above: if MTT installations are only testing tarballs, they won't see this problem (because they'll all build with --disable-dlopen by default if there is no ltdl-devel support). And if MTT installations are only testing with already-installed MTT install sections, then MTT won't be affected by whether ltdl-devel is available or not.

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/203/
Test PASSed.

@jsquyres jsquyres force-pushed the topic/remove-embedded-libltdl branch from 9f0b3fc to b429e2a Compare January 30, 2015 22:55
@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/204/
Test PASSed.

@jsquyres jsquyres force-pushed the topic/remove-embedded-libltdl branch from b429e2a to 1be0cfd Compare February 3, 2015 00:16
@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/207/
Test PASSed.

@jsquyres jsquyres force-pushed the topic/remove-embedded-libltdl branch from 1be0cfd to 66b383f Compare February 7, 2015 14:26
@jsquyres jsquyres added this to the Open MPI 1.9 milestone Feb 7, 2015
@jsquyres jsquyres self-assigned this Feb 7, 2015
@jsquyres
Copy link
Member Author

jsquyres commented Feb 7, 2015

This PR is one option for fixing #311.

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/214/
Test PASSed.

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/224/
Test PASSed.

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/226/
Test PASSed.

@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/227/
Test PASSed.

Per open-mpi#311, Libtool v2.4.4 exposes a bug in either Libtool
and/or autoreconf (after discussions with Libtool and Autoconf
maintainers, it's not clear which) when embedding libltdl.

After some discussion in the Open MPI community, we have decided to
both remove our embedded libltdl and (mostly) treat libltdl like any
other external library:

* If --disable-dlopen is specified, it behaves as it always has:
  libltdl support is wholly disabled, and all plugins are slurped into
  their higher-level libraries.
* If --enable-dlopen is specified, configure will abort if it cannot
  find proper libltdl support.
* If neither of these are specified, configure will behave differently
  between a developer build (i.e., where a .git directory is present
  in the source tree) and non-developer build:
  * In a developer build, --enable-dlopen is assumed (i.e., configure
    will abort if libltdl support cannot be found). --disable-dlopen
    must be specified if you do not have libltdl support.
  * In a non-developer build:
    * If configure finds libltdl support, it will behave as if
      --enable-dlopen was specified.
    * If configure does not find libltdl support, it will behave as if
      --disable-dlopen was specified.

The developer build behavior is because dlopen support is usually
highly valued (e.g., being able to repeatedly build individual
plugins), and libltdl-devel may not be installed by default on Linux
distros and OSX.  Hence, without this special developer-build
provision, developers may inadvertently build without dlopen support.

Fixes open-mpi#311.
@jsquyres jsquyres force-pushed the topic/remove-embedded-libltdl branch from 6044741 to dd30ed4 Compare February 11, 2015 20:49
@mellanox-github
Copy link

Refer to this link for build results (access rights to CI server needed):
http://bgate.mellanox.com/jenkins/job/gh-ompi-master-pr/228/
Test PASSed.

@jsquyres
Copy link
Member Author

Per discussion on the 17 Feb 2015 Tuesday webex, we have decided to use the "embed libltdl" approach (i.e., #390) instead of this "remove libltdl" approach. So I'm closing this PR.

@jsquyres jsquyres closed this Feb 17, 2015
@jsquyres jsquyres deleted the topic/remove-embedded-libltdl branch July 9, 2015 17:56
jsquyres pushed a commit to jsquyres/ompi that referenced this pull request Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OMPI cannot build with Libtool 2.4.3 and above
4 participants