-
Notifications
You must be signed in to change notification settings - Fork 289
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
Bug in libmesh libtool script affecting Fortran and shared libs #107
Comments
This thread: http://lists.gnu.org/archive/html/bug-libtool/2012-03/msg00004.html seems to shed some light on the situation. If you run mpif90 -shared -g -v it emits the following:
on the last line, you can see the spaces in "-l gfortran" and "-l m" which is what's hosing libtool. It looks like no one ever responded to the guy though... |
Hmm... Maybe it should get pointed out to the mpich guys? -Ben On Jun 18, 2013, at 10:53 PM, "jwpeterson" <[email protected]mailto:[email protected]> wrote: This thread: http://lists.gnu.org/archive/html/bug-libtool/2012-03/msg00004.html seems to shed some light on the situation. If you run mpif90 -shared -g -v it emits the following: $ mpif90 -shared -g -v on the last line, you can see the spaces in "-l gfortran" and "-l m" which is what's hosing libtool. It looks like no one ever responded to the guy though... — |
You're right, it does seem to be mpich's mpif90 wrapper which causes this problem. If I just run gfortran -shared -v it doesn't print that weird "Driving:" line at all. I don't have an OpenMPI stack handy on Linux at the moment, but I bet it doesn't have that problem either. |
Since it's unlikely mpich will change their compiler wrappers any time soon, or that libtool will do some internal parsing of what compilers spit back to it, my thought was to just fix up the libtool script during the 'make install' process. Looking at Makefile.am, it seems like the "install-data-hook" target might be the appropriate place to do this. So.
|
On Jun 24, 2013, at 10:30 AM, "jwpeterson" [email protected] wrote:
Yes. Such hooks are provided for arbitrary user-level mucking around, which sounds appropriate for this need.
Sure.
No. If you edit Makefile.am and the type make, it should do the right thing - e.g. regenerate Makefile.in and Makefile. -Ben |
@benkirk could you take a look at this patch and see if it's OK? It works for me on the one linux system I have which demonstrates the problem, mostly I wonder if |
Metis has been licensed under vanilla Apache 2.0 since version 5.0.3: metis-5.0.3 ------------------------------------------------------------------------ r13822 | karypis | 2013-03-11 14:40:11 -0500 (Mon, 11 Mar 2013) - Fixed the bug that was introduced in 5.x for creating nodal graphs from meshes (flyspray issue libMesh#107). - Changed the license to Apache Version 2. We currently distribute a slightly patched version of Metis 5.1.0 (our contrib version was last updated Apr 22, 2013 in 1c4b6a0, 5.1.0 was released on 2013-03-29). At the time of that refresh, we apparently did not pick up a copy of LICENSE.txt, so this commit adds that file.
We have some folks trying to use the libmesh-generated libtool script to link Fortran libraries and executables on Linux. It may be the first time someone has tried this (?) and therefore we've never noticed the issue before, but I think I've tracked it down to the "postdeps" line in the "FC" section of $LIBMESH_DIR/contrib/bin/libtool, which I've pasted below.
As you can see, there are two naked "-l" flags in this variable, and whenever libtool tries to use it to link a Fortran shared library, it obviously fails.
Unfortunately I don't know where to go from here in debugging the problem... note that it doesn't seem to affect Macs: the postdeps line is just blank for that OS. Also, if I hand edit the libtool script file and remove those -l's things seem to work fine.
The text was updated successfully, but these errors were encountered: