Skip to content

final_report.tcl calls gui::show in batch mode #4134

@alokkumardalei-wq

Description

@alokkumardalei-wq

Subject

[Flow] for any util, flow Makefile, or flow script issues.

Describe the bug

if { [ord::openroad_gui_compiled] } {
  gui::show "source $::env(SCRIPTS_DIR)/save_images.tcl" false
}
This is too broad for batch runs. A GUI-enabled OpenROAD build does not guarantee that GUI Tcl commands are available in the current session.

As a result, a normal ORFS flow can fail in the finish stage with:
```text
Error: final_report.tcl, 72 invalid command name "gui::show"

Expected Behavior

final_report.tcl should only call GUI commands when the GUI is actually available in the current run, or it should skip image generation in batch mode.

Environment

Git commit: 33c72bf7b8ce8a2dd81e2f6fbf0199a547b4f6a8
kernel: Darwin 24.5.0
os:             macOS           15.5
cmake version 4.2.3
CMake Warning at CMakeLists.txt:83 (message):
  OpenROAD git describe failed, using sha1 instead


CMake Warning at src/CMakeLists.txt:240 (message):
  spdlog: SPDLOG_FMT_EXTERNAL=ON


CMake Warning at /opt/homebrew/lib/cmake/ortools/modules/FindSCIP.cmake:49 (message):
  SCIP::libscip not provided
Call Stack (most recent call first):
  /opt/homebrew/share/cmake/Modules/CMakeFindDependencyMacro.cmake:93 (find_package)
  /opt/homebrew/share/cmake/Modules/CMakeFindDependencyMacro.cmake:125 (__find_dependency_common)
  /opt/homebrew/lib/cmake/ortools/ortoolsConfig.cmake:86 (find_dependency)
  src/gpl/CMakeLists.txt:12 (find_package)


CMake Warning at /opt/homebrew/lib/cmake/ortools/modules/FindSCIP.cmake:49 (message):
  SCIP::libscip not provided
Call Stack (most recent call first):
  /opt/homebrew/share/cmake/Modules/CMakeFindDependencyMacro.cmake:93 (find_package)
  /opt/homebrew/share/cmake/Modules/CMakeFindDependencyMacro.cmake:125 (__find_dependency_common)
  /opt/homebrew/lib/cmake/ortools/ortoolsConfig.cmake:86 (find_dependency)
  src/mpl/CMakeLists.txt:8 (find_package)


CMake Warning at /opt/homebrew/lib/cmake/ortools/modules/FindSCIP.cmake:49 (message):
  SCIP::libscip not provided
Call Stack (most recent call first):
  /opt/homebrew/share/cmake/Modules/CMakeFindDependencyMacro.cmake:93 (find_package)
  /opt/homebrew/share/cmake/Modules/CMakeFindDependencyMacro.cmake:125 (__find_dependency_common)
  /opt/homebrew/lib/cmake/ortools/ortoolsConfig.cmake:86 (find_dependency)
  src/par/CMakeLists.txt:18 (find_package)


CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/odb/src/3dblox/CMakeLists.txt:20 (target_link_libraries):
  The library that is being linked to, yaml-cpp, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target yaml-cpp is deprecated and will be removed in version 0.10.0.
  Use the yaml-cpp::yaml-cpp target instead.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OpenROAD version: 33c72bf7b8ce8a2dd81e2f6fbf0199a547b4f6a8
-- System name: Darwin
-- Compiler: AppleClang 17.0.0.17000013
-- Build type: RELEASE
-- Install prefix: /usr/local
-- C++ Standard: 20
-- C++ Standard Required: ON
-- C++ Extensions: OFF
-- LTO/IPO is enabled
-- The C compiler identification is AppleClang 17.0.0.17000013
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-alloc-size-larger-than
-- Performing Test C_COMPILER_SUPPORTS__-Wno-alloc-size-larger-than - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-alloc-size-larger-than
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-alloc-size-larger-than - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-attributes
-- Performing Test C_COMPILER_SUPPORTS__-Wno-attributes - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-attributes
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-attributes - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-aggressive-loop-optimizations
-- Performing Test C_COMPILER_SUPPORTS__-Wno-aggressive-loop-optimizations - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-aggressive-loop-optimizations
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-aggressive-loop-optimizations - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-stringop-overflow
-- Performing Test C_COMPILER_SUPPORTS__-Wno-stringop-overflow - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-stringop-overflow
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-stringop-overflow - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-changes-meaning
-- Performing Test C_COMPILER_SUPPORTS__-Wno-changes-meaning - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-changes-meaning
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-changes-meaning - Failed
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive - Success
-- Performing Test C_COMPILER_SUPPORTS__-x
-- Performing Test C_COMPILER_SUPPORTS__-x - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-x
-- Performing Test CXX_COMPILER_SUPPORTS__-x - Failed
-- Performing Test C_COMPILER_SUPPORTS__c++
-- Performing Test C_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__c++
-- Performing Test CXX_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17 - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17 - Success
-- Performing Test C_COMPILER_SUPPORTS__-fno-exceptions
-- Performing Test C_COMPILER_SUPPORTS__-fno-exceptions - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-fno-exceptions
-- Performing Test CXX_COMPILER_SUPPORTS__-fno-exceptions - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- TCL library: /opt/homebrew/opt/tcl-tk/lib/libtcl9.0.dylib
-- TCL header: /opt/homebrew/opt/tcl-tk/include/tcl-tk/tcl.h
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.4.1", minimum required is "4.3")
-- boost: 1.90.0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- absl: 20260107
-- Found GTest: /opt/homebrew/lib/cmake/GTest/GTestConfig.cmake (found version "1.17.0")
-- GTest: 1.17.0
-- Found Python3: /opt/homebrew/opt/python@3.14/Frameworks/Python.framework/Versions/3.14/include/python3.14 (found version "3.14.3") found components: Development Development.Module Development.Embed
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- spdlog: 1.17.0
-- Found BISON: /opt/homebrew/opt/bison/bin/bison (found version "3.8.2")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- STA version: 3.1.0
-- STA git sha: defec0bda32fe6c95074e8da417cb56e344874b5
-- System name: Darwin
-- Compiler: AppleClang 17.0.0.17000013
-- Build type: RELEASE
-- Build CXX_FLAGS: -O3 -DNDEBUG
-- Install prefix: /usr/local
-- IPO/LTO: not supported - CMake doesn't support IPO for current C compiler
-- Found FLEX: /opt/homebrew/opt/flex/bin/flex (found version "2.6.4")
-- TCL library: /opt/homebrew/opt/tcl-tk/lib/libtcl9.0.dylib
-- TCL header: /opt/homebrew/opt/tcl-tk/include/tcl-tk/tcl.h
-- TCL readline library: NOT FOUND
-- TCL readline header: NOT FOUND
-- Performing Test HAVE_CXX_STD_FORMAT
-- Performing Test HAVE_CXX_STD_FORMAT - Success
-- std::format: available
-- CUDD library: /usr/local/lib/libcudd.a
-- CUDD header: /usr/local/include/cudd.h
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.4.1", minimum required is "3.0")
-- SWIG version: 4.4.1
-- STA library: /var/folders/g0/0tdm2_hj22l7kp855lz7xp9w0000gn/T/tmp.8YGqdm4Blk/libOpenSTA.a
-- STA executable: /var/folders/g0/0tdm2_hj22l7kp855lz7xp9w0000gn/T/tmp.8YGqdm4Blk/sta
-- Found BZip2: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libbz2.tbd (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Protobuf: /opt/homebrew/lib/libprotobuf.dylib (found version "7.34.0")
-- Found re2: /opt/homebrew/lib/cmake/re2/re2Config.cmake (found version "11.0.0")
-- Found SCIP: /opt/homebrew/lib/cmake/scip/scip-config.cmake (found version "10.0.1")
-- Found OpenMP_CXX: -Xclang -fopenmp (found version "5.1")
-- Found OpenMP: TRUE (found version "5.1")
-- Found OR-Tools: /opt/homebrew/lib/cmake/ortools (version: 9.15.9999)
-- TCL library: /opt/homebrew/opt/tcl-tk/lib/libtcl9.0.dylib
-- TCL header: /opt/homebrew/opt/tcl-tk/include/tcl-tk/tcl.h
-- Found OpenMP_C: -Xclang -fopenmp (found version "5.1")
-- Found OpenMP: TRUE (found version "5.1")
-- Found OpenMP: TRUE (found version "5.1")
-- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
-- QT5 not found. GUI is disabled
-- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS) 
-- TCL library: /opt/homebrew/opt/tcl-tk/lib/libtcl9.0.dylib
-- TCL header: /opt/homebrew/opt/tcl-tk/include/tcl-tk/tcl.h
-- Found Eigen3: /opt/homebrew/share/eigen3/cmake/Eigen3Config.cmake (found version "5.0.1")
-- TCL readline disabled
-- Tcl Extended disabled
-- Python3 enabled
-- 
-- =========================================================
--  OpenROAD Configuration Summary 
-- =========================================================
--  C++ Standard   : 20
--  Build Type     : RELEASE
--  GUI Support    : ON
--  Python Bindings: ON
--  Tests Enabled  : ON
-- =========================================================
--  Configuration complete.
-- 
-- Configuring done (64.6s)
-- Generating done (11.4s)
-- Build files have been written to: /var/folders/g0/0tdm2_hj22l7kp855lz7xp9w0000gn/T/tmp.8YGqdm4Blk

To Reproduce

To reproduce the bug

From OpenROAD-flow-scripts/flow:

make DESIGN_CONFIG=./designs/sky130hd/gcd/config.mk OPENROAD_EXE=../tools/OpenROAD/build/bin/openroad clean_finish finish

The flow reaches final_report.tcl and then fails with:

Error: final_report.tcl, 72 invalid command name "gui::show"

I also generated an ORFS issue reproducer archive with:

make DESIGN_CONFIG=./designs/sky130hd/gcd/config.mk OPENROAD_EXE=../tools/OpenROAD/build/bin/openroad ISSUE_TAG=gui-show-batch final_report_issue

Attached generated tar file:
final_report_gui-show-batch.tar.gz
Note: I used OPENROAD_EXE=../tools/OpenROAD/build/bin/openroad because this local checkout uses a locally built OpenROAD binary rather than an installed openroad at the default ORFS path.

Relevant log output

OpenROAD 7cf7b720fd035cd3d114cfb152ecac2ccd7e379f
Features included (+) or not (-): +GPU +GUI +Python
...
Report metrics stage 6, finish...

==========================================================================
finish report_design_area
--------------------------------------------------------------------------
Design area 4905 um^2 77% utilization.
Error: final_report.tcl, 72 invalid command name "gui::show"

Screenshots

No response

Additional Context

No response

Metadata

Metadata

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