For Gentoo/FreeBSD (and probably the other *BSD's that use non-GNU patch), the default options in EPATCH_COMMON_OPTS won't work with FreeBSD's copy of 'patch'. Specifically, the -g option: >>> Emerging (1 of 2) sys-devel/llvm-3.7.1-r1::gentoo * Fetching files in the background. * To view fetch progress, run in another terminal: * tail -f /var/log/emerge-fetch.log * llvm-3.7.1.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * compiler-rt-3.7.1.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * cfe-3.7.1.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * clang-tools-extra-3.7.1.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * llvm-3.7.0-manpages.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Checking for at least 1200 MiB disk space at "/ramfs/portage/sys-devel/llvm-3.7.1-r1/temp" ... [ ok ] >>> Unpacking source... >>> Unpacking llvm-3.7.1.src.tar.xz to /ramfs/portage/sys-devel/llvm-3.7.1-r1/work >>> Unpacking compiler-rt-3.7.1.src.tar.xz to /ramfs/portage/sys-devel/llvm-3.7.1-r1/work >>> Unpacking cfe-3.7.1.src.tar.xz to /ramfs/portage/sys-devel/llvm-3.7.1-r1/work >>> Unpacking clang-tools-extra-3.7.1.src.tar.xz to /ramfs/portage/sys-devel/llvm-3.7.1-r1/work >>> Unpacking llvm-3.7.0-manpages.tar.bz2 to /ramfs/portage/sys-devel/llvm-3.7.1-r1/work >>> Source unpacked in /ramfs/portage/sys-devel/llvm-3.7.1-r1/work >>> Preparing source in /ramfs/portage/sys-devel/llvm-3.7.1-r1/work/llvm-3.7.1.src ... * Applying llvm-3.7.0-ocaml-multilib.patch ... patch: invalid option -- g usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory] [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count] [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext] [--posix] [origfile [patchfile]] patch <patchfile [ !! ] * ERROR: sys-devel/llvm-3.7.1-r1::gentoo failed (prepare phase): * patch -p1 failed with /usr/portage/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch * * Call stack: * ebuild.sh, line 133: Called src_prepare * environment, line 4914: Called eapply '/usr/portage/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch' * environment, line 1363: Called _eapply_patch '/usr/portage/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch' * environment, line 1301: Called __helpers_die 'patch -p1 failed with /usr/portage/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch' * isolated-functions.sh, line 117: Called die AFAICT, the fix is to either not use options that aren't available or are incompatible with FreeBSD's patch, or get epatch to call 'gpatch' instead when on non-GNU systems, which is the GNU patch on those platforms, and should work with the arguments provided in EPATCH_COMMON_OPTS. Unless there's some magic widget I'm missing?
https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/default/bsd/fbsd/profile.bashrc#n6 Has alias stopped working? What profile is used? Show: python -c 'import portage; print("\n".join(portage.settings.profiles))'
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #1) > https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/default/bsd/fbsd/ > profile.bashrc#n6 > > Has alias stopped working? > > What profile is used? > Show: python -c 'import portage; print("\n".join(portage.settings.profiles))' Running the 10.2 profile at the moment: # python -c 'import portage; print("\n".join(portage.settings.profiles))' /usr/portage/profiles/base /usr/portage/profiles/default/bsd /usr/portage/profiles/default/bsd/fbsd /usr/portage/profiles/arch/base /usr/portage/profiles/features/multilib /usr/portage/profiles/features/multilib/lib32 /usr/portage/profiles/arch/amd64-fbsd/todo /usr/portage/profiles/arch/amd64-fbsd /usr/portage/profiles/default/bsd/fbsd/amd64 /usr/portage/profiles/releases /usr/portage/profiles/releases/freebsd-10.2 /usr/portage/profiles/default/bsd/fbsd/amd64/10.2 I saw that 10.3 was out, so I figured to give it a go and was updating the 10.2 VM, then ran into llvm and (I think) cmake bailing out because of epatch/eapply sending -g0 and --no-backup-if-mismatch to the BSD patch, which doesn't accept them. And what alias?
Alias is defined in place referenced by URL in comment #1: type -P gpatch > /dev/null && alias patch=gpatch But it is not working for previously defined _eapply_patch() function. *** This bug has been marked as a duplicate of bug 574626 ***