GNU bug report logs - #24768
uninstalled executable does not work when compiling for 32-bit Cygwin

Previous Next

Package: libtool;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Sat, 22 Oct 2016 22:29:02 UTC

Severity: normal

To reply to this bug, email your comments to 24768 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#24768; Package libtool. (Sat, 22 Oct 2016 22:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Sat, 22 Oct 2016 22:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-libtool <at> gnu.org
Subject: uninstalled executable does not work when compiling for 32-bit Cygwin
Date: Sun, 23 Oct 2016 00:28:24 +0200
Hi,

A 64-bit Cygwin environment [on Windows 10 in my case] (canonical platform
triplet: x86_64-pc-cygwin) has the following cross-compilation toolchains
(all installable through setup-x86_64.exe):

  * i686-pc-cygwin            (32-bit Cygwin)
  * i686-w64-mingw32          (32-bit mingw)
  * x86_64-w64-mingw32        (64-bit mingw)

and the executables built with the corresponding *-gcc compilers work out-of-
the-box (since they are Windows executables).

The problem
-----------

When compiling for 32-bit Cygwin a package that uses GNU libtool to
create a shared library and link with this shared library, uninstalled
executables (i.e. the executables in the build tree before "make install")
do not work. In order to make them work it is necessary to augment PATH:
add the particular .libs directory(ies) that contain the library(ies) that
the program is linked against.

I think this is a bug because
  - Other platforms do not have this problem (not even 32-bit mingw or
    64-bit mingw).
  - The .libs directory is an undocumented internal of GNU libtool.

How to reproduce
----------------

The package below is a GNU libiconv snapshot with GNU libtool 2.4.6.

$ wget http://www.haible.de/bruno/gnu/libiconv-20161022.tar.gz
$ tar xvfz libiconv-20161022.tar.gz
$ cd libiconv

$ PATH=/usr/local/cygwin32/bin:/usr/i686-pc-cygwin/sys-root/usr/bin:$PATH
$ ./configure --host=i686-pc-cygwin --prefix=/usr/local/cygwin32 \
            CC=i686-pc-cygwin-gcc \
            CXX=i686-pc-cygwin-g++ \
            CPPFLAGS="-I/usr/local/cygwin32/include -Wall" \
            LDFLAGS="-L/usr/local/cygwin32/lib"
...
$ make
...
$ src/iconv_no_i18n.exe --help
$ echo $?
127
$ PATH=lib/.libs:$PATH src/iconv_no_i18n.exe --help
Usage: iconv_no_i18n.exe ...
...
$ echo $?
0

For comparison, it works when compiling to 32-bit mingw
-------------------------------------------------------

$ PATH=/usr/local/mingw32/bin:$PATH
$ ./configure --host=i686-w64-mingw32 --prefix=/usr/local/mingw32 \
            CC=i686-w64-mingw32-gcc \
            CXX=i686-w64-mingw32-g++ \
            CPPFLAGS="-I/usr/local/mingw32/include -Wall" \
            LDFLAGS="-L/usr/local/mingw32/lib"
...
$ make
...
$ src/iconv_no_i18n.exe --help
Usage: iconv_no_i18n.exe ...
...
$ echo $?
0


Best regards,

                 Bruno
--
In memoriam Nunilo and Alodia <http://en.wikipedia.org/wiki/Nunilo_and_Alodia>





Information forwarded to bug-libtool <at> gnu.org:
bug#24768; Package libtool. (Sat, 19 Nov 2016 00:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 24768 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-libtool <at> gnu.org
Cc: 24768 <at> debbugs.gnu.org
Subject: Re: uninstalled executable does not work when compiling for 32-bit
 Cygwin
Date: Sat, 19 Nov 2016 01:22:54 +0100
A more detailed analysis of the problem submitted in
http://lists.gnu.org/archive/html/bug-libtool/2016-10/msg00000.html
has been sent to the cygwin mailing list:
https://cygwin.com/ml/cygwin/2016-11/msg00242.html

The workaround is to build *outside* the /home and /usr file hierarchies of
Cygwin. Somewhere in /cygdrive/c/Users for example.

Bruno





Information forwarded to bug-libtool <at> gnu.org:
bug#24768; Package libtool. (Sat, 19 Nov 2016 00:27:02 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.