Author Topic: Cannot Build Code::Blocks 12.11 from source on CentOS 4.8  (Read 6688 times)

Offline blazar

  • Single posting newcomer
  • *
  • Posts: 4
Cannot Build Code::Blocks 12.11 from source on CentOS 4.8
« on: January 11, 2013, 06:53:17 am »
Hi,

I tried to build the Code::Blocks 12.11 from source on linux machine with CentOS 4.8.
I built the source of 10.05 before (simply follow instructions in BUILD file) and it works fine.
But when I tried to build the 12.11, I faced difficulties

Quote
source/codeblocks-12.11release8629 % ./bootstrap
You should update your `aclocal.m4' by running aclocal.
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:79: warning: macro 'AM_OPTIONS_WXCONFIG' not found in library
configure.in:80: warning: macro 'AM_PATH_WXCONFIG' not found in library
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
src/base/tinyxml/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/base/tinyxml/Makefile.am:6: error: Libtool library used but 'LIBTOOL' is undefined
src/base/tinyxml/Makefile.am:6:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/base/tinyxml/Makefile.am:6:   to 'configure.in' and run 'aclocal' and 'autoconf' again.
src/base/tinyxml/Makefile.am:6:   If 'LT_INIT' is in 'configure.in', make sure
src/base/tinyxml/Makefile.am:6:   its definition is in aclocal's search path.
src/build_tools/autorevision/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/include/Makefile.am:10: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

(omitted)

src/sdk/wxscintilla/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/sdk/wxscintilla/Makefile.am:9: error: Libtool library used but 'LIBTOOL' is undefined
src/sdk/wxscintilla/Makefile.am:9:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/sdk/wxscintilla/Makefile.am:9:   to 'configure.in' and run 'aclocal' and 'autoconf' again.
src/sdk/wxscintilla/Makefile.am:9:   If 'LT_INIT' is in 'configure.in', make sure
src/sdk/wxscintilla/Makefile.am:9:   its definition is in aclocal's search path.
src/src/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/tools/cb_share_config/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

I'm not familiar with the autotools, and I tried search with the macro name, and I found someone post about setting env
Quote
setenv ACLOCAL_FLAGS "-I `wx-config --prefix`/share/aclocal"

set the env and ./bootstrap become

Quote
source/codeblocks-12.11release8629 % ./bootstrap
You should update your `aclocal.m4' by running aclocal.
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
src/base/tinyxml/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/base/tinyxml/Makefile.am:6: error: Libtool library used but 'LIBTOOL' is undefined
src/base/tinyxml/Makefile.am:6:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/base/tinyxml/Makefile.am:6:   to 'configure.in' and run 'aclocal' and 'autoconf' again.
src/base/tinyxml/Makefile.am:6:   If 'LT_INIT' is in 'configure.in', make sure
src/base/tinyxml/Makefile.am:6:   its definition is in aclocal's search path.
src/build_tools/autorevision/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/include/Makefile.am:10: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/plugins/abbreviations/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/plugins/abbreviations/Makefile.am:13: error: Libtool library used but 'LIBTOOL' is undefined
src/plugins/abbreviations/Makefile.am:13:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/plugins/abbreviations/Makefile.am:13:   to 'configure.in' and run 'aclocal' and 'autoconf' again.
src/plugins/abbreviations/Makefile.am:13:   If 'LT_INIT' is in 'configure.in', make sure
src/plugins/abbreviations/Makefile.am:13:   its definition is in aclocal's search path.

(omitted)

I tried to ignore and just then configure and make, but it showed errors.

./configure --prefix=[install-folder] --with-contrib-plugins=all,-spellchecker,-NassiShneiderman --with-wx-prefix=[wx-install-folder]

Quote
*************************************************
* Code::Blocks source tree has been configured. *
*************************************************

You can now build Code::Blocks by issuing 'make'.
When the build is complete, become root and install
it by issuing 'make install'.

source/codeblocks-12.11release8629 % make

Quote
make: Warning: File `Makefile' has modification time 7.5e+02 s in the future
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh [source-folder]/missing --run autoconf
configure.in:26: error: possibly undefined macro: AC_DISABLE_STATIC
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:27: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.in:79: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
configure.in:80: error: possibly undefined macro: AM_PATH_WXCONFIG
make: *** [configure] Error 1

Here are the list of version of tools I think may related to the issue.

m4 --version
m4 (GNU M4) 1.4.16

automake --version
automake (GNU automake) 1.12.6

autoconf --version
autoconf (GNU Autoconf) 2.69

gcc --version
gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-11)

wx-config --version
2.8.12

Note: I'm not the root of the machine, I wish to install it as a user and with different versions at same time
(we are currently using 10.05, I just want to figure out if 12.11 has features we would like to upgrade.)

Thanks.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Cannot Build Code::Blocks 12.11 from source on CentOS 4.8
« Reply #1 on: January 11, 2013, 12:07:19 pm »
C::B requires at least GCC 4.0 (stl tr1 is used throughout the code)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Cannot Build Code::Blocks 12.11 from source on CentOS 4.8
« Reply #2 on: January 11, 2013, 03:35:57 pm »
CentOS 4 is too old. It has reached EOL on Feb 29, 2012. Use a newer version - it's free anyway.
Be a part of the solution, not a part of the problem.

Offline bigal

  • Single posting newcomer
  • *
  • Posts: 7
Re: Cannot Build Code::Blocks 12.11 from source on CentOS 4.8
« Reply #3 on: January 14, 2013, 07:36:22 pm »
CentOS is up to 6.2 now. Time for a change?

Offline blazar

  • Single posting newcomer
  • *
  • Posts: 4
Re: Cannot Build Code::Blocks 12.11 from source on CentOS 4.8
« Reply #4 on: January 24, 2013, 09:27:23 am »
Thanks everyone.

I am not sure if the company's machines can update OS(have their consideration), I will try to build on newer machine.

Offline Uskok

  • Multiple posting newcomer
  • *
  • Posts: 15
  • Negdje u Krajini
Re: Cannot Build Code::Blocks 12.11 from source on CentOS 4.8
« Reply #5 on: January 24, 2013, 10:14:04 am »
Maybe I could help.

I had the similar problem with RedHat 4.x and this is company development environment for the old projects and it is not possible to upgrade the machine.
Compiler is too old to build Code::Blocks as is mention before.

Original compiler (3.4.6) is enough to build wxWidgets, and this you can do in company machine.
I made my own virtual machine with RedHat 4.x, compile once more wxWidgets, replace the compiler with new version from RedHat 5.x (4.1.2, build from sources) and then is possible to compile Code::Blocks. There is one part in the code, insert of debug menu for default compiler and produce assert, but if this is removed, Code::Blocks is running in RedHat 4.x

Now I have one machine where I could compile Code:Blocks and only what I need is to copy Output folder to the another machines with wxWidgets.

Even you can pack own version of output directory together with copy of
libwx_gtk2u-2.8.so.0 -> libwx_gtk2u-2.8.so.0.8.0
libwx_gtk2u-2.8.so.0.8.0
libwx_gtk2u_stc-2.8.so.0 -> libwx_gtk2u_stc-2.8.so.0.8.0
ibwx_gtk2u_stc-2.8.so.0.8.0

And this is working on every RedHat 4.x because the rest of the so are not changed.

You cannot compile Code::Blocks in CentOS  5.x or CentOS 6.x and expect to work in CentOS 4.x.