Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 809437

Summary: sys-devel/flex fails to cross-compile
Product: Gentoo Linux Reporter: Thomas Sachau <tommy>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=835766
Whiteboard:
Package list:
Runtime testing required: ---

Description Thomas Sachau gentoo-dev 2021-08-21 17:54:30 UTC
sys-devel/flex does only install all files for the native ABI and only a limited set for all other ABIs. But in src_install it tries to rm "${ED}"/usr/share/doc/${PF}/COPYING for all ABIs. Since the file does not exist for none-default ABIs, this fails.

Simple solution: Only rm this file for the native ABI.
Comment 1 David Seifert gentoo-dev 2021-08-21 19:00:51 UTC
This sounds like a portage-multilib bug, without any additional info.
Comment 2 Thomas Sachau gentoo-dev 2021-09-19 07:53:03 UTC
This is an issue for any external tool that cross-compiles the package (like cross-toolchain, prefix and multilib-portage, check bug 711590 for ncurses as an example). I for myself and for multilib-portage can workaround this by setting COMPLETE_MULTILIB=yes in the environment.

The easiest way to fix this for everyone (as COPYING should the the same for any target ABI) would be to use 'if multilib_is_native_abi; then  rm "${ED}"/usr/share/doc/${PF}/COPYING || die ; fi' to only remove the file when it is actually installed.
Comment 3 Mike Gilbert gentoo-dev 2021-09-20 14:29:11 UTC
multilib_src_install_all should only be invoked once, for the default ABI.

The only way I can see a problem is if src_install is invoked more than once. That would not happen under normal circumstances.

Please provide a build log demonstrating the problem.