Jump to content
funtoo forums
  • 0
euduca

Overlay - Patch error - rust [SOLVED]

Question

Hi.

I'm trying to install the rust-1.31.1 package.

During compilation an error occurs because the machine has less than 4GB of memory.
So I created an overlay and changed the limit from 4GB to 3GB.

 # free -m
              total        used        free      shared  buff/cache   available
Mem:           3416         686         298           1        2432        2449
Swap:          8191           0        8191

 

I followed this guide: Local Overlay

My steps:

1. Creating the local reposiotry

mkdir /var/git/overlay
cd /var/git/overlay
git clone  https://github.com/funtoo/skeleton-overlay.git myoverlay
echo "myoverlay" > /var/git/overlay/myoverlay/profiles/repo_name

2. Editing the /etc/portage/repos.conf/myoverlay.conf file:

# nano /etc/portage/repos.conf/myoverlay.conf 
[myoverlay]
location = /var/git/overlay/myoverlay
auto-sync = no
priority = 10

3. Creating the ebuild's path:

# install -d /var/git/overlay/myoverlay/dev-lang/rust
# cd /var/git/overlay/myoverlay/dev-lang/rust
# cp -r /var/git/meta-repo/kits/net-kit/dev-lang/rust/* .

4. Modifying the check parameter CHECKREQS_MEMORY="4G" by CHECKREQS_MEMORY="3G" into rust-1.31.1.ebuild.

5. Digesting the ebuild:

 # ebuild /var/git/overlay/myoverlay/dev-lang/rust/rust-1.31.1.ebuild digest
>>> Creating Manifest for /var/git/overlay/myoverlay/dev-lang/rust

After that  all versions of rust were downloaded. by the ebuild command.

6. Emerging the package:

# emerge rust
Calculating dependencies... done!

>>> Verifying ebuild manifests
>>> Running pre-merge checks for dev-lang/rust-1.31.1
 * Checking for at least 3 GiB RAM ...                                                                                               [ ok ]
 * Checking for at least 7 GiB disk space at "/var/tmp/portage/dev-lang/rust-1.31.1/temp" ...                                        [ ok ]

>>> Emerging (1 of 1) dev-lang/rust-1.31.1::myoverlay
 * rustc-1.31.1-src.tar.xz SHA512 size ;-) ...                                                                                       [ ok ]
 * rust-1.30.1-x86_64-unknown-linux-gnu.tar.xz SHA512 size ;-) ...                                                                   [ ok ]
 * Checking for at least 3 GiB RAM ...                                                                                               [ ok ]
 * Checking for at least 7 GiB disk space at "/var/tmp/portage/dev-lang/rust-1.31.1/temp" ...                                        [ ok ]
>>> Unpacking source...
>>> Unpacking rustc-1.31.1-src.tar.xz to /var/tmp/portage/dev-lang/rust-1.31.1/work
>>> Unpacking rust-1.30.1-x86_64-unknown-linux-gnu.tar.xz to /var/tmp/portage/dev-lang/rust-1.31.1/work
>>> Source unpacked in /var/tmp/portage/dev-lang/rust-1.31.1/work
>>> Preparing source in /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src ...
install: creating uninstall script at /var/tmp/portage/dev-lang/rust-1.31.1/work/rust-stage0/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rls-preview'
install: installing component 'clippy-preview'
install: installing component 'rustfmt-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'rust-analysis-x86_64-unknown-linux-gnu'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'

    Rust is ready to roll.

 * Applying 1.30.1-clippy-sysroot.patch  ...
/var/tmp/portage/dev-lang/rust-1.31.1/temp/environment: line 1172: /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch : No such file or directory                                                                                                           [ !! ]
 * ERROR: dev-lang/rust-1.31.1::myoverlay failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch 
 * 
 * Call stack:
 *               ebuild.sh, line   92:  Called src_prepare
 *             environment, line 4389:  Called default
 *      phase-functions.sh, line  868:  Called default_src_prepare
 *      phase-functions.sh, line  933:  Called __eapi6_src_prepare
 *             environment, line  270:  Called eapply '/var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch '
 *             environment, line 1237:  Called _eapply_patch '/var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch '
 *             environment, line 1175:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch '
 *   isolated-functions.sh, line  121:  Called die
 * The specific snippet of code:
 *           die "$@"
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/rust-1.31.1::myoverlay'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/rust-1.31.1::myoverlay'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/rust-1.31.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/rust-1.31.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src'
 * S: '/var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src'

>>> Failed to emerge dev-lang/rust-1.31.1, Log file:

