Hi Till,

thanks a lot again, this helped to successfully build and install the rust package. Nevertheless the original issue still persists:

Dist rustc-1.61.0-x86_64-unknown-illumos
        finished in 46.721 seconds
Install rustc stage2 (Some(TargetSelection { triple: "x86_64-unknown-illumos", file: None })) install: creating uninstall script at /usr/src/myoi-userland/components/developer/rust/build/prototype/i386/usr/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: backing up existing file at /usr/src/myoi-userland/components/developer/rust/build/prototype/i386/usr/share/doc/rust-1.61.0/LICENSE-APACHE install: backing up existing file at /usr/src/myoi-userland/components/developer/rust/build/prototype/i386/usr/share/doc/rust-1.61.0/LICENSE-MIT install: backing up existing file at /usr/src/myoi-userland/components/developer/rust/build/prototype/i386/usr/share/doc/rust-1.61.0/README.md

    rustc installed.

Build completed successfully in 0:27:42
/usr/bin/touch /usr/src/myoi-userland/components/developer/rust/build/amd64/.installed /usr/bin/python3.9 RESOLVE_DEPS= /usr/src/myoi-userland/components/developer/rust/build/.resolved-i386 /usr/bin/python3.9: can't open file '/usr/share/src/myoi-userland/components/developer/rust/RESOLVE_DEPS=': [Errno 2] No such file or directory make: *** [/usr/share/src/myoi-userland/make-rules/ips.mk:516: REQUIRED_PACKAGES] Error 2

For the sake of completeness again my adapted Makefile:

BUILD_BITS=             64
USE_OPENSSL11=          yes

include ../../../make-rules/shared-macros.mk

COMPONENT_NAME=         rustc
COMPONENT_VERSION=      1.61.0
COMPONENT_FMRI=         developer/lang/rustc
COMPONENT_SUMMARY=      Rust - Safe, concurrent, practical language
COMPONENT_CLASSIFICATION=       Development/Other Languages
COMPONENT_PROJECT_URL=  http://www.rust-lang.org
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)-src
COMPONENT_ARCHIVE=      $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed COMPONENT_ARCHIVE_URL= https://static.rust-lang.org/dist/$(COMPONENT_ARCHIVE)
COMPONENT_LICENSE=      MIT or Apache-2.0
COMPONENT_LICENSE_FILE= LICENSE-APACHE

RUST_BOOTSTRAP_PATH=    $(BUILD_DIR)/$(MACH64)
RUST_ARCH=              x86_64-unknown-illumos

include $(WS_MAKE_RULES)/common.mk

# GCC_VERSION =  7

# Put the bits cargo downloads in a private directory.  This could be cached
# somewhere more permanent, but it's important to make sure that a person's
# $HOME/.cargo isn't used.
RUST_VERSION=           $(COMPONENT_VERSION)
RUSTUP_HOME=            $(BUILD_DIR)/$(MACH64)
CARGO_HOME=             $(BUILD_DIR)/$(MACH64)

PATH= $(CARGO_HOME)/bin:$(GCC_BINDIR):$(PATH.gnu)

#  workaround the symlink name lenght 100 problem, but hope it is not neccessary with
# but also with patch src_tools_rust-installer_src_generator.rs.patch
COMPONENT_BUILD_ENV+=   CARGO_HOME=$(CARGO_HOME)
COMPONENT_INSTALL_ENV+= CARGO_HOME=$(CARGO_HOME)
COMPONENT_TEST_ENV+=    CARGO_HOME=$(CARGO_HOME)
COMPONENT_BUILD_ENV+=   RUSTUP_HOME=$(RUSTUP_HOME)
COMPONENT_INSTALL_ENV+= RUSTUP_HOME=$(RUSTUP_HOME)
COMPONENT_TEST_ENV+=    RUSTUP_HOME=$(RUSTUP_HOME)

COMPONENT_PRE_CONFIGURE_ACTION += ( \
        CLONEY_MODE=hardlink $(CLONEY) $(SOURCE_DIR) $(@D); \
        cd $(@D); \
        export RUSTUP_HOME=$(RUSTUP_HOME); \
        export CARGO_HOME=$(CARGO_HOME); \
        export RUSTUP_INIT_SKIP_PATH_CHECK=yes; \
        curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain stable -y; \
        source $(CARGO_HOME)/env; \
        rustup install stable; \
        rustup default stable; \
        rustup show; \
        );

PYTHON_VERSION=         3.9

# Need some help to pick the correct ar binary
GNUAR=$(GNUBIN)/ar

# getpwuid_r failure
CXXFLAGS += -D_POSIX_PTHREAD_SEMANTICS
CFLAGS += -D_POSIX_PTHREAD_SEMANTICS

# Add arch triplet to pkg macros
PKG_MACROS+= RUST_ARCH="$(RUST_ARCH)"

# Rust expects the library path to be /usr/lib and is broken otherwise
RUSTC_LIBDIR= $(USRLIBDIR)
CLANG_ROOT= /usr/clang/13.0

CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS))
CONFIGURE_OPTIONS += --libdir=$(RUSTC_LIBDIR)
CONFIGURE_OPTIONS += --docdir=$(USRSHAREDOCDIR)/rust-$(COMPONENT_VERSION)
CONFIGURE_OPTIONS += --datadir=$(USRSHAREDIR)
CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
CONFIGURE_OPTIONS += --local-rust-root=$(RUST_BOOTSTRAP_PATH)
CONFIGURE_OPTIONS += --enable-extended       # Build and install cargo too.
CONFIGURE_OPTIONS += --default-linker=$(CC)
CONFIGURE_OPTIONS += --set rust.default-linker=$(CC)
CONFIGURE_OPTIONS += --enable-rpath
CONFIGURE_OPTIONS += --disable-codegen-tests
CONFIGURE_OPTIONS += --disable-dist-src
CONFIGURE_OPTIONS += --disable-llvm-static-stdcpp
CONFIGURE_OPTIONS += --enable-ninja
CONFIGURE_OPTIONS += --enable-vendor
CONFIGURE_OPTIONS += --disable-docs
CONFIGURE_OPTIONS += --disable-compiler-docs
CONFIGURE_OPTIONS += --release-channel=stable
CONFIGURE_OPTIONS += --python=$(PYTHON)
CONFIGURE_OPTIONS += --enable-llvm-link-shared
CONFIGURE_OPTIONS += --llvm-root=$(CLANG_ROOT)

COMPONENT_PRE_BUILD_ACTION=     rustup default stable;

# Cleanup standard environment!
COMPONENT_BUILD_ENV =
COMPONENT_BUILD_ENV += CC=$(CC)
COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"
COMPONENT_BUILD_ENV += LDFLAGS="-L$(OPENSSL_PREFIX)/lib/$(MACH64) -lssl -lcrypto"
COMPONENT_BUILD_ENV += CXX=$(CXX)
COMPONENT_BUILD_ENV += CPPFLAGS="-I$(OPENSSL_PREFIX)/include"
COMPONENT_BUILD_ENV += CXXFLAGS="$(CXXFLAGS)"
COMPONENT_BUILD_ENV += AR=$(GNUAR)
COMPONENT_BUILD_ENV += RUSTC=$(CARGO_HOME)/bin/rustc
# Enforce linker consistency
COMPONENT_BUILD_ENV += RUSTFLAGS="-C linker=$(CC)"
COMPONENT_BUILD_ENV += RUST_BACKTRACE=1

GMAKE = $(PYTHON)
COMPONENT_BUILD_GMAKE_ARGS =
COMPONENT_BUILD_TARGETS = build
COMPONENT_BUILD_ARGS = ./x.py -vv

COMPONENT_INSTALL_ARGS = ./x.py
# Cleanup standard environment
COMPONENT_INSTALL_ENV =
COMPONENT_INSTALL_ENV += $(COMPONENT_BUILD_ENV)
# Set install path
COMPONENT_INSTALL_ENV += DESTDIR=$(PROTO_DIR)

COMPONENT_PRE_INSTALL_ACTION = mkdir -p $(PROTO_DIR)

RUSTC_BIN_POST = cargo
RUSTC_BIN_POST+= clippy-driver
RUSTC_BIN_POST+= rls
RUSTC_BIN_POST+= rustc
RUSTC_BIN_POST+= rustdoc

# Build dependencies (make sure completions are installed)
REQUIRED_PACKAGES += utility/bash-completion
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
REQUIRED_PACKAGES += developer/clang-13
REQUIRED_PACKAGES += library/libssh2
REQUIRED_PACKAGES += library/http-parser
# Auto-generated dependencies
REQUIRED_PACKAGES += library/security/openssl-11
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += SUNWcs
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += web/curl

kind regards,

 Fritz



Am 21.06.2022 um 19:36 schrieb Till Wegmueller:
Hello everyone

We now have support for CLONEY_MODE=hardlinks and CLONEY_MODE=copy in the makefiles

Would be a good chance to test those.

Alternatively COMPONENT_COPY_ACTION would be the proper variable to override instead of COMPONENT_PRE_CONFIGURE_ACTION

Greetings
Till

On 20/06/2022 17.07, Gary Mills wrote:
On Mon, Jun 20, 2022 at 09:21:58PM +0200, Andreas Wacknitz wrote:
We already had another guy trying to build a newer rust failing with the
same problem.
He found out that this is a known problem and there should already be a
fix (as far as I understood) but it hadn't been integrated in the release.
It looks like the situation didn't change in the last weeks.

Who is the other guy?  That makes three of us.

I had the same problem.  The solution is to copy the files in the
Makefile, instead of using symlinks or hard links:

   # Workaround the symlink name length 100 problem, but hope it is not neccessary
   # but also with patch src_tools_rust-installer_src_generator.rs.patch
   COMPONENT_PRE_CONFIGURE_ACTION = $(CP) -r $(SOURCE_DIR)/* $(@D)/




_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev

_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev

Reply via email to