Apple silicon compile error: "ld: Undefined symbols"

オープン
#373 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
macos, rust

調査の方向性

Start with the example script from the documentation, its Cargo.toml dependencies, and the attached output.txt from cargo build -v. Investigate the _dgetrf_ and _dgetrs_ linker failures on the reported Apple silicon environment. Done means the documented example builds successfully on the reported macOS and Rust versions.

索引モデルが issue の本文から書いたものです。

説明

Failing to compile the example script from the docs:

use ndarray::prelude::*;
use ndarray_linalg::Solve;

  fn main() {
      
      let a: Array2<f64> = array![[3., 2., -1.], [2., -2., 4.], [-2., 1., -2.]];
      let b: Array1<f64> = array![1., -2., 0.];
      let x = a.solve_into(b).unwrap();
      assert!(x.abs_diff_eq(&array![1., -2., -2.], 1e-9));
  
  }

MacOS version: 14.3.1
Device: Apple Macbook Pro M3 Pro
Rust version:

rustc 1.76.0 (07dca489a 2024-02-04)
binary: rustc
commit-hash: 07dca489ac2d933c78d3c5158e3f43beefeb02ce
commit-date: 2024-02-04
host: aarch64-apple-darwin
release: 1.76.0
LLVM version: 17.0.6

Cargo.toml dependencies:

[dependencies]
ndarray = "0.15.6"
ndarray-linalg = "0.16.0"

Main Error message:

note: ld: Undefined symbols:
            _dgetrf_, referenced from:
                lapack::dgetrf::h0fc923a6c9987636 in liblax-f78efd393904881d.rlib[10](lax-f78efd393904881d.lax.c010234ea3c8cc9-cgu.7.rcgu.o)
            _dgetrs_, referenced from:
                lapack::dgetrs::h997874d0f9aec842 in liblax-f78efd393904881d.rlib[10](lax-f78efd393904881d.lax.c010234ea3c8cc9-cgu.7.rcgu.o)
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Output for cargo build -v
output.txt

主要言語
Rust
スター
452
フォーク
95
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-ndarray/ndarray-linalg のほかの issue

rust-ndarray/ndarray-linalg の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。