I have a problem with "make install" of a built executable.
I'm confused.
Background: the only reason you ever need a wrapper script for an executable in a libtoolized project, is when that executable depends on an uninstalled shared library. You need the wrapper script to set PATH (and LD_LIBRARY_PATH on other platforms) so that the runtime loader can find the shared library.
BUT, if you do not depend on any (uninstalled) shared libraries, then you don't need a wrapper script...so it shouldn't be created at all, and the "real" executable should be in the build directory, not in .libs/
Its wrapper script contains: ---------------8<---------------- relink_command=""
# This environment variable determines our operation mode. if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then # install mode needs the following variable: notinst_deplibs='' else ---------------8<----------------
This comes from this fragment:
if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else
and make install fails with:
libtool: install: invalid libtool wrapper script `xsendbut'
This is because this test is true in ltmain.m4sh: ---------------8<---------------- # Check the variables that should have been set. test -z "$notinst_deplibs" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" ---------------8<----------------
Adding a space between the '' in the wrapper script makes it work, of course.
Right. This is part of the integrity checks built in to libtool -- since the ONLY thing you know about any exe wrapper script is it darn well better define noninst_deplibs (otherwise, there should be no wrapper). So, to check that it successfully sourced something that WAS in fact a wrapper script, libtool tries to make sure that notinst_deplibs got set. ('cause if it didn't, then there are probably other significant problems, like an incorrect $relink_cmd, etc)
In your case, you have a wrapper script -- but an empty noninst_deplibs. One of two things is true:
(1) your exe really truly does not depend on any uninstalled libraries. --> so need to investigate WHY a wrapper script was created at all. or
(2) your exe DOES have uninstalled library dependencies --> so need to investigate WHY they went unrecorded in the wrapper.
Needless to say, I haven't observed that behavior here.
BTW, does your version of libtool contain this ChangeLog entry?
2004-10-09 Charles Wilson <spam.protected>
* config/ltmain.m4sh (func_mode_link): don't relink on cygwin/mingw; no need. But do ensure that wrappers are created unless doing a purely static build.
'cause it touches exactly this bit of code.
-- Chuck
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/