8000 downloads require running autoreconf -i and autoconf undocumented · Issue #96 · unittest-cpp/unittest-cpp · GitHub
[go: up one dir, main page]

Skip to content

downloads require running autoreconf -i and autoconf undocumented #96

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

Closed
BarrySmith opened this issue Feb 9, 2016 · 20 comments
Closed

Comments

@BarrySmith
Copy link

I may have missed something but if one downloads either with git or the "release" tarballs configure is not available so one must run
autoreconf -i
autoconf
before running configure. This seems does not seem to be documented anywhere.

Couldn't you provide tarballs with the configure already there?

@pjohnmeyer
Copy link
Member

Putting configure "already in there" somewhat defeats the purpose of autoconf, as I understand it. Using it should be as simple as running:

autoconf
./configure

from the root folder of the project. That said, I just tried master on a recent Ubuntu and I was getting some warnings so it doesn't appear to be working properly at the moment. This is something I need to start checking with more diligence on release tags.

@qdii @magicant @LocutusOfBorg @bittwiddler1 any of you have a moment to look at this? I won't get to it for a few days, and you have all contributed at one time or another to the autoconf support.

@BarrySmith
Copy link
Author

I'm ok with having to do something before the configure if neccessarily but the README starts with
./configure
and makes no mention of running something before which seems problematic.

Thanks

@pjohnmeyer
Copy link
Member

I'm unclear on the particulars of your previous comment. ./configure is not mentioned in the README; only CMake (the primary supported build system) is mentioned there.

@BarrySmith
Copy link
Author

Hmm, I downloaded unittest-cpp-1.5.0 and the INSTALL file states:

Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package.

Am I accidently in the wrong universe?
Thanks for answering so promptly?

Should switch to 1.51?

@pjohnmeyer
Copy link
Member

Ah, I was looking at the README. Now that I see what you're saying, I'd say the INSTALL file is out of date.

If you must autotools, then I'm afraid things appear to be broken at the moment; I'd be happy to see a PR from you or anyone else on this as I doubt I'll have the cycles for a few days.

If you can use CMake, then you can should be able to install using the instruction me here: https://github.com/unittest-cpp/unittest-cpp/wiki/Building-Using-CMake

@BarrySmith
Copy link
Author

Ahh, running autoreconf on my Apple worked fine but it looks like my autoconf on my linux system is out of date hence could not generate ./configure.

I'll try the cmake.

I hate cmake and wish you had stuck with autotools but .....

@pjohnmeyer
Copy link
Member

I don't particularly love CMake either, but I am not interested in reopening that conversation at this time.

As previously stated, I'll happily accept PRs on the autotools support files -- so I wouldn't say the project has abandoned it. Sorry for the inconvenience.

@magicant
Copy link
Contributor
magicant commented Feb 9, 2016

I'm trying the commit 5b34768 on Fedora 23 with Autoconf 2.69, and don't find any particular issue about autoconf. The commands

autoreconf -i
./configure
make

just work for me.

@pjohnmeyer Are you running autoconf directly? I recommend using autoreconf since I automatically runs other autoxxx commands if necessary.

@pjohnmeyer
Copy link
Member

@magicant I was, switched to your method as above [Ubuntu 15 and autoconf 2.69] and got some errors. Realized that I didn't have libtool installed -- I hadn't really used this VM for dev until now.

@BarrySmith, can you see if it works this way for you? If so, this is just a documentation problem.

@tiberiomoliveira
Copy link

Doing this:
autoreconf -i
./configure
make
Works for me, I'm using arch linux.

@s-daveb
Copy link
8000
Contributor
s-daveb commented Feb 9, 2016

From what I've experienced with GNU auto tool packages, they usually ship with a pregenerated configure shell script...

If the makefiles support it, (and if I understand correctly) running make dist should generate a .tar.gz with the configure script at the root.

@s-daveb
Copy link
Contributor
s-daveb commented Feb 9, 2016

Im preoccupied with work and family but I might be able to take a look tomorrow

@BarrySmith
Copy link
Author

On Feb 9, 2016, at 10:29 AM, Tiberio Menezes notifications@github.com wrote:

Doing this:
autoreconf -i
./configure
make
Works for me, I'm using arch linux.

This works fine for my on my Apple Mac (latest Xcode) but on linux-Ubuntu_12.04-x86_64 with autoconf-2.69 automake-1.15 libtool-2.4.6/bin I get

$ autoreconf --force --install -v
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /homes/petsc/soft/linux-Ubuntu_12.04-x86_64/autoconf-2.69/bin/autoconf --force
autoreconf: running: /homes/petsc/soft/linux-Ubuntu_12.04-x86_64/autoconf-2.69/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
UnitTest++/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
UnitTest++/Makefile.am:1: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
UnitTest++/Makefile.am:1: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
UnitTest++/Makefile.am:1: If 'LT_INIT' is in 'configure.ac', make sure
UnitTest++/Makefile.am:1: its definition is in aclocal's search path.
Makefile.am:4: 'UnitTest++/Makefile.am' included from here
autoreconf: automake failed with exit status: 1

