This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly
- From: Warren Young <warren at etr-usa dot com>
- To: Cygwin Apps List <cygwin-apps at cygwin dot com>
- Date: Wed, 12 Sep 2012 20:23:58 -0600
- Subject: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly
It's that time of decade again...time for me to patch setup.exe again.
But oh noes! The README instructions are wrong, and the program doesn't
build correctly from a fresh checkout. Hafta fix that first.
1. The README implies that you need automake 1.9 and libtool 1.5,
exactly. I didn't have any trouble building with current versions
(1.12.3 and 2.4) instead. Automake 1.9 is still available in the Cygwin
package repo, but Libtool 1.5 is not. I don't see that the build system
actually forces Automake 1.9, and of course it can't force Libtool 1.5
now. I think these must be minimums, not exact version requirements. I
suggest removing these version numbers from the README.
2. The configure command the README gives as step 2 won't work now that
-mno-cygwin is gone. It should now be:
./configure -C --build=i686-pc-mingw32 --host=i686-pc-mingw32 \
CC=i686-pc-mingw32-gcc CXX=i686-pc-mingw32-g++
3. Automake maintainer mode has been controversial since it was created,
and improvements in the past few years in Automake seem to have made it
obsolete, too. I suggest removing all this stuff and using the standard
Automake rebuild rules.
The attached patch addresses these three issues.
4. configure.in should be renamed configure.ac. ("cvs diff" can't do
that. :) ) Autoconf has been yelling about this for years.
5. Several build system files refer to iniparse.h, but on my system,
iniparse.yy yields iniparse.hh, not .h. In a fresh CVS checkout, this
causes:
$ ./bootstrap.sh
...noise noise noise...
$ make
GEN setup_version.c
make: *** No rule to make target `iniparse.h', needed by `all'. Stop.
I was able to fix it with:
$ ln -s iniparse.hh iniparse.h
$ make iniparse.hh
$ make
If you skip the second step, make(1) yells again, because iniparse.hh
hasn't been created yet. You have to force it to create it out of
order, since the Makefile dependencies are satisfied by the
newly-created iniparse.h symlink.
Having done those two things, you don't need to repeat the hack, even
after "make distclean", since that doesn't remove either iniparse.hh or
iniparse.h. But, I think the correct fix is to just change all the
iniparse.h references to iniparse.hh.
That makes me wonder how anyone else has been getting setup.exe to build
OOTB for the past five years? (cvs log -r1.1 iniparse.yy)
Do the current setup.exe maintainers have such hack symlinks on their
systems already, and haven't needed to do any fresh checkouts in all
that time? Or is this a recent Bison change?
Index: README
===================================================================
RCS file: /cvs/cygwin-apps/setup/README,v
retrieving revision 2.43
diff -r2.43 README
22d21
< - autoconf2.5
24,25c23
< - automake1.9
< - libtool1.5
---
> - libtool
35,38c33,34
< $ ./configure -C --disable-shared --host=i686-pc-mingw32 \
< --build=i686-pc-cygwin CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin"
< If you plan to do any work on the setup build system, you will
< probably want to add "--enable-maintainer-mode".
---
> $ ./configure -C --build=i686-pc-mingw32 --host=i686-pc-mingw32 \
> CC=i686-pc-mingw32-gcc CXX=i686-pc-mingw32-g++
Index: bootstrap.sh
===================================================================
RCS file: /cvs/cygwin-apps/setup/bootstrap.sh,v
retrieving revision 2.6
diff -r2.6 bootstrap.sh
64,66c64
< $srcdir/configure -C --enable-maintainer-mode \
< --build=$build --host=$host CC="$CC" CXX="$CXX" \
< "$@"
---
> $srcdir/configure -C --build=$build --host=$host CC="$CC" CXX="$CXX" "$@"
Index: configure.in
===================================================================
RCS file: /cvs/cygwin-apps/setup/configure.in,v
retrieving revision 2.28
diff -r2.28 configure.in
25d24
< AM_MAINTAINER_MODE