Clikengo / foundationdb-rs

FoundationDB Rust client api
Apache License 2.0
155 stars 29 forks source link

Linking Error on apple new MacBook arm64 : ld: symbol(s) not found for architecture arm64 #240

Open ahtremblay opened 3 years ago

ahtremblay commented 3 years ago

When adding these lines to by Cargo.toml

[dependencies]
foundationdb = "0.5"
futures = "0.3"

I get a compile error:

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-arch" "arm64" [..]" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: warning: ignoring file /usr/local/lib/libfdb_c.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
          Undefined symbols for architecture arm64:
            "_fdb_create_database", referenced from:
                foundationdb::database::Database::new::h9fb9a0ca09f6f7a7 in libfoundationdb-69b33e2a1302943f.rlib(foundationdb-69b33e2a1302943f.foundationdb.6tolvyuv-cgu.5.rcgu.o)
            "_fdb_database_destroy", referenced from:
                _$LT$foundationdb..database..Database$u20$as$u20$core..ops..drop..Drop$GT$::drop::h8ea0f1d183d0af0b in libfoundationdb-69b33e2a1302943f.rlib(foundationdb-69b33e2a1302943f.foundationdb.6tolvyuv-cgu.5.rcgu.o)
            "_fdb_database_create_transaction", referenced from:
                foundationdb::database::Database::create_trx::h13b3b468b10bd7a3 in libfoundationdb-69b33e2a1302943f.rlib(foundationdb-69b33e2a1302943f.foundationdb.6tolvyuv-cgu.5.rcgu.o)
            "_fdb_future_destroy", referenced from:
                _$LT$foundationdb..future..FdbFutureHandle$u20$as$u20$core..ops..drop..Drop$GT$::drop::h278a2051a976c1d8 in libfoundationdb-69b33e2a1302943f.rlib(foundationdb-69b33e2a1302943f.foundationdb.6tolvyuv-cgu.14.rcgu.o)
            "_fdb_transaction_destroy", referenced from:
                _$LT$foundationdb..transaction..Transaction$u20$as$u20$core..ops..drop..Drop$GT$::drop::hbd6731e5ae26b713 in libfoundationdb-69b33e2a1302943f.rlib(foundationdb-69b33e2a1302943f.foundationdb.6tolvyuv-cgu.9.rcgu.o)
            "_fdb_future_is_ready", referenced from:
                _$LT$foundationdb..future..FdbFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha6f5988123fae0ea in LX.5bp55bwpa9zett1q.rcgu.o
            "_fdb_transaction_commit", referenced from:
                foundationdb::transaction::Transaction::commit::h594b26d51056acf4 in libfoundationdb-69b33e2a1302943f.rlib(foundationdb-69b33e2a1302943f.foundationdb.6tolvyuv-cgu.9.rcgu.o)
            "_fdb_future_set_callback", referenced from:
                _$LT$foundationdb..future..FdbFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha6f5988123fae0ea in LX.5bp55bwpa9zett1q.rcgu.o
            "_fdb_transaction_set", referenced from:
                foundationdb::transaction::Transaction::set::h80f6aa2436c28b41 in libfoundationdb-69b33e2a1302943f.rlib(foundationdb-69b33e2a1302943f.foundationdb.6tolvyuv-cgu.9.rcgu.o)
            "_fdb_future_get_error", referenced from:
                _$LT$foundationdb..future..FdbFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha6f5988123fae0ea in LX.5bp55bwpa9zett1q.rcgu.o
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
PierreZ commented 3 years ago

Hi @ahtremblay :wave:

As you already noticed, FDB does not support yet Apple Silicon (arm64). The main issue is this one, and there is a PR targetting master that has been opened recently.