Author Topic: CB autotools build system crash with libtool version 2.2.6  (Read 12006 times)

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
CB autotools build system crash with libtool version 2.2.6
« on: November 23, 2008, 06:52:53 pm »
Hi,

CB SVN crashes at configure stage, when the recent release of libtool (version 2.2.6) has been installed (no issue with libtool version 2.2.4).

This is caused by modern features of libtool, not by CB itself.
Three build system files should be altered: configure.in, bootstrap and Makefile.am.
Attached is a patch file. To apply it, go to the trunk directory, and run:
  patch -u bootstrap codeblocks.patch

Hope this helps.

best, Fab

[attachment deleted by admin]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #1 on: November 23, 2008, 10:05:48 pm »
what will be the influence of this patch on the old libtool version ??

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #2 on: November 23, 2008, 10:37:54 pm »
I just ran ./bootstrap, ./configure, make and make install, without errors.

I got the following messages from libtool:
Code
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

but had no crash, nor any problems with compiling.

libtool is 2.26a-1 and autoconf is 2.63-1, both from debian experimental
automake is 1.10.1-3 and gcc/g++ is 4.2.4-4, both from debian unstable
 

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #3 on: November 25, 2008, 08:53:31 pm »
Hi jens,
I confirm the issue.
I have the same major versions of autotools, compiled from GNU source at ftp.gnu.org, and gcc 4.2/4.3 (ubuntu) or gcc-snapshot (november, source).
Attached is the log (sterr+stdout) of ./boostrap ; ./configure ; make
My autotools normally work OK.
Everything comes back to order with the patch.
Best,
Fab


[attachment deleted by admin]

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #4 on: November 25, 2008, 08:55:59 pm »
what will be the influence of this patch on the old libtool version ??
libtool is a script that is generated by ./bootstrap. The patched ./bootstrap should refresh it accordingly.
If you altered libtool by hand (which is not generally advised), you'll have to copy these amendments into the new libtool again.
Fab

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #5 on: November 26, 2008, 12:26:29 am »
The patch breaks bootstrapping on older systems.
I build my nightlies with pbuilder inside a clean debian etch changeroot.
To test the patch I installed autotools and libtools (gcc was already installed) with the following revisions:
  • m4 1.4.8-2
  • autoconf 2.61-4
  • automake 1:1.10+nogfdl-1
  • libtool 1.5.22-4
  • gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Bootstrapping works with a warning:
Code
Remember to add `AC_PROG_LIBTOOL' to `configure.in'.
You should update your `aclocal.m4' by running aclocal.
./configure runs without errors

make stops after following error message:
Code
make[4]: Entering directory `/tmp/buildd/codeblocks-8.02svn/src/sdk/scripting/squirrel'
/bin/sh ../../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/squirrel  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sqfuncstate.lo -MD -MP -MF .deps/sqfuncstate.Tpo -c -o sqfuncstate.lo sqfuncstate.cpp
../../../../libtool: line 807: X--tag=CXX: command not found
../../../../libtool: line 840: libtool: ignoring unknown tag : command not found
../../../../libtool: line 807: X--mode=compile: command not found
../../../../libtool: line 973: *** Warning: inferring the mode of operation is deprecated.: command not found
../../../../libtool: line 974: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../../../../libtool: line 1117: Xg++: command not found
../../../../libtool: line 1117: X-DHAVE_CONFIG_H: command not found
../../../../libtool: line 1117: X-I.: command not found
../../../../libtool: line 1117: X-I../../../../src/include: No such file or directory
../../../../libtool: line 1117: X-I../../../../src/include/scripting/include: No such file or directory
../../../../libtool: line 1117: X-I../../../../src/include/scripting/squirrel: No such file or directory
../../../../libtool: line 1117: X-Ulinux: command not found
../../../../libtool: line 1117: X-Uunix: command not found
../../../../libtool: line 1117: X-O2: command not found
../../../../libtool: line 1117: X-ffast-math: command not found
../../../../libtool: line 1117: X-DCB_AUTOCONF: command not found
../../../../libtool: line 1117: X-g: command not found
../../../../libtool: line 1117: X-O2: command not found
../../../../libtool: line 1117: X-DCB_PRECOMP: command not found
../../../../libtool: line 1117: X-Winvalid-pch: command not found
../../../../libtool: line 1117: X-fPIC: command not found
../../../../libtool: line 1117: X-DPIC: command not found
../../../../libtool: line 1117: X-fexceptions: command not found
../../../../libtool: line 1117: X-MT: command not found
../../../../libtool: line 1117: Xsqfuncstate.lo: command not found
../../../../libtool: line 1117: X-MD: command not found
../../../../libtool: line 1117: X-MP: command not found
../../../../libtool: line 1117: X-MF: command not found
../../../../libtool: line 1117: X.deps/sqfuncstate.Tpo: No such file or directory
../../../../libtool: line 1117: X-c: command not found
../../../../libtool: line 1168: Xsqfuncstate.lo: command not found
../../../../libtool: line 1173: libtool: compile: cannot determine name of library object from `': command not found
make[4]: *** [sqfuncstate.lo] Error 1

It seems that LT_PREREQ and LT_INIT are not defined for older libtool-revisions, so ./bootstrap does not even throw an error as expected.


Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #6 on: November 26, 2008, 01:35:14 am »
Yes, Jens, you're right.
I forgot to mention that LT_INIT is a non-backward compatible feature of libtool 2.2.6, which is not there in prior versions (which use AC_PROG_LIBTOOL).
Could you do your test again, with the same older platform, yet after replacing LT_INIT and LT_PREREQ with plain AC_PROG_LIBTOOL and AC_DISABLE_STATIC in configure.in, leaving other patched changes as is?
I'd be curious to know the results. On my platform, leaving these is OK after all, yet you still have to add AC_CONFIG_MACRO_DIR([m4]) to configure.in with the patch.
Fab
« Last Edit: November 26, 2008, 02:07:22 am by libfab »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #7 on: November 26, 2008, 06:58:13 am »
I also tested last night:
it works.

There is also a little change needed for your patch:

in bootstrap the creating of subdir m4 should be conditional, to avoid warnings:

Code
if [ ! -d m4 ]; then
    mkdir m4;
fi

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: CB autotools build system crash with libtool version 2.2.6
« Reply #8 on: November 26, 2008, 09:21:39 pm »
You're right again Jens !
Attached is the modded patch file, which integrates your remarks.
I suggest you could place it as an optional patch somewhere on your unofficial CB repository.
Best, Fab

[attachment deleted by admin]