>>>  '/var/tmp/portage/dev-lang/rust-1.31.1/temp/build.log'

 * Messages for package dev-lang/rust-1.31.1:

 * ERROR: dev-lang/rust-1.31.1::myoverlay failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch 
 * 
 * Call stack:
 *               ebuild.sh, line   92:  Called src_prepare
 *             environment, line 4389:  Called default
 *      phase-functions.sh, line  868:  Called default_src_prepare
 *      phase-functions.sh, line  933:  Called __eapi6_src_prepare
 *             environment, line  270:  Called eapply '/var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch '
 *             environment, line 1237:  Called _eapply_patch '/var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch '
 *             environment, line 1175:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch '
 *   isolated-functions.sh, line  121:  Called die
 * The specific snippet of code:
 *           die "$@"
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/rust-1.31.1::myoverlay'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/rust-1.31.1::myoverlay'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/rust-1.31.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/rust-1.31.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src'
 * S: '/var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src'

 

The error is: 

 * Applying 1.30.1-clippy-sysroot.patch  ...
/var/tmp/portage/dev-lang/rust-1.31.1/temp/environment: line 1172: /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch : No such file or directory                                                                                                           [ !! ]
 * ERROR: dev-lang/rust-1.31.1::myoverlay failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch 

 

But the file /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch exists! ?

 # ls -lash /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch
4.0K -rw-r--r-- 1 root root 2.9K Jan 11 15:45 /var/tmp/portage/dev-lang/rust-1.31.1/files/1.30.1-clippy-sysroot.patch

 

What can I do ?

My best regards.

Duca.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

HI.

I made a diff in my ebuilds and I found this:

# diff -U3 rust-1.31.1.ebuild rust-1.31.1.ebuild.org
--- rust-1.31.1.ebuild    2019-01-14 12:14:15.347938069 -0300
+++ rust-1.31.1.ebuild.org    2019-01-11 16:15:51.107828478 -0300
@@ -62,7 +62,7 @@
 
 S="${WORKDIR}/${MY_P}-src"
 
-PATCHES=( "${FILESDIR}"/1.30.1-clippy-sysroot.patch )
+PATCHES=( "${FILESDIR}"/1.30.1-clippy-sysroot.patch )
 
 toml_usex() {
     usex "$1" true false
@@ -70,7 +70,7 @@
 
 pre_build_checks() {
     CHECKREQS_DISK_BUILD="7G"
-    CHECKREQS_MEMORY="3G"
+    CHECKREQS_MEMORY="4G"
     eshopts_push -s extglob
     if is-flagq '-g?(gdb)?([1-9])'; then
         CHECKREQS_DISK_BUILD="10G"

 

I don't know why the PATCHES line is different, it seems equal to me. But,  I deleted all l files and I changed the files againd.
And now:

# diff -U3 rust-1.31.1.ebuild.org rust-1.31.1.ebuild
--- rust-1.31.1.ebuild.org    2019-01-14 14:27:13.771672610 -0300
+++ rust-1.31.1.ebuild    2019-01-14 14:27:26.735672179 -0300
@@ -70,7 +70,7 @@
 
 pre_build_checks() {
     CHECKREQS_DISK_BUILD="7G"
-    CHECKREQS_MEMORY="4G"
+    CHECKREQS_MEMORY="3G"
     eshopts_push -s extglob
     if is-flagq '-g?(gdb)?([1-9])'; then
         CHECKREQS_DISK_BUILD="10G"

 

I repeated the digest command and now the emerge works.

 # emerge rust
Calculating dependencies... done!

>>> Verifying ebuild manifests
>>> Running pre-merge checks for dev-lang/rust-1.31.1
 * Checking for at least 3 GiB RAM ...                                                                                               [ ok ]
 * Checking for at least 7 GiB disk space at "/var/tmp/portage/dev-lang/rust-1.31.1/temp" ...                                        [ ok ]

>>> Emerging (1 of 1) dev-lang/rust-1.31.1::myoverlay
 * rustc-1.31.1-src.tar.xz SHA512 size ;-) ...                                                                                       [ ok ]
 * rust-1.30.1-x86_64-unknown-linux-gnu.tar.xz SHA512 size ;-) ...                                                                   [ ok ]
 * Checking for at least 3 GiB RAM ...                                                                                               [ ok ]
 * Checking for at least 7 GiB disk space at "/var/tmp/portage/dev-lang/rust-1.31.1/temp" ...                                        [ ok ]
>>> Unpacking source...
>>> Unpacking rustc-1.31.1-src.tar.xz to /var/tmp/portage/dev-lang/rust-1.31.1/work
>>> Unpacking rust-1.30.1-x86_64-unknown-linux-gnu.tar.xz to /var/tmp/portage/dev-lang/rust-1.31.1/work
>>> Source unpacked in /var/tmp/portage/dev-lang/rust-1.31.1/work
>>> Preparing source in /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src ...
install: creating uninstall script at /var/tmp/portage/dev-lang/rust-1.31.1/work/rust-stage0/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rls-preview'
install: installing component 'clippy-preview'
install: installing component 'rustfmt-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'rust-analysis-x86_64-unknown-linux-gnu'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'

    Rust is ready to roll.

 * Applying 1.30.1-clippy-sysroot.patch ...                                                                                          [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src ...

 

The problem is solved.

Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...