Re: gcc-4.7.0 error "ar: Cannot find plugin"

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

 



On 26 April 2012 00:12, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Maxim Yegorushkin <maxim.yegorushkin@xxxxxxxxx> writes:
>
>> I've just configured and compiled gcc-4.7.0. I can compile, link and
>> run code with the new g++, however, whenever I run the new ar or nm it
>> responds with the following error message:
>>
>>     $ /usr/local/ots/gcc/bin/ar
>>     /usr/local/ots/gcc/bin/ar: Cannot find plugin
>
> That error is coming from a wrapper for "ar" that GCC installs.  GCC
> wants the wrapper to use the LTO plugin.  The wrapper is normally
> installed under the name "gcc-ar".  I don't know why you are seeing the
> name "ar".

My bad, I made ar a hard link to gcc-ar47. Invoking it as
/usr/local/ots/gcc/bin/gcc-ar47 produces the same error.

> Other than that, it looks like a bug that gcc-ar is unable to find the
> plugin.  The code is written to assume that make_relative_prefix will
> return non-NULL.  But if gcc-ar is installed in the expected location,
> then I think it will return NULL.

I stepped through ar in gdb and indeed make_relative_prefix() returns NULL.

Could you let me know what command line this wrapper is trying to
build as it's not clear from the code and there is no comment. Is it
something like:

    /usr/local/ots/gcc/bin/gcc-ar47 --plugin
/usr/local/ots/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/<???>
<argv[1:]>

So that I hardcode it for now to fix the problem.

> So I think this is a bug.  I would encourage you to report it.

Will do.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux