Created attachment 470682 [details] Output of "emerge --info www-client/w3m" www-client/w3m fails to build due to an error in a "sed" expression in the ebuild file w3m-0.5.3-r9.ebuild. Text output of "emerge --oneshot www-client/w3m": Calculating dependencies ... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) www-client/w3m-0.5.3-r9::gentoo * w3m-0.5.3.git20161120.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Source unpacked in /var/tmp/portage/www-client/w3m-0.5.3-r9/work >>> Preparing source in /var/tmp/portage/www-client/w3m-0.5.3-r9/work/w3m-0.5.3.git20161120 ... * Applying w3m-0.5.3-underlinking.patch ... [ ok ] * Applying w3m-0.5.3-fix-missing-time.patch ... [ ok ] sed: -e expression #1, char 13: unknown option to `s' * ERROR: www-client/w3m-0.5.3-r9::gentoo failed (prepare phase): * (no error message) * * Call stack: * ebuild.sh, line 115: Called src_prepare * environment, line 2871: Called die * The specific snippet of code: * sed -i -e "/^AR=/s/ar/$(tc-getAR)/" {.,w3mimg,libwc}/Makefile.in || die; * * If you need support, post the output of `emerge --info '=www-client/w3m-0.5.3-r9::gentoo'`, * the complete build log and the output of `emerge -pqv '=www-client/w3m-0.5.3-r9::gentoo'`. * The complete build log is located at '/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/environment'. * Working directory: '/var/tmp/portage/www-client/w3m-0.5.3-r9/work/w3m-0.5.3.git20161120' * S: '/var/tmp/portage/www-client/w3m-0.5.3-r9/work/w3m-0.5.3.git20161120' >>> Failed to emerge www-client/w3m-0.5.3-r9 --- Line 45 of the ebuild file contains the sed expression under the src_prepare section: src_prepare() { default ecvs_clean sed -i -e "/^AR=/s/ar/$(tc-getAR)/" {.,w3mimg,libwc}/Makefile.in || die hprefixify acinclude.m4 eautoconf } ---- Oddly, simply removing that "sed" line causes the package to build and install with no errors. This is not exactly an elegant solution (I assume that line was there for a reason). It's merely a crude workaround.
Created attachment 470684 [details] /var/tmp/portage/www-client/w3m-0.5.3-r9/temp/build.log
Created attachment 470686 [details] /var/tmp/portage/www-client/w3m-0.5.3-r9/temp/environment
$(tc-getAR) can contain / characters, so a safer separator should be used for sed command. Example: sed -i -e "/^AR=/s:ar:$(tc-getAR):" {.,w3mimg,libwc}/Makefile.in || die
Fixed: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6c75d3aa92d057cc5756786410dfbb8094ce2c2