But if I run libtoolize first then run autoreconf --force --install it works! I have no idea why.


Reply to this email directly or view it on GitHub.

@LocutusOfBorg
Copy link
Contributor

@pjohnmeyer unfortunately I'm a huge CMake fan, and I really don't understand how autotools works, IIRC I just did a fix in a pkgconfig file, but I try to stay away from autotools issues whenever possible. So for me +1 for CMake switch :)

@s-daveb
Copy link
Contributor
s-daveb commented Feb 10, 2016

@LocutusOfBorg AFAIK, unittest-cpp is already primarily using CMake for builds, so there's no need!

However, I was under the impression the GNU Autotools files were here for those who don't have CMake installed on their system. I know CMake is an awesome tool, but it's also much more dependency-heavy than the GNU Tools, which mostly depend on text-processing programs.

Here's a high-level overview of how the auto tools are supposed to work:

  1. Running autoconf generates a configure shell script using configure.ac as a template.
  2. Running configure runs dependency checks on your system (much like cmake ..) and then calls automake.
  3. automake generates a Makefile at your project root using Makefile.am as a template.
  4. make builds your code using the Makefile

If you really need good make and Visual Studio support, though, CMake is the way to go. But Autotools is almost universally supported on any UNIX system that has bash, GNU m4, pkgconfig, and make.

@s-daveb
Copy link
Contributor
s-daveb commented Feb 10, 2016

Putting configure "already in there" somewhat defeats the purpose of autoconf, as I understand it.

@pjohnmeyer It actually depends on who's compiling the package. For the purposes of avoiding clutter in your source control and the source tree, you don't generally check in the configure script, but from what I've seen in most .tar.gz files, the release distributions of the source do contain a configure script.

From Wiki:

Autotools assists a software development person or team to write cross-platform software and make it available to a much wider user community, including in its source code form to those users who wish to build the software themselves. In most cases users simply run the supplied configure script (which has no dependencies other than the presence of a Bourne-compatible shell), and then a make program.[5] They do not need to have the Autotools themselves installed on the computer.

From where I stand, @BarrySmith's issue is mostly an issue of distribution practices and documentation.

I may have missed something but if one downloads either with git or the "release" tarballs configure is not available so one must run
autoreconf -i
autoconf
before running configure. This seems does not seem to be documented anywhere.

If it were me, I'd just make sure the release tarball has a ./configure at the root, and/or document that people building from github need have the autotools on their systems in order to generate configure, or else use CMake.

(See also: https://www.gnu.org/software/automake/manual/html_node/Preparing-Distributions.html)

@pjohnmeyer
Copy link
Member

Thanks for all the input, everybody, I'm the first to admit I'm a little light on autotools knowledge. @BarrySmith : The Libtool library used but 'LIBTOOL' is undefined error you saw was the same thing I saw before I installed libtool on my fresh Ubuntu install.

To this point, I've only been tagging code -- I haven't been creating true releases through GitHub. To that extent, 1.5.* releases have been source distributions only.

If preparing an autotools distribution would make life significantly better for the Linux dev community, I'd be happy to spend a little more time on it. The main effort would be in writing a release script, which I need to do anyway. I haven't decided precisely how I want to solve this "problem" though; so I'm gonna put a few more days of thought into it.

@pjohnmeyer
Copy link
Member

So, I've spent some more significant time with the autotools files tonight because on #95 I had previously neglected to updated the Makefile.am files with the new files. As it turned out, I needed not only to update them, but add some m4 macros along with an update to configure.ac to optionally enable C++11 support

I would personally prefer to only support CMake, but I appreciate the use case for autoconf. I'm going to experiment a bit more before addressing this thoroughly.

@pjohnmeyer pjohnmeyer modified the milestone: 1.6.1 Mar 1, 2016
@pjohnmeyer
Copy link
Member

As you all may have noticed I went ahead and tagged v1.6.0 tonight without having resolved this. However, I intend to address these issues in March and will most likely include, with that, uploading distributions for older tags as well, if it doesn't prove to be too difficult.

@pjohnmeyer pjohnmeyer modified the milestones: 1.6.1, 1.6.2 May 5, 2016
@pjohnmeyer
Copy link
Member

When I release 2.0, as with 1.6.1, the ./configure file will be included in the tarball. I am also adding a small note to the top of the install file to indicate that if you're building from source you'll need to run autoreconf. I won't be going back and fixing old download packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
0