Author Topic: Compiling Code::Blocks: ./bootstrap command errors.  (Read 1379 times)

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Compiling Code::Blocks: ./bootstrap command errors.
« on: January 28, 2019, 09:15:34 pm »
I am attempting to follow the instructions at:
https://wiki.wxwidgets.org/Installing_and_configuring_under_Ubuntu
I already have wxGTK installed (see my final post in the thread: http://forums.codeblocks.org/index.php/topic,23067.new.html). So I skipped to the heading "Code::Blocks installation".

In the development directory I did this command sequence:
Code: [Select]
svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk
cd trunk
./bootstrap
and got these errors:
Code: [Select]
...
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:141: warning: macro 'AM_OPTIONS_WXCONFIG' not found in library
configure.ac:142: warning: macro 'AM_PATH_WXCONFIG' not found in library
...
src/base/tinyxml/Makefile.am: installing './depcomp'
configure.ac:141: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:142: error: possibly undefined macro: AM_PATH_WXCONFIG
What is to be done about these errors?
I attempted to ignore those errors and proceed with the commands:
Code: [Select]
./configure
 make
But got the error:
Code: [Select]
make: *** No targets specified and no makefile found.  Stop.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #1 on: January 28, 2019, 09:46:59 pm »
You need to have at least one version of wxgtk-dev/devel package installed system wide. Or you need to set the am path to point to the wxwin.m4 file.
(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 spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #2 on: January 29, 2019, 06:53:51 pm »
I have this file in the path:
/home/me/Packages/wxWidgets-3.0.3/wxwin.m4
This is not system wide.

What is this "am path" and how is it set?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #3 on: January 29, 2019, 09:29:54 pm »
I am guessing on this
http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux

Quote
...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="-I `wx-config --prefix`/share/aclocal"
To change the aclocal search path more permanently do:

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

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Krice

  • Multiple posting newcomer
  • *
  • Posts: 122
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #4 on: August 12, 2019, 11:54:56 am »
I have the same problem, but also wx-config isn't found, should it be added to path or something like that? I think wxwidgets compiled ok. I'm trying to compile C::B on OSX (latest version). By the way, why it is this difficult? I already had tons of problems trying to compile wxwidgets, because the readme instructions were not correct.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #5 on: August 12, 2019, 03:16:18 pm »
I have the same problem, but also wx-config isn't found, should it be added to path or something like that? I think wxwidgets compiled ok. I'm trying to compile C::B on OSX (latest version). By the way, why it is this difficult? I already had tons of problems trying to compile wxwidgets, because the readme instructions were not correct.

There are very few OSX experts on this website.

I suggest asking here about how to install wxWidgets on OSX so wx-config works.
https://forums.wxwidgets.org/viewforum.php?f=23

Once you get wx-config to work; I suggest reading this post http://forums.codeblocks.org/index.php/topic,23428.msg159512.html#msg159512

Tim S.
« Last Edit: August 12, 2019, 03:19:46 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Krice

  • Multiple posting newcomer
  • *
  • Posts: 122
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #6 on: August 12, 2019, 04:13:08 pm »
I got wx-config to work by just using the full path to it. But bootstrap is still not working:

Code: [Select]
aclocal: warning: couldn't open directory '/Users/(user)/Documents/wxWidgets-3.1.2/share/aclocal': No such file or directory
configure.ac:141: warning: macro 'AM_OPTIONS_WXCONFIG' not found in library
configure.ac:142: warning: macro 'AM_PATH_WXCONFIG' not found in library
configure.ac:26: installing './compile'
configure.ac:22: installing './missing'
src/base/tinyxml/Makefile.am: installing './depcomp'
configure.ac:141: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:142: error: possibly undefined macro: AM_PATH_WXCONFIG

Well yes, there is no share/aclocal directory in the wxWidgets-3.1.2. Why isn't it there, didn't it compile or am I missing something?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #7 on: August 12, 2019, 04:51:52 pm »
Code: [Select]
export ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal"
Replace wx-config with the full path to it!

Edit: You need to find a website that teaches the basics of command line tasks on OSX.

Because, I am guessing, you do not know the basics!

Edit2: Post what .../wx-config --prefix gives; replace ... with path

Edit3: You do know that wxWidgets needs to be installed on your computer; just downloading the sourcecode does not install it!

Tim S.
« Last Edit: August 12, 2019, 05:25:34 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Krice

  • Multiple posting newcomer
  • *
  • Posts: 122
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #8 on: August 12, 2019, 10:58:39 pm »
You do know that wxWidgets needs to be installed on your computer; just downloading the sourcecode does not install it!

I'm not on my mac mini right now, but I did follow installation instructions of wxwidgets and I guess it did something. It did compile it quite a while, like 20 minutes or even more. But I have no idea if it was installed correctly, however I managed to complete all steps in instructions about how to install it. But I can say that I don't know how programming (C/C++ in this case) works in OSX. Other than it requires compiling libraries, because I guess you need specific version for that OS version or whatever. But it seems to be quite hard to understand where library files are and how to use them. When you look at the wxwidgets directory it's just full of randomly named strange files. Well I guess source files do make some sense, but nothing else does.

Offline Krice

  • Multiple posting newcomer
  • *
  • Posts: 122
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #9 on: August 13, 2019, 02:07:48 pm »
I tried to star over and follow wxwidgets instructions. I get an error about "try a different SDK" in configure command which I think could be result of not having XCode installed (I do have command line tools). This is just a theory which I have to try later, because XCode download is 7,5Gb and the internet is ~700kb/sec (wlan). The wonders of modern world. Besides it's thunderstorm today which means it's better unplug computers fast if it gets bad, so I'm not even going to try it today. The problem I had with XCode was that the automatic update began to fail after the size of that thing got over 5Gb I think. It just gives up and never works. If you can stop automatic update for XCode only then it might work.

Offline Krice

  • Multiple posting newcomer
  • *
  • Posts: 122
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #10 on: August 14, 2019, 01:04:56 pm »
It was not XCode.. When I search internet this has been a problem at least since 2007 for linux and OSX I guess. Could someone figure this out for good? I mean this: possibly undefined macro: AM_PATH_WXCONFIG in when running ./bootstrap command. There has to be some linux or osx people here, right?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #11 on: August 14, 2019, 03:59:07 pm »
It was not XCode.. When I search internet this has been a problem at least since 2007 for linux and OSX I guess. Could someone figure this out for good? I mean this: possibly undefined macro: AM_PATH_WXCONFIG in when running ./bootstrap command. There has to be some linux or osx people here, right?

You need to get wx-config to work!

And, then tell me what wx-config --prefix returns or I will add you to the list of people who is not able to be helped by me!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline sodev

  • Regular
  • ***
  • Posts: 311
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #12 on: August 14, 2019, 04:08:51 pm »
The problem is that the bootstrap script, or more precisely autoconf that is used by it, cannot find the wxWidgets autoconf files. This is because either they are not installed at all or in a location that autoconf isn't looking for.

So first you have to make sure that you have wxWidgets fully installed and then you can try what was written earlier in this thread to make autoconf find these files. Just beeing able to run wx-config is not enough, but it can be used to get the path that needs to be added to the autoconf search paths.

Offline Krice

  • Multiple posting newcomer
  • *
  • Posts: 122
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #13 on: August 15, 2019, 12:49:28 pm »
And, then tell me what wx-config --prefix returns or I will add you to the list of people who is not able to be helped by me!

I was reading through similar threads (in wxwidgets forum) and in one thread someone told that when you are in the directory you need to write ./wx-config, NOT wx-config. Cool, now I know something you didn't know and revealed to me in the first place. So now, ./wx-config --prefix returns:

/Users/Krice/Documents/wxw

(I guess it's safe to tell my osx username, it's not like it's a mystery...)

And that's where wxwidgets is installed. wxWidgets is also working, the minimal example compiles and runs fine.
« Last Edit: August 15, 2019, 12:51:22 pm by Krice »

Offline sodev

  • Regular
  • ***
  • Posts: 311
Re: Compiling Code::Blocks: ./bootstrap command errors.
« Reply #14 on: August 15, 2019, 01:46:56 pm »
when you are in the directory you need to write ./wx-config, NOT wx-config

Welcome to Linux where unlike in Windows the current directory is not on the search path.

And now head on and fix autoconf...