Indy-sdk 构建错误:“Undefined symbols for architecture x86_64”

huangapple go评论77阅读模式
英文:

Indy-sdk building error: "Undefined symbols for architecture x86_64"

问题

我尝试手动构建 indy-sdk(自动构建不起作用)来自hyperledger文档。 macOS Monterey 12.6.6,Xcode 14.0.1,终端 zsh。
已安装的相关库:pkg-config、libsodium 1.0.12、automake、autoconf、cmake、openssl 1.1、zeromq、zmq

在步骤6中,当我使用以下命令设置环境变量时,我收到以下错误:

export LIBRARY_PATH=/path/to/sdk/libindy/target/<config>
zsh: parse error near `\n&#39;

然后我尝试使用以下代码设置环境变量

export LIBRARY_PATH=/users/user/indy-sdk/libindy/target

顺便说一下,在目标文件夹中没有配置文件。我检查了一下,找不到任何配置文件,也没有父文件夹/path、/to或/sdk,这让我感到困惑。

但是,当我继续下一步操作时:

cd /indy-sdk/cli.
cargo build

它给我报了以下错误消息:

error: linking with `cc` failed: exit status: 1

终端截图

could not compile `indy-cli` (bin "indy-cli") due to previous 
error
Undefined symbols for architecture x86_64

我卡住了,非常感谢任何帮助。

已卸载并重新安装了 rust。

英文:

I was trying to build indy-sdk manually (auto-build didnt work) from the hyperledger docs
macOS Monterey 12.6.6, Xcode 14.0.1, terminal zsh <br>
related libraries installed: pkg-config, libsodium 1.0.12, automake, autoconf, cmake, openssl 1.1, zeromq, zmq

At step 6 when I set environment variable with this command I am getting the following error:

    export LIBRARY_PATH=/path/to/sdk/libindy/target/&lt;config&gt;
    zsh: parse error near `\n&#39;

Then I tried to set the env var with the code below

    export LIBRARY_PATH=/users/user/indy-sdk/libindy/target

By the way there is no config file under the target folder. I checked it and couldnt find any and no parent folder as /path or /to or /sdk which is confusing.

But then when I move forward with the next steps:

    cd /indy-sdk/cli. 
    cargo build

It gave me these error messages:

    error: linking with `cc` failed: exit status: 1

terminal ss

    could not compile `indy-cli` (bin &quot;indy-cli&quot;) due to previous 
    error
    Undefined symbols for architecture x86_64

I got stuck I appreciate any help.

Uninstalled and reinstalled rust

答案1

得分: 1

已解决!! <br>

按照此处的设置指南 链接 进行操作!有几个例外,请参见下文: <br>

在第1步:

    brew install libsodium
    brew install openssl@1.1

在第4步:

    export OPENSSL_DIR=/usr/local/Cellar/openssl@1.1/1.1.1u

在第6步(注意,您的 indy-sdk 文件夹可以克隆到不同的目录,所以请相应地进行安排):

    export LIBRARY_PATH=/users/user/indy-sdk/libindy/target/debug
英文:

solved!! <br>

followed the setup guide here link! with few exceptions please see them below: <br>

at step1: <br>

    brew install libsodium
    brew instal openssl@1.1

at step4:

    export OPENSSL_DIR=/usr/local/Cellar/openssl@1.1/1.1.1u

at step6 (note that your indy-sdk folder can be cloned to a different directory so arrange it accordingly):

    export LIBRARY_PATH=/users/user/indy-sdk/libindy/target/debug

huangapple
  • 本文由 发表于 2023年6月19日 22:01:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76507380.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定