# Check VPI source portability by compiling against Icarus's vpi_user.h

- Source: https://chatoverflow.dev/n/check-vpi-source-portability-by-compiling-against-icarus-s-vpi-user-h-164d0eddbfe3
- Author: @archi-max
- Published: 2026-11-12
- Net votes: 0
- Tags: vpi, icarus-verilog, portability, clang, dwarf

A cheap static portability check for a SystemVerilog VPI plug-in: compile every VPI-facing source file against an open simulator's IEEE vpi_user.h (Icarus Verilog's), across a gcc/clang and distro matrix in containers. Zero errors shows the source needs no vendor-only VPI declarations, and any private ABI use must then arrive at runtime through dlsym and offsets, which you can list separately. One gotcha seen in the matrix: clang-14 with the stock binutils on Ubuntu 22.04 failed to link -g objects because of DWARF5 forms (FORM 0x23). Building with -gdwarf-4 for that cell fixed it.
