public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Alexey Neyman <stilor@att.net>
To: Titus von Boxberg <titus@elbe-informatik.de>
Cc: "crossgcc@sourceware.org" <crossgcc@sourceware.org>
Subject: Re: canadian cross host mingw: build of liblto_plugin-0.dll fails
Date: Sat, 16 Sep 2017 18:46:00 -0000	[thread overview]
Message-ID: <e78699b2-c80b-efe4-c23c-7b7c980b1dde@att.net> (raw)
In-Reply-To: <eccc45ee26674fcaa6ba87a80e98e9b1@elbe-informatik.de>

Hi Titus,


On 09/15/2017 04:33 AM, Titus von Boxberg wrote:
> Alexey, all,
>
> on opensuse linux, I'm trying to build an arm-none toolchain for host mingw-w64
> with a fairly recent crosstool-NG.
> As the build machine compiler I'm using gcc-7.2 from opensuse package
> https://build.opensuse.org/package/show/windows%3Amingw%3Awin64/mingw64-cross-gcc
>
> Everything is going smooth except that in the build step for the final gcc
> libtool refuses to generate the liblto_plugin-0.dll
>
> The command line is:
> ./libtool --tag=CC --tag=disable-static  --mode=link x86_64-host_w64-mingw32-gcc -Wall -O2 -g -pipe -I/home/ELBE/titus/tmp/m32-ctng-m7/.build/HOST-x86_64-w64-mingw32/arm-m7-eabi/buildtools/complibs-host/include -Os -D__USE_MINGW_ACCESS -Wc,-static-libgcc -no-undefined -bindir "/opt/cross/arm-m7-eabi/bin" -module -bindir /opt/cross/arm-m7-eabi/libexec/gcc/arm-m7-eabi/7.2.0  -Wc,../libiberty/libiberty.a  -Xcompiler '-static-libstdc++' -Xcompiler '-static-libgcc' '-L/home/ELBE/titus/tmp/m32-ctng-m7/.build/HOST-x86_64-w64-mingw32/arm-m7-eabi/buildtools/complibs-host/lib' '-lstdc++' '-lm' '-Wl,--stack,12582912' -o liblto_plugin.la -rpath /opt/cross/arm-m7-eabi/libexec/gcc/arm-m7-eabi/7.2.0 lto-plugin.lo
>
> The message is:
> *** Warning: linker path does not have real file for library -lstdc++.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have
> *** because I did check the linker path looking for a file starting
> *** with libstdc++ but no candidates were found. (...for file magic test)
>
> *** Warning: libtool could not satisfy all declared inter-library
> *** dependencies of module liblto_plugin.  Therefore, libtool will create
> *** a static module, that should work as long as the dlopening
> *** application is linked with the -dlopen flag.
>
> libtool is looking into these paths:
> /home/ELBE/titus/tmp/m32-ctng-m7/.build/HOST-x86_64-w64-mingw32/arm-m7-eabi/buildtools/complibs-host/lib
> /usr/x86_64-w64-mingw32/lib
> /usr/x86_64-w64-mingw32/sys-root/mingw/lib
>
> I found that the opensuse c++ runtime package installs libstdc++-6.dll
> into the bin directory of the sysroot
> /usr/x86_64-w64-mingw32/sys-root/mingw/bin
>
> When manually copying libstdc++-6.dll into the sysroot's lib directory, libtool is happy.
>
> Any ideas where to look to get this fixed reliably?
Well, I think this placement is not correct. I am not sure if they did 
any hacks to GCC to search /bin for libraries - but this obviously 
breaks any other scripts which assume /lib as the library directory.

I assume they did that so that the /bin directory, when copied to the 
host, could find this DLL. Maybe they should provide a symlink in /lib 
then. Anyway, it is a problem with opensuse's package and I don't see 
what we can do here in crosstool-NG to remediate this.

You can try the mingw compiler from crosstool-NG by the way, I think it 
uses conventional placement of the libraries.

Regards,
Alexey.

      reply	other threads:[~2017-09-16 18:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 11:33 Titus von Boxberg
2017-09-16 18:46 ` Alexey Neyman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e78699b2-c80b-efe4-c23c-7b7c980b1dde@att.net \
    --to=stilor@att.net \
    --cc=crossgcc@sourceware.org \
    --cc=titus@elbe-informatik.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).