lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] "using cross tools not prefixed with host triplet"


From: Greg Chicares
Subject: Re: [lmi] "using cross tools not prefixed with host triplet"
Date: Thu, 25 Aug 2016 00:29:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

On 2016-08-24 23:09, Vadim Zeitlin wrote:
> On Wed, 24 Aug 2016 22:35:15 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> Which of these is the appropriate name for a cross archiver?
> GC>   i686-w64-mingw32-ar
> GC>   i686-w64-mingw32-gcc-ar
> 
>  I think these two are different things and the real (cross) archiver is
> the first one, while the second one seems to be some LTO helper, according
> to e.g. this post: https://gcc.gnu.org/ml/gcc-help/2012-03/msg00100.html

Oh. I should have googled that before jumping to the conclusion that this
was a MinGW-w64 packaging error. But trying to run those programs gives a
"plugin" message as in that post you cited:

$/MinGW_/bin/i686-w64-mingw32-gcc-nm.exe --help

C:/opt/lmi/MinGW-4_9_1/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/nm.exe:
 \
sorry - this program has been built without plugin support

> GC> Running 'install_wx.make' (lmi HEAD--pushed a minute ago) in cygwin, I 
> see:
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I think pulling the latest may be important because of:
  599b43a... Find toolchain on PATH instead of specifying location of each tool
Formerly, I was doing this sort of thing:

./configure \
-       AR='$(mingw_bin_dir)/$(triplet_prefix)ar' \

-       AS='$(mingw_bin_dir)/$(triplet_prefix)as' \

-       CC='$(mingw_bin_dir)/$(triplet_prefix)gcc' \


but now I'm passing the toolchain's $PATH and letting autotools figure it out.

BTW, with changes I'm about to commit, libxml2's 'configure' gives...

checking for i686-w64-mingw32-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet

...so this issue is observed there too (not only with wx).

> GC> checking for i686-w64-mingw32-ar... no
> GC> checking for ar... ar
> GC> configure: WARNING: using cross tools not prefixed with host triplet
> GC> 
> GC> Here's what MinGW-w64 provides ({prefix}-gcc-ar, {prefix}-gcc-nm...):
> GC> 
> GC> $ls /MinGW_/bin/i686-w64-mingw32*
> GC> /MinGW_/bin/i686-w64-mingw32-c++.exe
> GC> /MinGW_/bin/i686-w64-mingw32-g++.exe
> GC> /MinGW_/bin/i686-w64-mingw32-gcc-4.9.1.exe
> GC> /MinGW_/bin/i686-w64-mingw32-gcc-ar.exe
> GC> /MinGW_/bin/i686-w64-mingw32-gcc-nm.exe
> GC> /MinGW_/bin/i686-w64-mingw32-gcc-ranlib.exe
> GC> /MinGW_/bin/i686-w64-mingw32-gcc.exe
> GC> /MinGW_/bin/i686-w64-mingw32-gfortran.exe
> 
>  Strange, under Cygwin I have
> 
> % print -l $commands |grep '[/-]ar$'|xargs ls -l
> -rwxr-xr-x 2 zeitlin None  764455 Jan  8  2015 /usr/bin/ar
> -rwxr-xr-x 2 zeitlin None   26653 Jul  2  2015 /usr/bin/gcc-ar
> -rwxr-xr-x 2 zeitlin None   26653 Jul  2  2015 /usr/bin/i686-pc-cygwin-gcc-ar
> -rwxr-xr-x 2 zeitlin None  680477 Jul  4  2013 /usr/bin/i686-pc-mingw32-ar
> -rwxr-xr-x 1 zeitlin None   19982 Jul 17  2013 /usr/bin/i686-pc-mingw32-gcc-ar
> -rwxr-xr-x 2 zeitlin None  790045 May  4  2015 /usr/bin/i686-w64-mingw32-ar
> -rwxr-xr-x 1 zeitlin None   26653 Jun 18  2015 
> /usr/bin/i686-w64-mingw32-gcc-ar
> -rwxr-xr-x 2 zeitlin None 1031709 Mar  3  2015 /usr/bin/x86_64-pc-cygwin-ar
> -rwxr-xr-x 1 zeitlin None   26653 Mar  3  2015 
> /usr/bin/x86_64-pc-cygwin-gcc-ar
> -rwxr-xr-x 2 zeitlin None 1049117 Mar 22  2015 /usr/bin/x86_64-w64-mingw32-ar
> -rwxr-xr-x 1 zeitlin None   26653 Jun 19  2015 
> /usr/bin/x86_64-w64-mingw32-gcc-ar
> 
> i.e. I do have both versions.

I get only:

/lmi/src/lmi[0]$print -l $commands |grep '[/-]ar$'|xargs ls -l

-rwxr-xr-x 2 earl None 857117 Oct 11  2015 /usr/bin/ar

But I've installed MinGW-w64 to /MinGW_/bin/ , which is not on $PATH.
Adding that to $PATH (as lmi's 'install_*' makefiles now do) and repeating:

$path=(/MinGW_/bin $path)
$print -l $commands |grep '[/-]ar$'|xargs ls -l

-rwxr-xr-x 1 earl None 900096 Oct 30  2014 /MinGW_/bin/ar

-rwxr-xr-x 1 earl None  54784 Oct 30  2014 /MinGW_/bin/gcc-ar

-rwxr-xr-x 1 earl None  54784 Oct 30  2014 /MinGW_/bin/i686-w64-mingw32-gcc-ar


I haven't installed Cygwin's own gcc, so I shouldn't have anything
with a 'i686-pc-cygwin' prefix. And I'm using 32-bit cygwin, so I
should have nothing prefixed 'x86_64-' either. The only mystery is why
I have no 'i686-w64-mingw32-ar'. BTW, I'm using 'install_mingw.make'
to install the toolchain; it basically just downloads the MinGW-w64
tarball and extracts it with bsdtar (because they provide only '.7z').
Their tarball is native msw, and generally used without cygwin, so I
don't imagine their tarball would contain symlinks that bsdtar could
have failed to extract.

But lmi builds and runs when built this way, so somehow it does work.

> GC> BTW, wxPdfDoc's configure script reports:
> GC> 
> GC> checking for i686-w64-mingw32-ranlib... no
> GC> checking for ranlib... ranlib
> GC> configure: WARNING: using cross tools not prefixed with host triplet
> 
>  This definitely looks wrong, surely the host ranlib can't be used when
> cross-compiling.

My initial guess was that maybe a cygwin ranlib would work because it's
PE, not ELF. However:

$path=(/MinGW_/bin $path)
$whence ranlib

/MinGW_/bin/ranlib

it appears that a MinGW-w64 ranlib is actually being used, which is
probably identical to what i686-w64-mingw32-ranlib would be if it
existed.

>  I don't have access to the Linux machine on which I've been cross-building
> lmi right now, but I'll recheck what happens there when I get it back.

Switching over to my GNU/Linux chroot (where building is so fast that
I can afford to waste cycles like this):

/opt/lmi/src/lmi[0]$make $coefficiency --output-sync=recurse -f 
install_wxpdfdoc.make |grep cross
checking whether we are cross compiling... yes

No "using cross tools not prefixed" warning there. Furthermore, in
that environment I do have a prefixed 'ar':

$print -l $commands |grep '[/-]ar$'|xargs ls -l
-rwxr-xr-x 1 root root  56280 Feb 25  2015 /usr/bin/ar
lrwxrwxrwx 1 root root     10 Feb 25  2015 /usr/bin/gcc-ar -> gcc-ar-4.9
-rwxr-xr-x 1 root root 813688 Jun  4  2015 /usr/bin/i686-w64-mingw32-ar
lrwxrwxrwx 1 root root     41 Aug 11 15:42 /usr/bin/i686-w64-mingw32-gcc-ar -> 
/etc/alternatives/i686-w64-mingw32-gcc-ar
lrwxrwxrwx 1 root root      2 Feb 25  2015 /usr/bin/x86_64-linux-gnu-ar -> ar
lrwxrwxrwx 1 root root     10 Feb 25  2015 /usr/bin/x86_64-linux-gnu-gcc-ar -> 
gcc-ar-4.9




reply via email to

[Prev in Thread] Current Thread [Next in Thread]