pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Using pkgsrc Rust standalone
Hi!
Am I supposed to be able to use Rust from pkgsrc to compile my own programs?
On Linux, I see this:
$ echo "fn main() {}" > test.rs
$ rustc test.rs
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C"
PATH="/usr/pkg/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/local/bin:/usr/bin"
VSLANG="1033" "cc" "/tmp/rustcu8L99j/symbols.o" "<2 object files
omitted>" "-Wl,--as-needed" "-Wl,-Bstatic"
"/usr/pkg/lib/rustlib/aarch64-unknown-linux-gnu/lib/{libstd-f0b5547c9c467c34.rlib,libpanic_unwind-d9ef81a7780069a4.rlib,libobject-82d78707f4f74dd7.rlib,libmemchr-438a43b93032dfab.rlib,libaddr2line-9e28003291515020.rlib,libgimli-c6355181a2073f68.rlib,librustc_demangle-e582b1805d841d93.rlib,libstd_detect-9b2a96610f6fa1c9.rlib,libhashbrown-eb8640277703a9d1.rlib,librustc_std_workspace_alloc-7bfe1442fc0380b5.rlib,libminiz_oxide-1a06b55e8384ac57.rlib,libadler-bf08fd3e270dcbf0.rlib,libunwind-fd6e765766ca0b88.rlib,libcfg_if-f7e85a4343d331f1.rlib,liblibc-aafabae88ccacc0b.rlib,liballoc-088c7ece91d0db93.rlib,librustc_std_workspace_core-6dacd6063ce960e5.rlib,libcore-2fc01b17c9e3efbc.rlib,libcompiler_builtins-12512e3f57ee27de.rlib}"
"-Xlinker" "-rpath,/usr/pkg/lib" "-Wl,-L/usr/pkg/lib" "-Wl,-Bdynamic"
"-lunwind" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
"-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L"
"/usr/pkg/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "test"
"-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: some arguments are omitted. use `--verbose` to show all
linker arguments
= note: /usr/bin/ld: unrecognised option: -rpath,/usr/pkg/lib
collect2: error: ld returned 1 exit status
error: aborting due to 1 previous error
The rpath parameter looks wrong! "-Wl,-rpath,/usr/pkg/lib" would be
correct with a comma, but with -Xlinker the syntax is apparently different.
This does not happen (obviously) during a pkgsrc package build.
Any ideas? This is rust-1.85.1 from a few weeks ago.
--
Benny
Home |
Main Index |
Thread Index |
Old Index