Author Topic: Problem compiling on linux  (Read 7243 times)

Offline wxuserbrest

  • Multiple posting newcomer
  • *
  • Posts: 22
Problem compiling on linux
« on: August 27, 2006, 06:17:15 pm »
Hi,
i know this is not the first time someone ask for this but i still can't compile it. I load it on svn, and do
export ACLOCAL_FLAGS="--acdir=`wx-config --prefix`/share/aclocal"
i even copy the wxwin.m4 to /usr/share/aclocal

i do ./bootstrap
then ./compile

and i have this error

AM_OPTIONS_WXCONFIG: command not found
./configure: line 23750: syntax error near unexpected token `2.6.0,'
./configure: line 23750: `AM_PATH_WXCONFIG(2.6.0, wxWin=1)'

wxWidgets 2.6.3 installed (wx-config --cppflags --libs works best and my owm application can compile too with kdevelop but i want to use code::blocks)
What is the problem. Why can't u do a source distribution where u only do ./configure than make and make install
It will be more simple i think. I suppose there are reasons but i suppose that too many people stop trying to compile this software which is too great to be ignored (i say that as i tried one year ago to compile it and in fact i m still with kdevelop).
Thanks
Sincerely

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Problem compiling on linux
« Reply #1 on: August 27, 2006, 06:49:21 pm »
Quote
Why can't u do a source distribution where u only do ./configure than make and make install

We will, once we release the next version.
Be patient!
This bug will be fixed soon...

BentFX

  • Guest
Re: Problem compiling on linux
« Reply #2 on: August 28, 2006, 01:32:49 am »
Does this thread look familiar? http://forums.codeblocks.org/index.php?topic=1077.0

The line numbers are different, but the errors appear the same...

Are you using a wxWidgets package, or did you build it?

Quote
I suppose there are reasons but i suppose that too many people stop trying...

I'm building a new Linux From Scratch laptop, and have spent the last 4 days juggling dependancies for everything! I can guarantee wxWidgets and Code::Blocks are a pain, yet I assure you... When the pieces are in place, it *does* fit together.

I've done it three times now... I did Codeblocks RC1 on Fedora 2 a couple years back... I did wxWidgets and RC2 on Win2K last year... and I've now done it on a Linux, built from the ground up(I fought RC2, and beat it, then went back and did the SVN) .

IT WAS NEVER EASY!!! It never fit together the first time! Your right, it should be easier! But it isn't :) yet all the pieces are there, and if you wiggle them just right they will drop into place.

Don't get angry at it!
Post some better info about the system you building on...
Did ./bootstrap give you a slew of warnings like in the thread I linked above?
I'm investigating, and hope we can get it working for you.

BentFX

  • Guest
Re: Problem compiling on linux
« Reply #3 on: August 28, 2006, 02:12:48 am »
Just did a fresh ./bootstrap - ./configure on the trunk.
Quote
Prompt@MyBox:~/Devel/codeblocks$ ./bootstrap

You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
/usr/share/aclocal/xmms.m4:17: warning: underquoted definition of XMMS_TEST_VERSION
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
/usr/share/aclocal/xmms.m4:62: warning: underquoted definition of AM_PATH_XMMS
/usr/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG
/usr/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK
/usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
configure.in: installing `./install-sh'
configure.in: installing `./missing'
src/plugins/astyle/Makefile.am: installing `./depcomp'

Prompt@MyBox:~/Devel/codeblocks$ ./configure --prefix=/opt/codeblanks

checking whether build environment is sane... Just a little nuts... OK
<snip>
...
<snip>
config.status: executing depfiles commands


*************************************************
* 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'.

Sorry! :(

Did you try this...

In case of missing macros try
Code
export ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal"

Does this echo a valid path to your wxwin.m4?
Code
 echo "It's here... `wx-config --prefix`/share/aclocal"

BentFX

  • Guest
Re: Problem compiling on linux
« Reply #4 on: August 28, 2006, 02:43:42 am »
If I hide my wxwin.m4, I get the same error as you during ./configure...
Code
./configure: line 23380: AM_OPTIONS_WXCONFIG: command not found
./configure: line 23381: syntax error near unexpected token `2.6.0,'
./configure: line 23381: `AM_PATH_WXCONFIG(2.6.0, wxWin=1)'

I also get this little death dance during ./bootstrap...
Code
aclocal:configure.in:63: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
aclocal:configure.in:64: warning: macro `AM_PATH_WXCONFIG' not found in library

if I do...
Code
export ACLOCAL_FLAGS="--acdir=/home/MyHome/I/hid/it/over/here"
./bootstrap chokes, chokes bad, and fails to build ./configure

if I do...
Code
export ACLOCAL_FLAGS="-I /home/MyHome/I/hid/it/over/here"
./bootstrap finds my wxwin.m4, and life is good!

I sure hope this helps :D

{edit}
if I do...
Code
unset ACLOCAL_FLAGS
ln -s /home/MyHome/I/hid/it/over/here/wxwin.m4 /usr/share/aclocal
Life is just as good, and I'm done screwing with it!!!
{/edit}

{editmore}
Mandrav,

Could you get into the wiki here and get rid of the ACLOCAL_FLAGS="--acdir fix, cause it isn't a fix.
the second one is the correct syntax... ACLOCAL_FLAGS="-I `wx-config...

Thank you sir :)
{eromtide}
« Last Edit: August 28, 2006, 03:16:14 am by BentFX »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Problem compiling on linux
« Reply #5 on: August 28, 2006, 09:12:32 am »
Quote
Mandrav,

Could you get into the wiki here and get rid of the ACLOCAL_FLAGS="--acdir fix, cause it isn't a fix.
the second one is the correct syntax... ACLOCAL_FLAGS="-I `wx-config...

Why don't you update it? You 're the one with recent first-hand experience ;).
In case you didn't know, your forum username/password is your wiki login too.
Be patient!
This bug will be fixed soon...

BentFX

  • Guest
Re: Problem compiling on linux
« Reply #6 on: August 28, 2006, 04:13:05 pm »
Why don't you update it?
Done! (I'm a Wiki Newbie  :oops:)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Problem compiling on linux
« Reply #7 on: August 29, 2006, 08:15:21 pm »
IT WAS NEVER EASY!!! It never fit together the first time! Your right, it should be easier! But it isn't :) yet all the pieces are there, and if you wiggle them just right they will drop into place.

Hello,

personally, I did not have too much problems building C::B (SVN sources) on both Ubuntu and Gentoo, especially if you read carefully the info in the C::B wiki (and you have a kind user helping you with some linux troubles :)). Usually the warnings or errors contain the solution and you have just to follow it. If not you can post them on the forum (if not already posted by someone else :)) Anyway, sometime I got errors which I could not solve and the "only" solution was a fresh checkout of the SVN sources.

All the best,
Michael