Issue #193
Support install to non-standard location
| Status: | Closed | Start date: | 11/25/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% |
|
| Category: | Configure/Make/Compiling | |||
| Target version: | - |
Description
I installed verilator to /opt/verilator using:
./configure --prefix=/opt/verilator
There seem to be some assumptions built into the paths that fail if you install like this. For starters, if you set VERILATOR_ROOT=/opt/verilator, it can't find verilator_bin. To fix this I set VERILATOR_ROOT=/opt/verilator/bin.
Also, when it installs itself in /opt/verilator, the tool buries much of its resources under "share" (which makes sense if you're in /usr/local but not if you're in your own directory), and the makefile generation isn't clued in on this.
So, the makefile thinks its resources are in $(VERILATOR_ROOT)/include, but they're actually in $(VERILATOR_ROOT)/share/verilator/include.
Workaround: cd /opt/verilator mv share/verilator/examples . mv share/verilator/include . mv share/verilator/bin/verilator_include bin ln -s bin/verilator_bin .
History
Updated by Wilson Snyder over 3 years ago
- Status changed from New to Assigned
- Category set to Configure/Make/Compiling
- Assignee set to Wilson Snyder
Hmm.
--prefix is the standard configure way to say where things live; for example /usr/local. Adding share/ and bin/ to that is quite expected and correct. So it's right that the binary lands in /usr/local/bin/verilator
VERILATOR_ROOT is for specifying a kit directory, and shouldn't be needed if you make install. IE just point it at your source kit and you're done - don't install. This is the more "cad tool" way of doing things so multiple versions can coexist.
Obviously though it should still work after installing this way; I'll see what's wrong.
Updated by Guy Hutchison over 3 years ago
Understood, the issues seems to have been with VERILATOR_ROOT. If I unset this variable then the makefile is generated with the correct paths in the makefile, and the links to the bin directory are not needed. So it seems like install to a non-standard location works fine as long as VERILATOR_ROOT is not set.
Updated by Wilson Snyder over 3 years ago
- Status changed from Assigned to Resolved
I confirmed this works if VERILATOR_ROOT isn't set, it looks like you think so too.
It's certainly not documented well though. I updated the README to describe the various install options including unsetting VERILATOR_ROOT, and noted it on the wiki too.
Fixed in git for 3.721+.
Also available in: Atom
![[logo]](/img/veripool_small.png)