wangqr / Aegisub

Win64 nightly builds available at GHA artifact, also at following link:
https://ftp.wangqr.tk/aegisub/
Other
796 stars 49 forks source link

v3.3.2 tarball ./configure fails because of missing git_version.h #116

Open pudiva opened 3 years ago

pudiva commented 3 years ago

Dear Aegisubers,

thank you very much for maintaining this fork :heart:

I just tried to build the latest release, v3.3.2, by running the following commands:

curl -L https://github.com/wangqr/Aegisub/archive/refs/tags/v3.3.2.tar.gz -o Aegisub-3.3.2.tar.gz
tar -xf Aegisub-3.3.2.tar.gz
cd Aegisub-3.3.2
./autogen.sh
./configure

but then I got this::

checking for version... git repo not found and no cached git_version.h

I think the release tarball is missing this git_version.h file.

Also, I'm not an expert, but I think releases should distribute the ./configure already generated.

All the best! :sparkles: :sparkles: :sparkles:

wangqr commented 3 years ago

The tar ball in GitHub release is auto generated. GitHub simply take the tagged commit and make a tarball

pudiva commented 3 years ago

Ok, but I can't ./configure it, so you're saying the source tarballs aren't supported at all?

Btw, I tried to clone the repo, checkout v3.3.2 and still got the same problem, even though the git repo is there now... :woman_shrugging:

pudiva commented 3 years ago

Looking at this, it seems that git_version.h should be present on the tarballs:

https://github.com/wangqr/Aegisub/blob/418a276cc8dbdece4c005318c28e962e2920eb19/build/version.sh#L5-L7

pudiva commented 3 years ago

Now I generated the build/git_version.h myself from git, but I still can't use it with release 3.3.2, because it doesn't find it...

I put some echos on my ./configure around here:

https://github.com/wangqr/Aegisub/blob/723d01d13088d9b1bccc821f1129d045a0b74e2c/configure.ac#L118-L120

and it says that it runs the command like this:

. ./build/version.sh "."

but I also put some echos around here:

https://github.com/wangqr/Aegisub/blob/723d01d13088d9b1bccc821f1129d045a0b74e2c/build/version.sh#L4-L6

and it says that version_h_path is "dummy/build/git_version.h", not "./build/git_version.h", and the script fails.

:woman_shrugging:

TheOneric commented 3 years ago

There are no release tarballs. “Source Code (zip)” and “Source Code (tar.gz)” listed on the release page are just automatically generated archives of the source, without the .git-folder thus making them useless for regular building.Afaik GitHub doesn't allow to disable those.

Aegisub also does not have an autotools buildsystem¹, meaning there isn't even a make dist or make dist-xz to generate a self-contained tarball with pregenerated configure. It only uses an autoconf-script paired with manual Makefiles and shell-scripts. Additionally this fork added CMake as an alternative build system, but thanks to continued effort by wangqr, the custom build setup inherited from upstream continues to work as well for in-tree builds; out-of-tree builds do not work correctly. I cannot reproduce any git_version.h-failure with in-tree builds from git.

In short: those ""tarballs"" are not supposed to be built from directly and. If you absolutely want to build from the autogenerated zip/tar.gz, you must make sure to patch the configuration (either one) and provide an appropiate git_version.h yourself.


1: It used to, but presumably in favour of ease of use with Windows/Microsoft-VSC it was replaced by a complex custom setup (with less features).

pudiva commented 3 years ago

Thank you for explaining! :sparkles: :sparkles: :sparkles:

Regarding the in-tree build failure, what I did that failed (and still fails for me) was:

git checkout v3.3.2
./configure

I did a quick bisect now and found that this issue was fixed on c2f64bb7bb1198273779dcd501c66fe16c5e342c, which is like two commits after v3.3.2 ~ CMake works in this case anyway.

Btw, I'm packaging wangqr fork for void-linux (https://github.com/void-linux/void-packages/pull/32162) and, if possible :pray: , it would be lovely to have release tarballs, so we can reference those in our build scripts instead of pulling the whole repo from github.

Apart from that, thank you for maintaining the fork and for the thoughtful response. I guess this issue can be closed. :sparkling_heart: