Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950584 - net-im/swift-4.0.3-r2 - [go-1.24] [ffmpeg] escons failed.
Summary: net-im/swift-4.0.3-r2 - [go-1.24] [ffmpeg] escons failed.
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Conrad Kostecki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-04 18:01 UTC by Toralf Förster
Modified: 2025-03-30 12:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,19.78 KB, text/plain)
2025-03-04 18:01 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,240.66 KB, text/plain)
2025-03-04 18:01 UTC, Toralf Förster
Details
environment (environment,107.98 KB, text/plain)
2025-03-04 18:01 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1016 bytes, application/x-xz)
2025-03-04 18:01 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,23.83 KB, application/x-xz)
2025-03-04 18:01 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,14.06 KB, application/x-xz)
2025-03-04 18:01 UTC, Toralf Förster
Details
net-im:swift-4.0.3-r2:20250304-142251.log (net-im:swift-4.0.3-r2:20250304-142251.log,4.83 KB, text/plain)
2025-03-04 18:01 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,66.90 KB, application/x-xz)
2025-03-04 18:01 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,24.18 KB, application/x-xz)
2025-03-04 18:01 UTC, Toralf Förster
Details
fix build with scons-4.9.0 (swift-4.0.3-scons-4.9.0.patch,1023 bytes, patch)
2025-03-28 20:30 UTC, Bill Prendergast
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2025-03-04 18:01:33 UTC
too long lines were shrinked:

scons -j4 ar=x86_64-pc-linux-gnu-ar allow_warnings=yes assertions=no build_examples=yes boost_bundled_enable=false boost_force_bundled=false cc=x86_64-pc-linux-gnu-gcc ccache=no ccflags=-O2 -pipe -march=native -fno-diagnostics-color coverage=no cxx=x86_64-pc-linux-gnu-g++ cxxflags=-O2 -pipe -march=n
scons: Reading SConscript files ...

scons: *** Path does not exist for variable 'icu': 'no'
File "/var/tmp/portage/net-im/swift-4.0.3-r2/work/swift-swift-4.0.3/SConstruct", line 1, in <module>
 * ERROR: net-im/swift-4.0.3-r2::gentoo failed (compile phase):
 *   escons failed.
 * 
 * Call stack:

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_no_multilib_systemd-20250228-184508

  UNMASKED:

  [ffmpeg] Requested by sam
  =media-video/ffmpeg-7*

  [go-1.24] Requested by WilliamH - maybe block bug 950018
  <dev-lang/go-9999

  The attached etc.portage.tar.xz has all details.
  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-14 *
clang version 19.1.7
llvm-config: 19.1.7
Python 3.12.9
go version go1.24.0 linux/amd64
  [1]   php8.2
  [2]   php8.3 *
Available Ruby profiles:
  [1]   ruby32 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.85.0 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 21.0.6_p7 [openjdk-bin-21]
2)	Eclipse Temurin JDK 8.442_p06 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-21  system-vm


  HEAD of ::gentoo
commit 1983d888d4447a22c3d0e4a05c9c0b05fc7f7738
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Mar 4 13:33:32 2025 +0000

    2025-03-04 13:33:31 UTC

emerge -qpvO =net-im/swift-4.0.3-r2
[ebuild  N    ] net-im/swift-4.0.3-r2  USE="icu idn lua -expat -test -zeroconf" LUA_SINGLE_TARGET="lua5-1 -luajit"
Comment 1 Toralf Förster gentoo-dev 2025-03-04 18:01:34 UTC
Created attachment 920209 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2025-03-04 18:01:35 UTC
Created attachment 920210 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2025-03-04 18:01:37 UTC
Created attachment 920211 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2025-03-04 18:01:37 UTC
Created attachment 920212 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2025-03-04 18:01:38 UTC
Created attachment 920213 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2025-03-04 18:01:39 UTC
Created attachment 920214 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2025-03-04 18:01:40 UTC
Created attachment 920215 [details]
net-im:swift-4.0.3-r2:20250304-142251.log
Comment 8 Toralf Förster gentoo-dev 2025-03-04 18:01:41 UTC
Created attachment 920216 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2025-03-04 18:01:42 UTC
Created attachment 920217 [details]
temp.tar.xz
Comment 10 Bill Prendergast 2025-03-28 18:34:00 UTC
The build fails due to behaviour change in dev-build/scons-4.9.0

