Well, in that case, we could detect version 3.0.1 (there is a function to
get the version I believe) and do the monkey patch they suggest in the
email. The fix was just adding that little function they show, which did
not exist at all in version 3.0.1. I would have to look up exactly how you
monkey patch things in python, but I think that's all that should be
necessary. When we drop support for 3.0.1, then we can drop our hack fix
also.

Gabe

On Tue, Apr 5, 2022 at 3:12 PM Bobby Bruce <bbr...@ucdavis.edu> wrote:

> I think we need to have a little discussion on this. The problem with
> increasing the scons version is we support Ubuntu 18.04 (Official
> end-of-support not until April 2023) which if you run `apt install scons`
> will give you v3.0.1. So, increasing this the scons version requirements
> will hurt these users.
>
> I think our solutions here are either:
>
> 1) Drop support for Ubuntu 18.04 in the next release.
> 2) Have a work-around available for Ubuntu 18.04 users.
> 3) Maintain v3.01 as the minimum scons dependency and work around that.
>
> Unfortunately, none of these are very appealing.
>
> In the interests of not having the compiler tests fail for another night,
> can we revert this commit until we figure out exactly what we want to do?
>
> --
> Dr. Bobby R. Bruce
> Room 3050,
> Kemper Hall, UC Davis
> Davis,
> CA, 95616
>
> web: https://www.bobbybruce.net
>
>
> On Tue, Apr 5, 2022 at 1:34 PM Gabe Black <gabe.bl...@gmail.com> wrote:
>
>> The bug in SCons was fixed in version 3.0.2. I have a CL which updates
>> the required version here:
>>
>> https://gem5-review.googlesource.com/c/public/gem5/+/58629
>>
>> I'm assuming some docker configuration something will need to be updated
>> to use SCons version 3.0.2 instead of the 3.0.1 it seems to be using.
>>
>> Gabe
>>
>> On Tue, Apr 5, 2022 at 4:13 PM Gabe Black <gabe.bl...@gmail.com> wrote:
>>
>>> I think this is actually a bug in SCons. This docker image seems to be
>>> using the minimum version of it we support, which I think is where the
>>> problem is coming from and not the compiler versions. There is a
>>> "fix"/workaround in this email thread which I haven't tried yet, and which
>>> is a bit of a hack.
>>>
>>> https://pairlist2.pair.net/pipermail/scons-dev/2018-October/004766.html
>>>
>>> I'm not sure when this bug would have been fixed, or what the best way
>>> to check if we need to monkey patch around it. If we can find the version
>>> of SCons where it was fixed and it's not that much more recent, bumping up
>>> past it may be the easiest.
>>>
>>> I think the reason this becomes visible with the change above is that
>>> more SCons code is run unconditionally, and so the fast model code is now
>>> being run in the test environment where it is disabled and just skipped
>>> wholesale before.
>>>
>>> Gabe
>>>
>>> On Tue, Apr 5, 2022 at 3:06 AM Gabe Black <gabe.bl...@gmail.com> wrote:
>>>
>>>> Yes, I'll take a look.
>>>>
>>>> Gabe
>>>>
>>>> On Mon, Apr 4, 2022 at 3:02 PM Bobby Bruce <bbr...@ucdavis.edu> wrote:
>>>>
>>>>> I don't fully understand the issue, but after doing a bisect, the
>>>>> commit causing these issues is
>>>>> https://gem5-review.googlesource.com/c/public/gem5/+/58356.
>>>>>
>>>>> To reproduce locally:
>>>>>
>>>>> ```
>>>>> docker run -u $UID:$GID --rm -v $(pwd):$(pwd) -w $(pwd)
>>>>> gcr.io/gem5-test/clang-version-9 python3 /usr/bin/scons
>>>>> build/NULL/gem5.opt -j`nproc`
>>>>> ```
>>>>>
>>>>> which will return:
>>>>>
>>>>> ```
>>>>> scons: *** [build/RISCV/gem5.opt] TypeError `unhashable type:
>>>>> 'Literal'' trying to evaluate `${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX,
>>>>> __env__)}'
>>>>> ```
>>>>>
>>>>>
>>>>> This only appears to affect older versions of clang and gcc, though we
>>>>> still support these so this needs to be fixed.
>>>>>
>>>>>
>>>>> Reverting the offending commit, `git revert
>>>>> 3b6ea3dfa9055fcd7fb83738b11d00ac00f813ce`, does appear to fix this problem
>>>>> on the develop branch.
>>>>>
>>>>>
>>>>> @Gabe: Can you have a look into this and see if there's any better fix
>>>>> than just reverting this change?
>>>>>
>>>>> --
>>>>> Kind regards,
>>>>> Bobby
>>>>> --
>>>>> Dr. Bobby R. Bruce
>>>>> Room 3050,
>>>>> Kemper Hall, UC Davis
>>>>> Davis,
>>>>> CA, 95616
>>>>>
>>>>> web: https://www.bobbybruce.net
>>>>>
>>>>>
>>>>> On Fri, Apr 1, 2022 at 8:12 AM Jason Lowe-Power via gem5-dev <
>>>>> gem5-dev@gem5.org> wrote:
>>>>> >
>>>>> > Interesting errors. See
>>>>> https://jenkins.gem5.org/job/compiler-checks/189/artifact/compile-test-out/clang-version-9/
>>>>> for more info. I think this is a scons error, as it looks like python.
>>>>> >
>>>>> > scons: *** [build/RISCV/gem5.opt] TypeError `unhashable type:
>>>>> 'Literal'' trying to evaluate `${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX,
>>>>> __env__)}'
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > On Fri, Apr 1, 2022 at 5:21 AM jenkins-no-reply--- via gem5-dev <
>>>>> gem5-dev@gem5.org> wrote:
>>>>> >>
>>>>> >> See <
>>>>> https://jenkins.gem5.org/job/compiler-checks/189/display/redirect?page=changes
>>>>> >
>>>>> >>
>>>>> >> Changes:
>>>>> >>
>>>>> >> [gabe.black] scons: Remove an error check from the ProtoBuf
>>>>> declare-er.
>>>>> >>
>>>>> >> [yenlinlai] scons: Allow sources and libs called multiple times
>>>>> >>
>>>>> >> [gabe.black] scons: Add a priority field to the SourceLib construct.
>>>>> >>
>>>>> >> [gabe.black] scons: Get rid of an unused fast model variable.
>>>>> >>
>>>>> >> [gabe.black] scons: Tone down a fast model error into a warning.
>>>>> >>
>>>>> >> [gabe.black] scons: Stop the fast model project file parser from
>>>>> writing files.
>>>>> >>
>>>>> >> [gabe.black] scons: Rework the fastmodel extract_var helper.
>>>>> >>
>>>>> >> [gabe.black] scons: Only warn about not finding fast model libs if
>>>>> it's enabled.
>>>>> >>
>>>>> >> [gabe.black] scons: Add a tag for arm fastmodel and use it.
>>>>> >>
>>>>> >>
>>>>> >> ------------------------------------------
>>>>> >> Started by timer
>>>>> >> Running as SYSTEM
>>>>> >> Building in workspace <
>>>>> https://jenkins.gem5.org/job/compiler-checks/ws/>
>>>>> >> The recommended git tool is: NONE
>>>>> >> No credentials specified
>>>>> >>  > git rev-parse --resolve-git-dir <
>>>>> https://jenkins.gem5.org/job/compiler-checks/ws/.git> # timeout=10
>>>>> >> Fetching changes from the remote Git repository
>>>>> >>  > git config remote.origin.url
>>>>> https://gem5.googlesource.com/public/gem5 # timeout=10
>>>>> >> Fetching upstream changes from
>>>>> https://gem5.googlesource.com/public/gem5
>>>>> >>  > git --version # timeout=10
>>>>> >>  > git --version # 'git version 2.25.1'
>>>>> >>  > git fetch --tags --force --progress --
>>>>> https://gem5.googlesource.com/public/gem5
>>>>> +refs/heads/*:refs/remotes/origin/* # timeout=10
>>>>> >>  > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
>>>>> >> Checking out Revision 3b6ea3dfa9055fcd7fb83738b11d00ac00f813ce
>>>>> (refs/remotes/origin/develop)
>>>>> >>  > git config core.sparsecheckout # timeout=10
>>>>> >>  > git checkout -f 3b6ea3dfa9055fcd7fb83738b11d00ac00f813ce #
>>>>> timeout=10
>>>>> >> Commit message: "scons: Add a tag for arm fastmodel and use it."
>>>>> >>  > git rev-list --no-walk 118b069d5d238c68afbe29d11878137746b3c375
>>>>> # timeout=10
>>>>> >> [Checks API] No suitable checks publisher found.
>>>>> >> [compiler-checks] $ /bin/sh -xe /tmp/jenkins10877671131247552434.sh
>>>>> >> + ./tests/compiler-tests.sh -j 16
>>>>> >> Starting build tests with 'gcc-version-11'...
>>>>> >> 'gcc-version-11' was found in the comprehensive tests. All ISAs
>>>>> will be built.
>>>>> >>   * Building target 'X86_MI_example.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86_MI_example.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MOESI_hammer.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MOESI_hammer.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'POWER.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'POWER.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'RISCV.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'RISCV.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level.opt' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'Garnet_standalone.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'Garnet_standalone.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MESI_Two_Level.opt' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MESI_Two_Level.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.opt' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86_MOESI_AMD_Base.opt' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86_MOESI_AMD_Base.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_token.opt' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_token.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'SPARC.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'SPARC.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_hammer.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_hammer.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'MIPS.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'MIPS.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level_HTM.opt' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level_HTM.fast' with
>>>>> 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'GCN3_X86.opt' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'GCN3_X86.fast' with 'gcc-version-11'...
>>>>> >>     Done.
>>>>> >> Starting build tests with 'gcc-version-10'...
>>>>> >>   * Building target 'POWER.opt' with 'gcc-version-10'...
>>>>> >>     Done.
>>>>> >>   * Building target 'POWER.fast' with 'gcc-version-10'...
>>>>> >>     Done.
>>>>> >> Starting build tests with 'gcc-version-9'...
>>>>> >>   * Building target 'NULL.opt' with 'gcc-version-9'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL.fast' with 'gcc-version-9'...
>>>>> >>     Done.
>>>>> >> Starting build tests with 'gcc-version-8'...
>>>>> >>   * Building target 'SPARC.opt' with 'gcc-version-8'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >>   * Building target 'SPARC.fast' with 'gcc-version-8'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >> Starting build tests with 'gcc-version-7'...
>>>>> >>   * Building target 'GCN3_X86.opt' with 'gcc-version-7'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >>   * Building target 'GCN3_X86.fast' with 'gcc-version-7'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >> Starting build tests with 'clang-version-12'...
>>>>> >> 'clang-version-12' was found in the comprehensive tests. All ISAs
>>>>> will be built.
>>>>> >>   * Building target 'NULL_MESI_Two_Level.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MESI_Two_Level.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level_HTM.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level_HTM.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'GCN3_X86.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'GCN3_X86.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'POWER.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'POWER.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_hammer.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_hammer.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'RISCV.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'RISCV.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MOESI_hammer.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MOESI_hammer.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86_MI_example.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86_MI_example.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'ARM_MESI_Three_Level.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'SPARC.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'SPARC.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'Garnet_standalone.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'Garnet_standalone.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'MIPS.opt' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'MIPS.fast' with 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86_MOESI_AMD_Base.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'X86_MOESI_AMD_Base.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_token.opt' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_token.fast' with
>>>>> 'clang-version-12'...
>>>>> >>     Done.
>>>>> >> Starting build tests with 'clang-version-11'...
>>>>> >>   * Building target 'Garnet_standalone.opt' with
>>>>> 'clang-version-11'...
>>>>> >>     Done.
>>>>> >>   * Building target 'Garnet_standalone.fast' with
>>>>> 'clang-version-11'...
>>>>> >>     Done.
>>>>> >> Starting build tests with 'clang-version-10'...
>>>>> >>   * Building target 'NULL_MESI_Two_Level.opt' with
>>>>> 'clang-version-10'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MESI_Two_Level.fast' with
>>>>> 'clang-version-10'...
>>>>> >>     Done.
>>>>> >> Starting build tests with 'clang-version-9'...
>>>>> >>   * Building target 'RISCV.opt' with 'clang-version-9'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >>   * Building target 'RISCV.fast' with 'clang-version-9'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >> Starting build tests with 'clang-version-8'...
>>>>> >>   * Building target 'RISCV.opt' with 'clang-version-8'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >>   * Building target 'RISCV.fast' with 'clang-version-8'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >> Starting build tests with 'clang-version-7'...
>>>>> >>   * Building target 'X86_MI_example.opt' with 'clang-version-7'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >>   * Building target 'X86_MI_example.fast' with 'clang-version-7'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >> Starting build tests with 'clang-version-6.0'...
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.opt' with
>>>>> 'clang-version-6.0'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.fast' with
>>>>> 'clang-version-6.0'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >> Starting build tests with 'ubuntu-18.04_all-dependencies'...
>>>>> >>   * Building target 'X86_MI_example.opt' with
>>>>> 'ubuntu-18.04_all-dependencies'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >>   * Building target 'X86_MI_example.fast' with
>>>>> 'ubuntu-18.04_all-dependencies'...
>>>>> >>   ! Failed with exit code 2.
>>>>> >> Starting build tests with 'ubuntu-20.04_all-dependencies'...
>>>>> >>   * Building target 'NULL_MOESI_hammer.opt' with
>>>>> 'ubuntu-20.04_all-dependencies'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_hammer.fast' with
>>>>> 'ubuntu-20.04_all-dependencies'...
>>>>> >>     Done.
>>>>> >> Starting build tests with 'ubuntu-20.04_min-dependencies'...
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.opt' with
>>>>> 'ubuntu-20.04_min-dependencies'...
>>>>> >>     Done.
>>>>> >>   * Building target 'NULL_MOESI_CMP_directory.fast' with
>>>>> 'ubuntu-20.04_min-dependencies'...
>>>>> >>     Done.
>>>>> >> Build step 'Execute shell' marked build as failure
>>>>> >> Archiving artifacts
>>>>> >> _______________________________________________
>>>>> >> gem5-dev mailing list -- gem5-dev@gem5.org
>>>>> >> To unsubscribe send an email to gem5-dev-le...@gem5.org
>>>>> >> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>>>>> >
>>>>> > _______________________________________________
>>>>> > gem5-dev mailing list -- gem5-dev@gem5.org
>>>>> > To unsubscribe send an email to gem5-dev-le...@gem5.org
>>>>> > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>>>>>
>>>>
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to