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

Version number is incorrect when build from source. #40

Closed
dkozel opened this issue Sep 2, 2014 · 6 comments
Closed

Version number is incorrect when build from source. #40

dkozel opened this issue Sep 2, 2014 · 6 comments

Comments

@dkozel
Copy link

dkozel commented Sep 2, 2014

When the lastest git source is build and installed the version string and copyright dates are incorrect. There is a reference in version_base.h to version_base.in which no longer exists.

$ vvp -V
Icarus Verilog runtime version 0.10.0 (devel) (s20121218-432-g065c485)

Copyright 1998-2012 Stephen Williams
...

I'm willing to submit a patch for the issue if given a definition of the expected result. It looks like the string is:
Icarus Verilog runtime version x.y.z (devel) (sYYYYMMDD-{commit count}-{git commit short hash})

@steveicarus
Copy link
Owner

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The information should be coming from "git describe ..." which
is called by the makefile. Something wrong with that?

On 09/02/2014 02:40 PM, Derek Kozel wrote:

When the lastest git source is build and installed the version
string and copyright dates are incorrect. There is a reference in
version_base.h to version_base.in which no longer exists.

$ vvp -V Icarus Verilog runtime version 0.10.0 (devel)
(s20121218-432-g065c485)

Copyright 1998-2012 Stephen Williams ...

I'm willing to submit a patch for the issue if given a definition
of the expected result. It looks like the string is: Icarus Verilog
runtime version x.y.z (devel) (sYYYYMMDD-{commit count}-{git commit
short hash})

— Reply to this email directly or view it on GitHub
#40.


Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlQGOjsACgkQrPt1Sc2b3ikR5gCeMv3X2vw7LR5CwoJ89EB1oAwJ
lboAoKqOmcFM7YX+wjxjzFQ6UXLdnFS1
=DUFy
-----END PGP SIGNATURE-----

@dkozel
Copy link
Author

dkozel commented Sep 2, 2014

I did a make clean, git pull (master), ./configure, make just before the current results.

$ git describe
s20140801-61-gfe8e7a6

@dkozel
Copy link
Author

dkozel commented Sep 2, 2014

Interesting. I just manually deleted the version_tag.h file and reran make. It now correctly has the git describe tag. I certainly haven't had the repo cloned for two years so I don't know why the old file was present. I confirmed the result with a completely fresh git clone and the correct version is displayed. Sorry for the noise and thanks for the great software.

The copyright is still two years out of date though, and the readme even older.

@dkozel dkozel closed this as completed Sep 2, 2014
@yanghao
Copy link

yanghao commented Mar 11, 2018

I had the same issue and found this thread.

Obviously version_tag.h should be force build to reflect the current git version. I do this all the time with scons but really don't know a clean way to do it in Makefile.

So I guess "make versino" is mandatory if you want the correct version for iverilog.

@martinwhitaker
Copy link
Collaborator

It's always updated automatically for me. For example, my v10 build directory has

% git describe
v10_1-101-g0f28b03d
% cd ../build/
% cat version_tag.h 
#define VERSION_TAG "v10_1-101-g0f28b03d"

(I build outside the source tree)

@yanghao
Copy link

yanghao commented Mar 11, 2018

This is not really happening to me (even when building out of source tree). As long as you have a clean build it will generate the right version_tag.h file. However as soon as you modified something, commits it, build it again it won't update the version_tag.h ... so iverilog reported version is actaully not reliable ... because there is no verifiable way you can know if the release is built out of a clean tree or did a incremental built.

The tricky thing here is, ALL C++ file should actually depends on version_tag.h (if they include it). However you cannot get all .o file depends on target "version" because it is built unconditionally. As make will only check timestamp to built dependent files this will then create a circle: build .o file needs version_tag.h --> version_tag.h being built, timestamp updated --> all .o file needs to be built --> version_tag.h forced built again --> all .o file rebuilt again --> ... endless loop.

This is by far the biggest limitation I see on Make based system. scons on the other hand handles this nicely in that: 1. it does not check timestamp (not the default behavior) 2. you can force built a target and if its content does not change no dependent target is built.

Not sure if cmake can nicely handle this.

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

No branches or pull requests

4 participants