From: https://scons.org/scons-490-is-available.html

FIXES
PackageVariable now does what the documentation always said it does if the variable is used on the command line with one of the enabling string as the value: the variable's default value is produced (previously it always produced True in this case).

I'm finding scons to be a bit opaque.
By changing the net-im/swift-4.0.3 SConscript.boot from default "no" to default "search" for icu allows the package to be built with or without icu

vars.Add(PackageVariable("icu", "ICU library location", "no"))

vars.Add(PackageVariable("icu", "ICU library location", "search"))

but I'm not sure that's the correct solution.
Comment 11 Conrad Kostecki gentoo-dev 2025-03-28 20:19:54 UTC
Thanks. Sounds reasonable for me.
Comment 12 Larry the Git Cow gentoo-dev 2025-03-28 20:25:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=719db758e9f3ed8c96acb2df6ded739fab2b22bd

commit 719db758e9f3ed8c96acb2df6ded739fab2b22bd
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2025-03-28 20:23:51 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2025-03-28 20:24:58 +0000

    net-im/swift: add fix for >=scons-4.9.0
    
    Closes: https://bugs.gentoo.org/950584
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 net-im/swift/files/swift-4.0.3-scons-4.9.0.patch | 11 +++++++++++
 net-im/swift/swift-4.0.3-r2.ebuild               |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)
Comment 13 Bill Prendergast 2025-03-28 20:30:24 UTC
Created attachment 923206 [details, diff]
fix build with scons-4.9.0

The patch just trivially changes the default in BuildTools/SCons/SConscript.boot
Comment 14 Bill Prendergast 2025-03-28 21:43:33 UTC
I'm not actually convinced that this isn't a bug in Scons ... I think the PackageVariable function's _converter might be missing an elif:

def _converter(val: str | bool, default: str) -> str | bool:
#<== trimmed ==>
        lval = val.lower()
    if lval in DISABLE_STRINGS:
        return False
    if lval in ENABLE_STRINGS:
        # Can't return the default if it is one of the enable/disable strings;
        # test code expects a bool.
        if default in ENABLE_STRINGS:
            return True
        else:
            return default
    return val

looks to me that the `default` arg is a str, (was "no" is now "search") so when the cli gets 'icu=yes' it tests against ENABLE_STRINGS finds it and then tests `default` against ENABLE_STRINGS doesn't find it and returns `default` which is now a string (rather than bool). This then gets passed to the _validator which sees the str and not a bool and so tests it as a path.
I suspect the above should have been:

        lval = val.lower()
    if lval in DISABLE_STRINGS:
        return False
    if lval in ENABLE_STRINGS:
        # Can't return the default if it is one of the enable/disable strings;
        # test code expects a bool.
        if default in ENABLE_STRINGS:
            return True
        elif default in DISABLE_STRINGS:
            return True
        else:
            return default
    return val

waiting on response on discord from scons maintainers
Comment 15 Bill Prendergast 2025-03-28 21:45:01 UTC
gah typos

        lval = val.lower()
    if lval in DISABLE_STRINGS:
        return False
    if lval in ENABLE_STRINGS:
        # Can't return the default if it is one of the enable/disable strings;
        # test code expects a bool.
        if default in ENABLE_STRINGS:
            return True
        elif default in DISABLE_STRINGS:
            return False
        else:
            return default
    return val
Comment 16 Conrad Kostecki gentoo-dev 2025-03-28 21:45:38 UTC
Thanks for your further investigation. I will reopen here, until you have a response from upstream.
Comment 17 Bill Prendergast 2025-03-29 22:38:58 UTC
Bug was in dev-build/scons-4.9.0 - dev-build/scons-4.9.1

upstream bug:
https://github.com/SCons/scons/issues/4702

closed in:
https://github.com/SCons/scons/pull/4703

Fix should be in next release of dev-build/scons (4.9.2)
Comment 18 Conrad Kostecki gentoo-dev 2025-03-30 12:33:27 UTC
Thanks. I will drop patch when 4.9.2 becomes stable and available in tree.