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

Bug 710486

Summary: media-gfx/tachyon-0.99_beta6-r1 : * sed failed
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Alexey Shvetsov <alexxy>
Status: CONFIRMED ---    
Severity: normal CC: frp.bissey, mjo, sci
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 685160    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
media-gfx:tachyon-0.99_beta6-r1:20200222-122348.log

Description Toralf Förster gentoo-dev 2020-02-22 14:26:44 UTC
sed: -e expression #2, char 67: unknown option to `s'
 * ERROR: media-gfx/tachyon-0.99_beta6-r1::gentoo failed (prepare phase):
 *   sed failed
 * 
 * Call stack:
 *     ebuild.sh, line 125:  Called src_prepare

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_developer-20200221-195709

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *


llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.6
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.14.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm


repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Sat, 22 Feb 2020 11:11:21 +0000

emerge -qpvO media-gfx/tachyon
[ebuild  N    ] media-gfx/tachyon-0.99_beta6-r1  USE="jpeg opengl png -doc -examples -mpi -threads"
Comment 1 Toralf Förster gentoo-dev 2020-02-22 14:26:47 UTC
Created attachment 615106 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-02-22 14:26:49 UTC
Created attachment 615108 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-02-22 14:26:52 UTC
Created attachment 615110 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-02-22 14:26:55 UTC
Created attachment 615112 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-02-22 14:26:58 UTC
Created attachment 615114 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-02-22 14:27:00 UTC
Created attachment 615116 [details]
media-gfx:tachyon-0.99_beta6-r1:20200222-122348.log
Comment 7 François Bissey 2020-02-22 18:47:26 UTC
It looks to me like
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/tachyon/tachyon-0.99_beta6-r1.ebuild#n97
should really be three "-e" lines. May be older versions of sed where tolerating this and not the latest one.
Comment 8 Michael Orlitzky gentoo-dev 2020-03-25 00:23:05 UTC
Actually this was because Toralf has colons in his CFLAGS,

  CFLAGS="-O2 -pipe -march=native -fno-common -falign-functions=32:25:16"

and because the failing sed command is (a) using double quotes, and (b) using colons as the pattern separator.

This fixes it for me, by using single quotes and by delaying the expansion of CFLAGS until build-time:

@@ -95,8 +95,8 @@ src_prepare() {
        fi
        sed -i \
                -e "s:-O3::g;s:-g::g;s:-pg::g" \
-               -e "s:-m32:${CFLAGS}:g" \
-               -e "s:-m64:${CFLAGS}:g" \
+               -e 's:-m32:$(CFLAGS):g' \
+               -e 's:-m64:$(CFLAGS):g' \
                -e "s:-ffast-math::g" \
                -e "s:STRIP = strip:STRIP = touch:g" \
                -e "s:CC = *cc:CC = $(tc-getCC):g" \