Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
git failed to emerge due to patch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
potasium_nitrate
n00b
n00b


Joined: 04 Oct 2024
Posts: 2

PostPosted: Fri Oct 04, 2024 8:09 pm    Post subject: git failed to emerge due to patch Reply with quote

I tried to emerge git but it gave me an error saying "Hunk #1 FAILED at 1157"
Also, I'm new to gentoo so sorry if this is a newbie question but nothing I tried searching for helped

Code:
* Applying git-2.37.2-unsafe-directory.patch ...
patching file setup.c
Hunk #1 FAILED at 1157.
1 out of 1 hunk FAILED -- saving rejects to file setup.c.rej                            [ !! ]
 * ERROR: dev-vcs/git-2.46.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/dev-vcs/git-2.46.2/files/git-2.37.2-unsafe-directory.patch
 *
 * Call stack:
 *               ebuild.sh, line  136:  Called src_prepare
 *             environment, line 3125:  Called default
 *      phase-functions.sh, line  874:  Called default_src_prepare
 *      phase-functions.sh, line  950:  Called __eapi8_src_prepare
 *             environment, line  347:  Called eapply '--' '/var/tmp/portage/dev-vcs/git-2.46.2/files/git-2.37.0_rc1-optional-cvs.patch' '/var/tmp/portage/dev-vcs/git-2.46.2/files/git-2.21.0-quiet-submodules-testcase.patch' '/var/tmp/portage/dev-vcs/git-2.46.2/files/git-2.37.2-unsafe-directory.patch'
 *             environment, line 1037:  Called _eapply_patch '/var/tmp/portage/dev-vcs/git-2.46.2/files/git-2.37.2-unsafe-directory.patch'
 *             environment, line  975:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/dev-vcs/git-2.46.2/files/git-2.37.2-unsafe-directory.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=dev-vcs/git-2.46.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-vcs/git-2.46.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-vcs/git-2.46.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-vcs/git-2.46.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-vcs/git-2.46.2/work/git-2.46.2'
 * S: '/var/tmp/portage/dev-vcs/git-2.46.2/work/git-2.46.2'
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22474

PostPosted: Fri Oct 04, 2024 8:18 pm    Post subject: Reply with quote

Welcome to the forums. This appears to be a bug, but I am surprised you encountered it. It should only trigger if you USE=-safe-directory, which is not the default. What is the output of the commands that your Portage output told you to provide ("If you need support, ...")?
Back to top
View user's profile Send private message
potasium_nitrate
n00b
n00b


Joined: 04 Oct 2024
Posts: 2

PostPosted: Sat Oct 05, 2024 3:51 am    Post subject: Reply with quote

my bad I forgot to include it
Code:
Portage 3.0.66.1 (python 3.12.6-final-0, default/linux/amd64/23.0/hardened, gcc-14, glibc-2.40-r3, 6.6.52-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.52-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-8250U_CPU_@_1.60GHz-with-glibc2.40
KiB Mem:    12011500 total,   9994620 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 28 Sep 2024 12:30:00 +0000
Head commit of repository gentoo: fc9b0c1588d39201761f3dc5bd61d106e098b698
Timestamp of repository guru: Thu, 03 Oct 2024 09:48:26 +0000
sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p2) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.30.3::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.6_p4::gentoo, 3.13.0_rc2_p2::gentoo
dev-lang/rust:             1.81.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.43-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             14.2.1_p20240921::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            18.1.8-r4::gentoo
sys-kernel/linux-headers:  6.10::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://codeberg.org/librewolf/gentoo.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64_hardened

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=native -flto=7 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O3 -pipe -march=native -flto=7 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O3 -pipe -march=native -flto=7 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O3 -pipe -march=native -flto=7 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
GENTOO_MIRRORS="https://mirror.leaseweb.com/gentoo/                rsync://mirror.leaseweb.com/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="reflex"
MAKEOPTS="-j8 -l8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-C target-cpu=native -C opt-level=3"
SHELL="/bin/zsh"
USE="alsa amd64 crypt dbus hardened idn kmod lto man multilib ncurses nls openrc openssl pam pie readline ssl ssp test-rust threads udev unicode verify-sig vulkan wayland wifi xattr xtpax" ABI_X86="64" ADA_TARGET="gnat_2021" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US" LCD_DEVICES="ncurses text" LLVM_SLOT="18" LUA_SINGLE_TARGET="luajit" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum