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

Default make install on Ubuntu puts bin & data in incompatible locations #1116

Closed
veripoolbot opened this issue Nov 27, 2016 · 3 comments
Closed
Assignees
Labels
area: documentation Issue involves documentation resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Robert Baruch (@RobertBaruch)
Original Redmine Issue: 1116 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


make install puts verilator_bin in $(DESTDIR)$(bindir)/verilator_bin but the data (especially include/verilator.mk) in $(DESTDIR)$(pkgdatadir).

Assuming DESTDIR is set to /usr/local, pkgdatadir is share/verilator while bindir is empty.

Thus, verilator (and verilator_bin) end up in /usr/local while the includes end up in /usr/local/share/verilator/include.

However, the .mk file generated by verilator includes verilator.mk like this:

include $(VERILATOR_ROOT)/include/verilated.mk

This is incompatible with VERILATOR_ROOT being, as the manual puts it, "/path/to/where/verilator/was/installed".

Either VERILATOR_ROOT is /usr/local, in which case verilator runs but making .mk doesn't, or VERILATOR_ROOT is /usr/local/share/verilator, in which case verilator does not run:

Can't exec "/usr/local/share/verilator/verilator_bin": No such file or directory at /usr/local/bin/verilator line 174.
%Error: verilator: Misinstalled, or VERILATOR_ROOT might need to be in environment

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-11-27T21:32:49Z


First, please make sure you're using the most recent version as there was a related install bug in an earlier release.

If you are using "make install" then you typically should not have VERILATOR_ROOT set neither when configuring, making nor running. The path to the executable and shared files, which will differ, will be built into the executables and should work properly.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Robert Baruch (@RobertBaruch)
Original Date: 2016-11-27T22:48:29Z


Then it seems the documentation could use an update:

If you installed Verilator from sources, or a tarball, but not as part of your operating system (as an RPM), first you need to point to the kit:

     export VERILATOR_ROOT=/path/to/where/verilator/was/installed
     export PATH=$VERILATOR_ROOT/bin:$PATH

I checked the latest out just now (via git checkout HEAD). Made sure VERILATOR_ROOT was not set. Did autoconf, configure, make clean, make, make install. As compilation went by, I did notice:

-DDEFENV_VERILATOR_ROOT=\"/usr/local/share/verilator\"

Once installed, I tried it again, making sure VERILATOR_ROOT was not set and it worked!

So, I update this bug to a plea to update the documentation :)

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-12-03T20:02:26Z


Docs updated in git, thanks for suggesting that.

@veripoolbot veripoolbot added area: documentation Issue involves documentation resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Issue involves documentation resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants