Skip to content

firrtlCrossModule.antlr4Path java.util.NoSuchElementException: empty.head #52

@vowstar

Description

@vowstar

Checklist

  • Did you specify the current behavior?
  • Did you specify the expected behavior?
  • Did you provide a code example showing the problem?
  • Did you describe your environment?
  • Did you specify relevant external information?

What is the current behavior?

build with error firrtlCrossModule.antlr4Path java.util.NoSuchElementException: empty.head

error massage:

[23/376] foreign-modules.dependencies.firrtl.build.firrtlCrossModule.antlr4Path 
1 targets failed
firrtlCrossModule.antlr4Path java.util.NoSuchElementException: empty.head
    scala.collection.immutable.Vector.head(Vector.scala:279)
    ammonite.$file.dependencies.firrtl.build$firrtlCrossModule.$anonfun$antlr4Path$4(build.sc:108)
    scala.collection.immutable.List.flatMap(List.scala:293)
    scala.collection.immutable.List.flatMap(List.scala:79)
    ammonite.$file.dependencies.firrtl.build$firrtlCrossModule.$anonfun$antlr4Path$3(build.sc:106)

What is the expected behavior?

Build without error.

Steps to Reproduce

  1. install antlr:2 and antlr:4 on gentoo
  2. clone https://github.com/chipsalliance/playground
  3. run mill sanitytests.rocketchip

After a while, the following error will appear firrtlCrossModule.antlr4Path java.util.NoSuchElementException: empty.head

After careful analysis, I found that the version information of antlr2 is printed on stderr, which will cause os.proc(f).call(check = false).out.lines.head.split(" ").last fails because the lines are empty.

I will submit a patch to fix this issue later.

Your environment

  • Chisel Verions: 3.5.4
  • OS: Linux t480 6.1.12-gentoo-x86_64 #1 SMP PREEMPT_DYNAMIC Sat Feb 18 15:07:52 CST 2023 x86_64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz GenuineIntel GNU/Linux
  • Verilator version: 5.006

External Information

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions