黄金链接。金插件:未知选项。

时间:2022-10-14 04:55:24

I'm trying to build Google's ligjingle following the Getting started steps, and I've reached the "Building" section.

我尝试在开始步骤之后构建谷歌的ligjingle,我已经到达了“Building”部分。

When I issue either

当我问题

ninja -C out/Debug

or

ninja -C out/Release

I get the following error : I posted the output in pastebin too, if you prefer

我得到了以下错误:如果您愿意,我也将输出放在了pastebin。

ninja -C out/Debug
ninja: Entering directory `out/Debug'
[3/2606] LINK genmacro
FAILED: cc -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -pthread -Wl,-z,noexecstack -fPIC -B/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=none -fuse-ld=gold -Wl,--gdb-index -o genmacro -Wl,--start-group obj/third_party/yasm/source/patched-yasm/tools/genmacro/genmacro.genmacro.o  -Wl,--end-group 
/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ld.gold: -plugin: unknown option
/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ld.gold: use the --help option for usage information
collect2: error: ld returned 1 exit status
[3/2606] CC obj/net/third_party/nss/ssl/libssl.sslauth.o
ninja: build stopped: subcommand failed.

I tried

我试着

ld.gold --help | grep "plugin"

and got :

和有:

--plugin PLUGIN             Load a plugin library
--plugin-opt OPTION         Pass an option to the plugin

So I suppose the error I'm getting is because somewhere in the code, ld.gold is called with -plugin xxx rather than --plugin xxx

所以我想我得到的错误是,在代码的某个地方,ld。gold被称为-plugin xxx而不是-plugin xxx。

I have been "playing" with grep -Hr and different combinations of "plugin" to try to find the problem, but so far I haven't found anything. I suppose it is hidden somewhere in a Makefile.

我一直在用grep -Hr和不同的“插件”组合来尝试找出问题,但到目前为止我还没有发现任何东西。我想它隐藏在Makefile中的某个地方。

1 个解决方案

#1


8  

The problem is not that the -plugin option should be --plugin. ld.gold accepts both options if it accepts either of them.

问题不在于-插件选项应该是-plugin。如果黄金接受这两种选择,它就接受这两种选择。

But it only accepts either of them if the build of binutils has been configured with --enable-plugins. Documentation.

但是,如果binutils的构建已经被配置了—enable-plugins,那么它只接受其中任何一个。文档。

When you run ld.gold --help | grep "plugin" the output shows that --plugin is a recognized option.

当你运行ld.gold——帮助| grep“插件”的输出显示——插件是一个公认的选项。

Therefore the problem appears to be this:-

因此,问题似乎是这样的:-。

/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ld.gold has not been configured with --enable-plugins

/home/nschoe/workspace/webrtc/jingle/trunk/third_party / binutils / Linux_x64 /释放/ bin / ld。黄金还没有被配置为-支持插件。

When you run ld.gold --help | grep "plugin" you are executing the first ld.gold that is found on your PATH. It is probably /usr/bin/ld.gold from your distro. You can find out by running:

当你运行ld.gold——帮助| grep“插件”时,你正在执行第一个ld.gold,它是在你的路径上找到的。这可能是/usr/bin/ld.从你的发行版。你可以通过跑步来发现:

which ld.gold

Anyhow, it isn't /home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ld.gold and it is an ld.gold that has been configured with --enable-plugins

总之,它不是/home/nschoe/workspace/webrtc/jingle/trunk/third_party / binutils / Linux_x64 /释放/ bin / ld。gold和它是一个ld.gold,已经配置了-enable-plugins。

If you cd into /home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ and run:

如果您将cd放入/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/并运行:

 ./ld.gold -plugin

you will get:

你将得到:

./ld.gold: -plugin: unknown option

To fix the problem the ideal solution is to rebuild /home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils as per that Documentation

为了解决这个问题,理想的解决方案是根据该文档重新构建/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils。

If you cannot rebuild these third party binutils from source then it will probably work if you just copy the system ld.gold detected by which over the one in the third party binutils, or delete/rename the third party one and replace it with a symlink to the system one. There is an outside chance that either of the these hacks would cause you some obscure breakage.

如果您无法从源代码中重新生成这些第三方的binutils,那么如果您只是复制了系统ld,那么它可能会起作用。有一个外部的机会,这些黑客会给你造成一些模糊的破坏。

#1


8  

The problem is not that the -plugin option should be --plugin. ld.gold accepts both options if it accepts either of them.

问题不在于-插件选项应该是-plugin。如果黄金接受这两种选择,它就接受这两种选择。

But it only accepts either of them if the build of binutils has been configured with --enable-plugins. Documentation.

但是,如果binutils的构建已经被配置了—enable-plugins,那么它只接受其中任何一个。文档。

When you run ld.gold --help | grep "plugin" the output shows that --plugin is a recognized option.

当你运行ld.gold——帮助| grep“插件”的输出显示——插件是一个公认的选项。

Therefore the problem appears to be this:-

因此,问题似乎是这样的:-。

/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ld.gold has not been configured with --enable-plugins

/home/nschoe/workspace/webrtc/jingle/trunk/third_party / binutils / Linux_x64 /释放/ bin / ld。黄金还没有被配置为-支持插件。

When you run ld.gold --help | grep "plugin" you are executing the first ld.gold that is found on your PATH. It is probably /usr/bin/ld.gold from your distro. You can find out by running:

当你运行ld.gold——帮助| grep“插件”时,你正在执行第一个ld.gold,它是在你的路径上找到的。这可能是/usr/bin/ld.从你的发行版。你可以通过跑步来发现:

which ld.gold

Anyhow, it isn't /home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ld.gold and it is an ld.gold that has been configured with --enable-plugins

总之,它不是/home/nschoe/workspace/webrtc/jingle/trunk/third_party / binutils / Linux_x64 /释放/ bin / ld。gold和它是一个ld.gold,已经配置了-enable-plugins。

If you cd into /home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/ and run:

如果您将cd放入/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils/Linux_x64/Release/bin/并运行:

 ./ld.gold -plugin

you will get:

你将得到:

./ld.gold: -plugin: unknown option

To fix the problem the ideal solution is to rebuild /home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils as per that Documentation

为了解决这个问题,理想的解决方案是根据该文档重新构建/home/nschoe/workspace/webrtc/jingle/trunk/third_party/binutils。

If you cannot rebuild these third party binutils from source then it will probably work if you just copy the system ld.gold detected by which over the one in the third party binutils, or delete/rename the third party one and replace it with a symlink to the system one. There is an outside chance that either of the these hacks would cause you some obscure breakage.

如果您无法从源代码中重新生成这些第三方的binutils,那么如果您只是复制了系统ld,那么它可能会起作用。有一个外部的机会,这些黑客会给你造成一些模糊的破坏。