#2216 mingw32-libintl : there is a link to /home/keith/staged/mingw32/libiconv.la

OTHER
closed
Bug
fixed
Unknown
False
2015-09-06
2014-05-26
hogren
No

Hello,

I discovered a bug when I was trying to compile glib.

There is a problem with the libintl dll of the mingw32-libintl package. There isn't the same problem with msys-libintl.

My system : Windows 7 pro SP1 32 bits

$gcc -v

Using built-in specs.

COLLECT_GCC=C:\MinGW4\bin\gcc.exe

COLLECT_LTO_WRAPPER=c:/mingw4/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe

Target: mingw32

Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T

Thread model: win32

gcc version 4.8.1 (GCC)

$ld -v
GNU ld (GNU Binutils) 2.23.2

$cat /mingw/include/_mingw.h | grep MINGW32_VERSION
#define __MINGW32_VERSION 3.20

$uname -a
MINGW32_NT-6.1 PORTABLE 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys

How to reproduce the bug :
-Install Mingw with msys, mingw32-libz, mingw32-libiconv.
-Download, compile and install libffi-3.1
-Download glib 2.40.0. Try to compile with this command :
$mkdir bld && cd bld
$LIBFFI_CFLAGS=-I/mingw/lib/libffi-3.1/include LIBFFI_LIBS=-lffi ../configure --prefix=/mingw
$make

These errors lines appear when gcc try to compile libcharset.la :
/bin/grep: /home/keith/staged/mingw32/lib/libiconv.la: No such file or directory
/bin/sed: can't read /home/keith/staged/mingw32/lib/libiconv.la: No such file or directory
libtool: link: `/home/keith/staged/mingw32/lib/libiconv.la' is not a valid libtool archive

I took many tests and :
- When I skip the compilation of libcharset.la (manual edit of the makefile), the error appears again with an other file. When I skip the second, it's appears again. And again and again.
- If you edit the config.status to remove -lintl in LIBS, the error message doesn't appear.
- If you remove the mingw32-libintl package or that you install gettext from official tarball, the error doesn't appear.
- I can't test to compile the sources of gettext from mingw project because I have a error of compilation about help2man.

I am in disposition for requested tests.

Regards,

Hogren

Discussion

  • Keith Marshall

    Keith Marshall - 2014-05-26

    Thanks for the report. I presume you are using my latest gettext-0.18.3.2 packages?

    Firstly, libintl isn't a component of WSL; that is (specifically) mingwrt-4.x + w32api-4.x, which you do not seem to be using, since you indicate you have __MINGW32_VERSION = 3.20

    Secondly, suggesting that I download some package, in which I have no interest whatsoever, to reproduce your problem, isn't an effective way to gain my sympathy, nor to persuade me to help you to follow up. Please try to create a SSCCE.

    That said, this seems to be libtool related. I'm thinking that perhaps the libtool library (.la) files, (which are likely valid for my build host only), should not be included in the distribution. Does it help, if you delete these from your /mingw/lib directory?

     
  • Keith Marshall

    Keith Marshall - 2014-05-26
    • Group: WSL --> OTHER
     
    • hogren

      hogren - 2014-05-26

      Thanks for the report. I presume you are using my latest
      gettext-0.18.3.2 packages?

      I downloaded the mingw-get yesterday.

      Firstly, libintl isn't a component of WSL; that is (specifically)
      mingwrt-4.x + w32api-4.x, which you do not seem to be using, since you
      indicate you have __MINGW32_VERSION = 3.20

      Sorry, error of reading.

      Secondly, suggesting that I download some package, in which I have no
      interest whatsoever, to reproduce your problem, isn't an effective way
      to gain my sympathy, nor to persuade me to help you to follow up.
      Please try to create a SSCCE [1].

      Ok for the SSCE.
      I don't need help (for this bug).
      I report it to help the project.
      I just solved the problem by install gettext from official gnu tarball.
      After that, I investigated for the fun and to try to help.

      That said, this seems to be libtool related. I'm thinking that perhaps
      the libtool library (.la) files, (which are likely valid for my build
      host only), should not be included in the distribution.
      Ok so you think that the error is that the file didn't have to be in the
      package ?

      Does it help,
      if you delete these from your /mingw/lib directory?
      Which file(s) precisly do you want that I delete ?
      just the libintl.la (I don't know if it exists, I am not in front of the
      W7 PC). I will try that and come back.

       
      • hogren

        hogren - 2014-05-27

        Does it help,
        if you delete these from your /mingw/lib directory?

        Which file(s) precisly do you want that I delete ?
        just the libintl.la (I don't know if it exists, I am not in front
        of the
        W7 PC). I will try that and come back.

        For info, it works fine by just removing the libintl.la as you say.

        Regards,
        Hogren

         
  • Yuri Rumega

    Yuri Rumega - 2014-12-02

    There is a workaround: just install older gettext - it works.

    mingw-get upgrade "gettext=0.18.3.1-1*"
    
     
  • David Macek

    David Macek - 2015-04-30

    I hit this problem today while building xz v5.2.1. The error can be produced by compiling any C program (e.g. main() { return 0; }) with this command libtool --tag=CC --mode=link gcc a.c -lintl -o a.exe in the MSYS shell. All packages are up to date.

    Removing /mingw/lib/libintl.la allows the compilation to finish successfully. I believe no *.la files should be distributed in the packages.

     
  • Keith Marshall

    Keith Marshall - 2015-05-01
    • status: unread --> pending
    • assigned_to: Keith Marshall
    • Resolution: none --> later
     
  • Keith Marshall

    Keith Marshall - 2015-05-01

    Yes. The solution does appear to be removal of the *.la files; that they were included in the package at all was a packaging error.

    Ultimately, I will need to prepare and upload new package tarballs, without the offending *.la files; unfortunately, I am unable to do so right now, and will not be able to get to it before August-2015. In the meantime, please simply accept my apologies, and delete the offending files from your /mingw/lib tree.

     
  • Erwin Meza

    Erwin Meza - 2015-09-03

    Hi, maybe it's too late.. You need to fix the line dependency_libs on libintl.a:

    dependency_libs=' -L/mingw/lib'

    Also ensure having C:/mingw on your fstab.

     
    Last edit: Erwin Meza 2015-09-03
    • Keith Marshall

      Keith Marshall - 2015-09-03

      Sorry, but why should I need to fix anything in a file, (assuming that your reference to libintl.a is a typo, and that you actually mean libintl.la), which should simply be deleted? That said, thanks for the reminder that this packaging bug still requires my attention.

       
  • Keith Marshall

    Keith Marshall - 2015-09-06
    • status: pending --> closed
    • Resolution: later --> fixed
     
  • Keith Marshall

    Keith Marshall - 2015-09-06

    This is now fixed by mingw-dist commit [79d68e], via this package set.

    For those who may care, note that this package set includes detached GPG signatures for each archive, signed by my RSA key with fingerprint C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F, available from keys.gnupg.net. I've also provided the SHA1 hashes for all said archives, in a similarly signed single downloadable checksum file.

     

    Related

    Commit: [79d68e]


    Last edit: Keith Marshall 2015-09-06