pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rust not linking on Linux



I just managed to build wip/rust175 under

Linux ci4c.gq 6.5.0-1014-oracle #14-Ubuntu SMP Thu Jan 11 21:47:48 UTC
2024 aarch64 aarch64 aarch64 GNU/Linux

using today's wip, pkgsrc is from about two weeks ago. Running cargo
builds initially gave me errors like

Compiling iana-time-zone v0.1.58
rustc: /usr/pkg/lib/libz.so.1: no version information available
(required by /usr/pkg/lib/librustc_driver-44b7bf2d66aa822f.so)
rustc: /usr/pkg/lib/libz.so.1: no version information available
(required by /usr/pkg/lib/librustc_driver-44b7bf2d66aa822f.so)

but after 'bmake replace' in devel/zlib (while the build was running
at the time) these messages stopped and everything seems ok.


FWIW I didn't need the patches.

Chavdar Ivanov


On Mon, 5 Feb 2024 at 21:58, Dr. Thomas Orgis
<thomas.orgis%uni-hamburg.de@localhost> wrote:
>
> Hi,
>
> for lang/rust from CVS head to build on Linux, I need this patch:
>
> Index: Makefile
> ===================================================================
> RCS file: /cvsroot/pkgsrc/lang/rust/Makefile,v
> retrieving revision 1.302
> diff -u -r1.302 Makefile
> --- Makefile    15 Jan 2024 15:15:01 -0000      1.302
> +++ Makefile    5 Feb 2024 21:22:09 -0000
> @@ -58,7 +58,7 @@
>  # Getting RPATH with $ORIGIN into bootstrap may be troublesome, so
>  # uncommenting the LD_LIBRARY_PATH setting may be required to run
>  # the bootstrap
> -PKGSRC_MAKE_ENV+=      LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
> +PKGSRC_MAKE_ENV+=      LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib:${PREFIX}/lib
>
>  # This should allow us to perform "offline" builds (so cargo doesn't fetch
>  # dependencies during the build stage) but this isn't hooked up yet.
> @@ -66,6 +66,7 @@
>
>  # cargo defaults to using the number of available CPUs
>  MAKE_ENV+=             CARGO_BUILD_JOBS=${_MAKE_JOBS_N}
> +MAKE_ENV+=             LIBRARY_PATH=${PREFIX}/lib
>
>  # Rust builds some bundled components with strict version requirements, ensure
>  # that any conflicting packages pulled in via dependencies are not buildlinked.
>
>
> Otherwise, it doesn't find libunwind during linking or at some point at runtime.
>
> This is on both Linux setups I test, consistently. I wonder: Is there
> someone that is able to build rust without these changes? Some other
> library directory magic? This is both with a custom toolchain and the
> system compilers from Ubuntu.
>
> I do not need these changes for the rust in 2023Q4.
>
>
> Alrighty then,
>
> Thomas
>
> --
> Dr. Thomas Orgis
> HPC @ Universität Hamburg



-- 
----


Home | Main Index | Thread Index | Old Index