Author Topic: Buidling from CVS - bootstrap error  (Read 16426 times)

Offline doscott

  • Multiple posting newcomer
  • *
  • Posts: 17
Buidling from CVS - bootstrap error
« on: September 17, 2005, 06:37:49 pm »
I have built wxWindows 2.6.1 using the method shown in http://wiki.codeblocks.org/index.php/Compiling_Code::Blocks_in_Linux_%28applies_to_all_distros%29#Getting_the_latest_sources_from_CVS

wx-config --prefix
gives: /opt/wx/2.6

wx-config --libs
gives:-L/opt/wx/2.6/lib -pthread   -L/usr/X11R6/lib  -lwx_gtk2u-2.6

which wx-config
gives:/opt/wx/2.6/bin/wx-config

When I run ./bootstrap I get
[[email protected] codeblocks]$ ./bootstrap
aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
aclocal:configure.in:62: warning: macro `AM_PATH_WXCONFIG' not found in library
configure.in:61: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:62: error: possibly undefined macro: AM_PATH_WXCONFIG

Any idea as to what I am doing wrong?

This is on Fedora Core 4.

Offline doscott

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Buidling from CVS - bootstrap error
« Reply #1 on: September 17, 2005, 07:05:47 pm »
I have found the probem.

wxwin.m4 was located in

/usr/local/share/aclocal

I copied it to

/usr/share/aclocal

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Buidling from CVS - bootstrap error
« Reply #2 on: September 17, 2005, 08:25:02 pm »
OK, someone else had the same problem.  I've updated the wiki to solve this (moving .m4 files from different wx versions isn't the best thing to do).  I just wrote those steps yesterday so you're probably the first to test them  :)

Offline fiammy

  • Multiple posting newcomer
  • *
  • Posts: 46
    • Nebulagame
Re: Buidling from CVS - bootstrap error
« Reply #3 on: September 21, 2005, 10:05:38 am »
grv575: Could you provide any link to that update on the wiki? A search on '.m4' turns up nothing...

Thanks

Offline doscott

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Buidling from CVS - bootstrap error
« Reply #4 on: September 21, 2005, 03:09:54 pm »
http://wiki.codeblocks.org/index.php/Compiling_Code::Blocks_in_Linux_%28applies_to_all_distros%29#wxWidgets_2.6.1_build

This sets up the configure script and it's dependencies. It only needs to be run once (after downloading the source from cvs). If you get errors like:

aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library

Then aclocal is having trouble finding the wxWidgets .m4 files. You can do one of two things: To just get bootstrap to find the path this time do:

export ACLOCAL_FLAGS="--acdir=`wx-config --prefix`/share/aclocal"

To change the aclocal search path more permanently do:

echo `wx-config --prefix`/share/aclocal >> /usr/share/aclocal/dirlist

Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal



Offline roger

  • Single posting newcomer
  • *
  • Posts: 3
Re: Buidling from CVS - bootstrap error
« Reply #5 on: September 28, 2005, 05:00:25 pm »
I have just been through this caboodle with a slightly different experience.

My distro is sarge and the automake stuff was not there. I installed autoconf, automake and libtool using the latest versions and ended up with macro errors similar to those in the Wiki (actually AM_CONDITIONAL not in library). I tried the fixes in the Eiki to no avail. Then I goggled the error message and realised that I probably did not have working autoconf system. I removed the whole lot and then did:

apt-get install automake1.7
apt-get install libtool1.4

as a final hurdle, the ENV variable I had exported in the Wiki was messing things up, I got rid of that and lo, it worked.

Moral of the story......be sure your automake stuff is working first of all ;-)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Buidling from CVS - bootstrap error
« Reply #6 on: October 07, 2005, 09:51:14 pm »
Quote from: doscott
I have built wxWindows 2.6.1 using the method shown in http://wiki.codeblocks.org/index.php/Compiling_Code::Blocks_in_Linux_%28applies_to_all_distros%29#Getting_the_latest_sources_from_CVS

i have exactly the same situation, wx-2.6.1 built fine, but i got stuck with ./bootstrap

----------------------------------------------------------------------
Code: [Select]
wx-config --prefixgives:
Code: [Select]
/opt/wx/2.6
----------------------------------------------------------------------
Code: [Select]
wx-config --libsgives:
Code: [Select]
-L/opt/wx/2.6/lib -pthread  -lwx_gtk2-2.6
----------------------------------------------------------------------
Code: [Select]
which wx-configgives:
Code: [Select]
/opt/wx/2.6/bin/wx-config

BUT
when I run
Code: [Select]
./bootstrap I get
Code: [Select]
: bad interpreter: File not found
i'm running on
Ubuntu 5.04 Hoary, using
gcc-3.3
gdb 6.3

i installed additionally

autoconf 2.59a-2
automake 1.9.4-1
libtool 1.5.6-5

please @all linux-guru's :
am i missing something ?
is there any log-file where i can look which file wasn't found ?
what shall i do next ?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Buidling from CVS - bootstrap error
« Reply #7 on: October 07, 2005, 10:27:06 pm »
Quote
Code: [Select]
: bad interpreter: File not found

This usually happens when the script is in dos format (although I double-checked and it's not).
Anyway, in ubuntu you need to run 'fromdos bootstrap' (fromdos is the equivalent of dos2unix and is found in the package sysutils).
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Buidling from CVS - bootstrap error
« Reply #8 on: October 08, 2005, 08:12:26 am »
Quote
Code: [Select]
: bad interpreter: File not found

This usually happens when the script is in dos format (although I double-checked and it's not).
Anyway, in ubuntu you need to run 'fromdos bootstrap'

thanks! 'fromdos bootstrap' worked ok.

but now:

when i run ./bootstrap there is a warning regarding PKG_...
Code: [Select]
[email protected]:~/devel/CodeBlocks.CVS.HEAD$
[email protected]:~/devel/CodeBlocks.CVS.HEAD$ ./bootstrap
/usr/share/aclocal/pkg.m4:5: warning: underquoted definition of PKG_CHECK_MODULES
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal

an an error when running ./configure
Code: [Select]
[email protected]:~/devel/CodeBlocks.CVS.HEAD$
[email protected]:~/devel/CodeBlocks.CVS.HEAD$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) mawk
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working volatile... yes
checking whether closedir returns void... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for getcwd... yes
checking for isascii... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strrchr... yes
checking for strstr... yes
checking for dlopen in -ldl... yes
checking for pthread_create in -lpthread... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking whether to enable debugging... no
checking whether to build the source formatter plugin... yes
checking whether to build the class wizard plugin... yes
checking whether to build the code completion plugin... yes
checking whether to build the compiler plugin... yes
checking whether to build the debugger plugin... yes
checking whether to build the default MIME handler plugin... yes
checking whether to build the plugin wizard plugin... yes
checking whether to build the to-do plugin... yes
checking whether to build the contrib plugins... yes
checking for wx-config... /opt/wx/2.6/bin/wx-config
checking for wxWidgets version >= 2.4.2... yes (version 2.6.1)
checking for wxWidgets static library... no
configure: Configuring Code::Blocks...
configure: creating ./config.status
.infig.status: error: cannot find input file: Makefile

there is not a file called  'makefile' existing,
but a (huge) newly generated 'makefile.in' is there.

what now ? any hints ? thanks

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Buidling from CVS - bootstrap error
« Reply #9 on: October 08, 2005, 08:56:44 am »
What did you do with these files? :P
Run fromdos on configure.in too...
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Buidling from CVS - bootstrap error
« Reply #10 on: October 08, 2005, 10:22:02 am »
Quote from: mandrav
What did you do with these files? :P
maybe it was no good idea to use a fresh codeblocks cvs -update copy from windows (which i already had) !

this time i have checked out a fresh codeblocks copy using ubuntu cvs and now it builds smoothly :)
thanks for your hints !

...some coffees later...
My CodeBlocks.CVS.HEAD is running fine now under Ubuntu :)


WHAT HAPPENED ?

explanation:
when i built my last Code::Blocks version under Ubuntu ( RC1 ,  using the older makefile.unix build system),
i just copied the fresh cvs-files from windows to unix and then it was building fine using gcc-make.
This time time i thought, i can do it the same way, but the new autotools config is obviously not working
with DOS line-ending conventions.

conclusio:
i'll go and write a warning in the install-wiki that it's vital for using the autotools, that C::B was checked out from CVS
using the linux-cvs (at least when using ubuntu, don't know if other linux distrib's have the same problems).

right?


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Buidling from CVS - bootstrap error
« Reply #11 on: October 08, 2005, 11:09:12 am »
Quote
right?

Right  8)
This is true for all Linux distros. Autotools expect unix line endings in their configuration files.
Be patient!
This bug will be fixed soon...

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Buidling from CVS - bootstrap error
« Reply #12 on: October 08, 2005, 11:34:16 am »
I just opened the file after also copying from windows with an editor in Linux, made a do nothing change (like adding a linefeed) and saved again and voila no LF/CR endings. But I am dealing with another problem here. I just succesfully compiled code::blocks in my Linux box (Suse 9.3, gcc3.3.5, wxWidgets 2.6.2, code::blocks 1.0 CVS) but when I run the app the compiler plugin does not load. The plugin has been build (I can see it in the plugins directory an the resources zip in the share/codeblocks/ directory) but it's nowhere to be seen in the actual app
Quote
Found 8 plugins: AStylePlugin CodeStatistics ToDoList DefaultMimeHandler PluginWizard DebuggerGDB ClassWizard CodeCompletion
Any ideas?
Life would be so much easier if we could just look at the source code.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Buidling from CVS - bootstrap error
« Reply #13 on: November 09, 2005, 03:54:05 pm »
I was having the problem of "AM_OPTIONS_WXCONFIG and AM_PATH_WXCONFIG not found in library" and none of the help here worked for me on Kubuntu.

I just tried installing another wx package called wx-common and it solved it.

I hope it be of any use.

Offline rathapolk

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Buidling from CVS - bootstrap error
« Reply #14 on: November 21, 2005, 04:08:30 am »
Hello,
I have tried to build C::B from CVS on my Fedora Core 4 by the direction in the WiKi. I successfully built wxWidgets 2.6.1. When I try rpmbuild, it runs until bootstrap and it has errors like...

./bootstrap
You should update your `aclocal.m4' by running aclocal.
src/plugins/astyle/Makefile.am:10: Libtool library used but `LIBTOOL' is undefined
src/plugins/astyle/Makefile.am:10:
src/plugins/astyle/Makefile.am:10: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/plugins/astyle/Makefile.am:10: to `configure.in' and run `aclocal' and `autoconf' again.
src/plugins/classwizard/Makefile.am:9: Libtool library used but `LIBTOOL' is undefined
src/plugins/classwizard/Makefile.am:9:
src/plugins/classwizard/Makefile.am:9: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/plugins/classwizard/Makefile.am:9: to `configure.in' and run `aclocal' and `autoconf' again.
(there are more... )

I tried to update the latest version of gcc and libtool, but that didnt help.
Please help me. I am very new to Linux.

thanks,
rathapolk