autogen.sh failed on CentOS-4.6

Bug #376885 reported by Yishin Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmodbus
Fix Released
Low
Stéphane Raimbault

Bug Description

The Linux installed in my PC is CentOS-4.6 and CentOS-5.3. Both of them come with "autoconf 2.59", which can not process the configure script generated by "autoconf 2.63" of my Cygwin laptop.

* add "--force" parameter to autoreconf (autogen.sh)

I then got the following error:
src/Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:1:
src/Makefile.am:1: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/Makefile.am:1: to `configure.ac' and run `aclocal' and `autoconf' again.
autoreconf: automake failed with exit status: 1

* replace AC_PROG_RANLIB with AC_PROG_LIBTOOL (configure.ac)

configure.ac:33: error: possibly undefined macro: AC_TYPE_UINT16_T
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
=> It seems, that these macros were introduced in autoconf version 2.59-5 (or 2.59c)
     (https://gna.org/bugs/?12089)
     (http://www.gnu.org/software/hello/manual/autoconf/Particular-Types.html)

* comment out AC_TYPE_UINT*_T (configure.ac)

* ./autogen.sh; configure; make;
  unit-test-slave and unit-test-master ... passed on CentOS-4.6
  unit-test-slave and unit-test-master ... passed on Cygwin

Attached is my patch toward autogen.sh and configure.ac
* WARNING: the INSTALL file will be overwrite after executing autogen.sh

Related branches

Revision history for this message
Yishin Li (yishin-li) wrote :
Revision history for this message
Yishin Li (yishin-li) wrote :

update autoconf settings for CentOS 4 and CentOS 5
files: autogen.sh and configure.ac

Changed in libmodbus:
assignee: nobody → Yishin Li (yishin-li)
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Stéphane Raimbault (sra) wrote :

'Fix committed' means the fix is included in the main repository of the project not in your repo.

It's a regression to remove these checks:
AC_TYPE_UINT*_T (configure.ac)
but there are not really important so OK

I don't think it's a good idea to use --force, why do you need it?
http://bazaar.launchpad.net/~yishin-li/libmodbus/mou/revision/172

Changed in libmodbus:
assignee: Yishin Li (yishin-li) → Stéphane Raimbault (sra)
milestone: none → 2.2.0
status: Fix Committed → In Progress
Revision history for this message
Yishin Li (yishin-li) wrote :

The make will end up with infinite loop of "../libtool: line 479: CDPATH: command not found", if I upload the libmodbus tree, which is autogen-ed by Cygwin (autoconf 2.63), to CentOS 5.3 (w/ autoconf 2.59)

$ ./autogen.sh
$ make
make all-recursive
make[1]: Entering directory `/home/ysli/proj/act/proto/sw/libmodbus/mou'
Making all in src
make[2]: Entering directory `/home/ysli/proj/act/proto/sw/libmodbus/mou/src'
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT modbus.lo -MD -MP -MF ".deps/modbus.Tpo" -c -o modbus.lo modbus.c; \
        then mv -f ".deps/modbus.Tpo" ".deps/modbus.Plo"; else rm -f ".deps/modbus.Tpo"; exit 1; fi
../libtool: line 479: CDPATH: command not found
../libtool: line 479: CDPATH: command not found
../libtool: line 479: CDPATH: command not found

autoreconf: running: libtoolize --copy
libtoolize: `config.guess' exists: use `--force' to overwrite
libtoolize: `config.sub' exists: use `--force' to overwrite
libtoolize: `ltmain.sh' exists: use `--force' to overwrite

The above is the clue I found regarding "--force". I know it's not a good approach because it will overwrite "INSTALL" file. Is there a clean way to remove all the Autotools generated files? Neither "make maintainer-clean-am" nor "make maintainer-clean" works for me.

Revision history for this message
Stéphane Raimbault (sra) wrote :

Could you try a 'make distclean' before running ./autogen.sh?

I've removed INSTALL file (and ignored with bzr) and added --force on trunk.

Revision history for this message
Yishin Li (yishin-li) wrote :

The autogen.sh works in CentOS 5.3.

Changed in libmodbus:
status: In Progress → Fix Committed
Changed in libmodbus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.