dist target differences between cmake and autotools

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

dist target differences between cmake and autotools

Geert Janssens-4
Hi,

I have tested the dist target in both cmake and autotools. I couldn't test the
autotools dist generated by cmake because my autotools is too recent. So I
have one tarball purely cmake and one tarball purely autotools.

There are a few missed files that should be fixed on both sides I believe.
Those are easy to fix by comparing a diff of the tarball content lists.

The more interesting issue is though that the autotools based dist tarball
doesn't contain a single CMakeLists.txt or the related cmake support files.
And the other way around the cmake tarball doesn't contain the Makefile.in
files (it does include Makefile.am) and the typical autotools related support
files.

Perhaps the latter is because of the autotools-too-recent issue I mentioned at
the start.

I wonder though what our eventual goal is: should the dist tarball support
both cmake and autotools ?

Or put differently should the tarballs being output by the different
toolchains be identical and interchangeable ?

Or is it time to make a definitive choice of build system ?

I worry that if both toolchains generate dist tarballs that are not the same
we will get mixups at some point and confusion as a result.

Regards,

Geert

P.S. I have attached the contents of the two tarballs I have created with
today's master for comparison.
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

cmake.lst (140K) Download Attachment
autotools.lst (140K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dist target differences between cmake and autotools

John Ralls-2

> On Jul 9, 2017, at 1:17 PM, Geert Janssens <[hidden email]> wrote:
>
> Hi,
>
> I have tested the dist target in both cmake and autotools. I couldn't test the
> autotools dist generated by cmake because my autotools is too recent. So I
> have one tarball purely cmake and one tarball purely autotools.
>
> There are a few missed files that should be fixed on both sides I believe.
> Those are easy to fix by comparing a diff of the tarball content lists.
>
> The more interesting issue is though that the autotools based dist tarball
> doesn't contain a single CMakeLists.txt or the related cmake support files.
> And the other way around the cmake tarball doesn't contain the Makefile.in
> files (it does include Makefile.am) and the typical autotools related support
> files.
>
> Perhaps the latter is because of the autotools-too-recent issue I mentioned at
> the start.
>
> I wonder though what our eventual goal is: should the dist tarball support
> both cmake and autotools ?
>
> Or put differently should the tarballs being output by the different
> toolchains be identical and interchangeable ?
>
> Or is it time to make a definitive choice of build system ?
>
> I worry that if both toolchains generate dist tarballs that are not the same
> we will get mixups at some point and confusion as a result.
>
> Regards,
>
> Geert
>
> P.S. I have attached the contents of the two tarballs I have created with
> today's master for comparison.<cmake.lst><autotools.lst>

I don't think it's because your autotools are "too recent", I think it's because there are some problems with running the autotools part of cmake distcheck on master. That step is required for creating the Makefile.in-s.

If we're going to maintain two build tools then the dist tarballs should indeed be the same regardless of the build tool that made it and should support building with either. Fixing that should be fairly straightforward: The cmake files need to be added to extra_dist in Makefile.am and there's one file in qof that needs to get added to CMakeLists.txt.

Regards,
John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dist target differences between cmake and autotools

Geert Janssens-4
On zondag 9 juli 2017 22:56:57 CEST John Ralls wrote:

> > On Jul 9, 2017, at 1:17 PM, Geert Janssens <[hidden email]>
> > wrote:
> >
> > Hi,
> >
> > I have tested the dist target in both cmake and autotools. I couldn't test
> > the autotools dist generated by cmake because my autotools is too recent.
> > So I have one tarball purely cmake and one tarball purely autotools.
> >
> > There are a few missed files that should be fixed on both sides I believe.
> > Those are easy to fix by comparing a diff of the tarball content lists.
> >
> > The more interesting issue is though that the autotools based dist tarball
> > doesn't contain a single CMakeLists.txt or the related cmake support
> > files.
> > And the other way around the cmake tarball doesn't contain the Makefile.in
> > files (it does include Makefile.am) and the typical autotools related
> > support files.
> >
> > Perhaps the latter is because of the autotools-too-recent issue I
> > mentioned at the start.
> >
> > I wonder though what our eventual goal is: should the dist tarball support
> > both cmake and autotools ?
> >
> > Or put differently should the tarballs being output by the different
> > toolchains be identical and interchangeable ?
> >
> > Or is it time to make a definitive choice of build system ?
> >
> > I worry that if both toolchains generate dist tarballs that are not the
> > same we will get mixups at some point and confusion as a result.
> >
> > Regards,
> >
> > Geert
> >
> > P.S. I have attached the contents of the two tarballs I have created with
> > today's master for comparison.<cmake.lst><autotools.lst>
>
> I don't think it's because your autotools are "too recent", I think it's
> because there are some problems with running the autotools part of cmake
> distcheck on master. That step is required for creating the Makefile.in-s.
>
This has me confused.

Shouldn't distcheck start with running "dist" to generate the tarball which is then unpacked and
used as source for a "check" run ?

If so and assuming we agree on supporting two build systems, I would conclude the dist step in
a cmake environment should already include the Makefile.in files in the tarball, because those
are also included when running make dist via autotools. There are a few other files generated
during autogen.sh that are also shipped in the autotools generated dist tarball. To keep the
discussion focussed I'm not going to mention all of them, but obviously they should get the
same treatment.

When I run dist after configuring my environment using cmake with default options and the
ninja build system I get this error:
$ ninja-build dist

The only way for me to have a cmake/ninja based environment generate a dist tarball is to
configure using cmake -DAUTOTOOLS_IN_DIST=OFF

So that's why I said "my automake is too recent" and I can't get a dist tarball including the
autotools related generated files.

Am I missing something here ?

Geert
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dist target differences between cmake and autotools

John Ralls-2


> On Jul 12, 2017, at 4:27 AM, Geert Janssens <[hidden email]> wrote:
>
> On zondag 9 juli 2017 22:56:57 CEST John Ralls wrote:
> > > On Jul 9, 2017, at 1:17 PM, Geert Janssens <[hidden email] <mailto:[hidden email]>>
> > > wrote:
> > >
> > > Hi,
> > >
> > > I have tested the dist target in both cmake and autotools. I couldn't test
> > > the autotools dist generated by cmake because my autotools is too recent.
> > > So I have one tarball purely cmake and one tarball purely autotools.
> > >
> > > There are a few missed files that should be fixed on both sides I believe.
> > > Those are easy to fix by comparing a diff of the tarball content lists.
> > >
> > > The more interesting issue is though that the autotools based dist tarball
> > > doesn't contain a single CMakeLists.txt or the related cmake support
> > > files.
> > > And the other way around the cmake tarball doesn't contain the Makefile.in
> > > files (it does include Makefile.am) and the typical autotools related
> > > support files.
> > >
> > > Perhaps the latter is because of the autotools-too-recent issue I
> > > mentioned at the start.
> > >
> > > I wonder though what our eventual goal is: should the dist tarball support
> > > both cmake and autotools ?
> > >
> > > Or put differently should the tarballs being output by the different
> > > toolchains be identical and interchangeable ?
> > >
> > > Or is it time to make a definitive choice of build system ?
> > >
> > > I worry that if both toolchains generate dist tarballs that are not the
> > > same we will get mixups at some point and confusion as a result.
> > >
> > > Regards,
> > >
> > > Geert
> > >
> > > P.S. I have attached the contents of the two tarballs I have created with
> > > today's master for comparison.<cmake.lst><autotools.lst>
> >
> > I don't think it's because your autotools are "too recent", I think it's
> > because there are some problems with running the autotools part of cmake
> > distcheck on master. That step is required for creating the Makefile.in-s.
> >
> This has me confused.
>  
> Shouldn't distcheck start with running "dist" to generate the tarball which is then unpacked and used as source for a "check" run ?

>  
> If so and assuming we agree on supporting two build systems, I would conclude the dist step in a cmake environment should already include the Makefile.in files in the tarball, because those are also included when running make dist via autotools. There are a few other files generated during autogen.sh that are also shipped in the autotools generated dist tarball. To keep the discussion focussed I'm not going to mention all of them, but obviously they should get the same treatment.

Agreed.
I suspect that Rob didn’t understand that the dist tarballs aren’t supposed to need an autotools installation to build.

>  
> When I run dist after configuring my environment using cmake with default options and the ninja build system I get this error:
> $ ninja-build dist
> [7/7] Generating gnucash-2.6.99.tar.gz, gnucash-2.6.99.tar.bz2
> FAILED: gnucash-2.6.99.tar.gz gnucash-2.6.99.tar.bz2  
> cd /home/janssege/Development/builds/kdevelop/gnucash/master && /usr/bin/cmake -D CMAKE_MODULE_PATH=/home/janssege/Development/gnucash/gnucash-master/src/cmake_modules -D PACKAGE_PREFIX=gnucash-2.6.99 -D GNUCASH_SOURCE_DIR=/home/janssege
> /Development/gnucash/gnucash-master -D BUILD_SOURCE_DIR=/home/janssege/Development/builds/kdevelop/gnucash/master -D BUILDING_FROM_VCS=YES -D SHELL=/bin/bash -D AUTOTOOLS_IN_DIST=ON -P /home/janssege/Development/gnucash/gnucash-master/sr
> c/cmake_modules/MakeDist.cmake
> Automake is incompatible version 1.15+, but can't find automake-1.11
>  You can set AUTOTOOLS_IN_DIST=OFF to exclude autotools support.
> CMake Error at /home/janssege/Development/gnucash/gnucash-master/src/cmake_modules/MakeDist.cmake:51 (MESSAGE):
>  automake not compatible
> The only way for me to have a cmake/ninja based environment generate a dist tarball is to configure using cmake -DAUTOTOOLS_IN_DIST=OFF
>  
> So that's why I said "my automake is too recent" and I can't get a dist tarball including the autotools related generated files.
>  
> Am I missing something here ?

Ah, that’s a different error from the one I got, perhaps because I was testing on Debian 8 with automake 14.

Perhaps Rob can explain why he trapped on automake 15?

Regards,
John Ralls

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dist target differences between cmake and autotools

Rob Gowin
In reply to this post by Geert Janssens-4
On Wed, Jul 12, 2017 at 7:27 AM, Geert Janssens <[hidden email]>
wrote:

> On zondag 9 juli 2017 22:56:57 CEST John Ralls wrote:
> > > On Jul 9, 2017, at 1:17 PM, Geert Janssens <[hidden email]
> >
> > > wrote:
> > >
> > > Hi,
> > >
> > > I have tested the dist target in both cmake and autotools. I couldn't
> test
> > > the autotools dist generated by cmake because my autotools is too
> recent.
> > > So I have one tarball purely cmake and one tarball purely autotools.
> > >
> > > There are a few missed files that should be fixed on both sides I
> believe.
> > > Those are easy to fix by comparing a diff of the tarball content lists.
> > >
> > > The more interesting issue is though that the autotools based dist
> tarball
> > > doesn't contain a single CMakeLists.txt or the related cmake support
> > > files.
> > > And the other way around the cmake tarball doesn't contain the
> Makefile.in
> > > files (it does include Makefile.am) and the typical autotools related
> > > support files.
> > >
> > > Perhaps the latter is because of the autotools-too-recent issue I
> > > mentioned at the start.
> > >
> > > I wonder though what our eventual goal is: should the dist tarball
> support
> > > both cmake and autotools ?
> > >
> > > Or put differently should the tarballs being output by the different
> > > toolchains be identical and interchangeable ?
> > >
> > > Or is it time to make a definitive choice of build system ?
> > >
> > > I worry that if both toolchains generate dist tarballs that are not the
> > > same we will get mixups at some point and confusion as a result.
> > >
> > > Regards,
> > >
> > > Geert
> > >
> > > P.S. I have attached the contents of the two tarballs I have created
> with
> > > today's master for comparison.<cmake.lst><autotools.lst>
> >
> > I don't think it's because your autotools are "too recent", I think it's
> > because there are some problems with running the autotools part of cmake
> > distcheck on master. That step is required for creating the
> Makefile.in-s.
> >
> This has me confused.
>
> Shouldn't distcheck start with running "dist" to generate the tarball
> which is then unpacked and
> used as source for a "check" run ?
>
> If so and assuming we agree on supporting two build systems, I would
> conclude the dist step in
> a cmake environment should already include the Makefile.in files in the
> tarball, because those
> are also included when running make dist via autotools. There are a few
> other files generated
> during autogen.sh that are also shipped in the autotools generated dist
> tarball. To keep the
> discussion focussed I'm not going to mention all of them, but obviously
> they should get the
> same treatment.
>
> When I run dist after configuring my environment using cmake with default
> options and the
> ninja build system I get this error:
> $ ninja-build dist
>
> The only way for me to have a cmake/ninja based environment generate a
> dist tarball is to
> configure using cmake -DAUTOTOOLS_IN_DIST=OFF
>
> So that's why I said "my automake is too recent" and I can't get a dist
> tarball including the
> autotools related generated files.
>
> Am I missing something here ?
>
> Geert
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>

Hi Geert,

For any version of automake except 1.15, the CMake 'dist' target will run
autogen.sh to create the various Makefile.in-s and include them in the dist
tarball. Independent of anything CMake related, autotools distcheck will
fail on systems using automake-1.15 (including Fedora 25) because in that
version the distcheck working directory has been changed  ([1], near
bottom) such that the missing files check in 'po' gets confused and fails.

In my original CMake distcheck commit, I had the autotools part do
'distcheck'.  I put in checks to prevent running the autotools distcheck if
automake-1.15 was detected. John mentioned in IRC that I did not need to
run distcheck, so I removed it in the second commit in the PR. I should
have then removed the automake version check at that point since it is no
longer need. I'll do that soon.

Regards,

Rob

[1] https://autotools.io/forwardporting/automake.html
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dist target differences between cmake and autotools

Geert Janssens-4
In reply to this post by Geert Janssens-4
On woensdag 12 juli 2017 16:36:37 CEST Rob Gowin wrote:

> Hi Geert,
>
> For any version of automake except 1.15, the CMake 'dist' target will run
> autogen.sh to create the various Makefile.in-s and include them in the dist
> tarball. Independent of anything CMake related, autotools distcheck will
> fail on systems using automake-1.15 (including Fedora 25) because in that
> version the distcheck working directory has been changed  ([1], near
> bottom) such that the missing files check in 'po' gets confused and fails.
>
> In my original CMake distcheck commit, I had the autotools part do
> 'distcheck'.  I put in checks to prevent running the autotools distcheck if
> automake-1.15 was detected. John mentioned in IRC that I did not need to
> run distcheck, so I removed it in the second commit in the PR. I should
> have then removed the automake version check at that point since it is no
> longer need. I'll do that soon.
>
> Regards,
>
> Rob
>
> [1] https://autotools.io/forwardporting/automake.html

Hi Rob,

Thanks for clearing this up. So I will wait for your fix before playing with
this again :)

There's no need to hurry by the way. I'm about to leave on holidays in a
couple of days so there won't be much I can still do before that anyway.

Geert
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Loading...