Skip to content

iverilog -tvvp generates non-relocatable absolute VPI module paths #1344

@rhabacker

Description

@rhabacker

Description

The vvp target generated by iverilog -tvvp embeds absolute paths for built-in VPI modules into the generated .vvp file.

The VVP target format documentation explicitly shows generated :vpi_module entries:
[VVP target documentation]

Example from the documentation:

:vpi_module "/usr/local/lib/ivl/system.vpi";

Observed example on Windows/MSYS2:

:vpi_module "Z:\usr\X86_~FWL\sys-root\mingw\lib\ivl\system.vpi";

This causes generated .vvp files to become non-portable and non-relocatable.

Problem

The generated paths depend on:

  • the configure-time --prefix
  • the build machine layout
  • MinGW/MSYS path translation
  • short-path expansion on Windows
  • the installation root used during packaging

This becomes especially problematic when using staged installs via DESTDIR.

Example:

./configure --prefix=/usr
make
make DESTDIR=/tmp/pkg install

The generated .vvp files still contain paths derived from the configured prefix or build environment, even if the final installation location differs.

As a result:

  • .vvp files are not relocatable
  • packaged artifacts may fail on target systems
  • CI-generated outputs are machine-dependent
  • reproducible builds are harder
  • Windows builds leak temporary or synthetic paths

Expected Behavior

The generated .vvp file should not embed absolute install paths for built-in VPI modules.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions