Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix findIVerilog Method to Resolve Symbolic Links on macOS #1369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JakubAndrysek
Copy link

Fix findIVerilog Method to Resolve Symbolic Links on macOS with Homebrew

Description

This PR addresses an issue in the findIVerilog method where symbolic links (e.g., /opt/homebrew/bin/iverilog -> ../Cellar/icarus-verilog/12.0/bin/iverilog) on macOS were not being resolved correctly. This fix ensures compatibility with Homebrew installations on macOS.

Changes

  1. Symbolic Link Handling:
    • Updated to resolve symbolic links to absolute paths, ensuring correct execution even with relative links.
    • Added .normalize() to clean up paths.
  2. Logging Improvements:
    • Replaced System.out and System.err calls with LOGGER.
    • Added debug and error logs for better traceability and diagnostics.
  3. Fallback Mechanisms:
    • Retains existing behavior but enhances it with safer path resolutions.
  4. Removed Hardcoded Debug Outputs:
    • All debug information is now logged via the Logger instance.

Impact

  • Fixes issues on macOS systems using Homebrew where iverilog could not be detected due to symbolic link resolution failures.
  • Improves maintainability with better logging practices.

How to Test

  1. Ensure iverilog is installed via Homebrew on macOS (brew install icarus-verilog).
  2. Confirm the symbolic link in /opt/homebrew/bin/iverilog points to the correct target.
  3. Run the updated method to verify it correctly detects iverilog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant