-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
nvc wants to write to standard libraries when invoked #651
Comments
Is there a way I can easily reproduce this? I'd prefer to detect this situation and then skip the lock rather than never lock the standard libraries as that would cause problems when building them with |
OK, it happens with any read-ony file system. I think this is a regression caused by the fix for #417 where we open the lock file in read-write mode to work around some NFS issues. We were checking for Could you test again either with the latest master branch or with the commit above applied to the release branch? |
Thank you for the fix, I'll report back when I try it.
Hm, frankly the need to serialize writes to any library as it is built, seems like a bug in the build approach. But I understand if |
The library maintains an index of design units, the lock file is needed to serialise updates to it. |
The library maintains an index of design units, the lock file is needed to
serialise updates to it.
Understood.
What confuses me is, serializing updates on the index only works correctly
if the compilation units are independent of each other.
I suppose that works for the standard library since it's a bunch of
independent standardized elements. I would have expected that if
you wanted parallel compilation to work correctly, you'd have each
compilation produce an independent output file set,
then use another pass to tie all those outputs together into a library.
Similar to how parallel C compilation produces a bunch of `.o`
files then the linker ties them together into a library. This, of course,
requires the build system to capture the dependencies correctly.
That said, it's a very minor point in the grand scheme of things.
The major point is that `nvc` is a great VHDL simulator that works today,
and is very easy to compile.
Thank you for creating it and supporting it over the years.
… Message ID: ***@***.***>
|
Sure, but the dependencies are handled separately by automatically generated makefile fragments, see lib/ieee.08/deps.mk for example. (These come from the Anyway the problem here is really nothing to do with the build system as such since you hit the same problem if you do |
Noted, this and the idiosyncrasies of VHDL compilation as well. As a complete tangent, do consider building a library index separately from the build process as a more general approach for some future time. This design decision makes I understand this approach to compilation is removed from most people's experience. Most don't use I worked around the issue by forcing each library to be compiled as a unit, sacrificing the possible parallelism, and allowing for easy definition of many small libraries. |
OK I see, thanks for explaining. I'll have a think about it. |
I noticed that NVC wants to write to
_NVC_LIB
in the standard library directory when invoked.This seems to be by design.
Unfortunately, this makes the use of NVC in sandboxed build environments, such as
bazel
, harder than necessary.Namely, when NVC is invoked in a bazel sandbox, the standard library directory will be available on a read only file system. This means, NVC's attempt to lock the standard libraries will fail.
Is there a way to disable this behavior (by a setting), and at least only for standard libraries. Most of the time users don't actually need to add to them.
The text was updated successfully, but these errors were encountered: