Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: fiammy on September 13, 2005, 04:55:53 pm

Title: Missing files to compile with Autotools
Post by: fiammy on September 13, 2005, 04:55:53 pm
Hello,

I checked out the latest version from CVS, and tried the different steps to use the Autotools =

autoconf
automake
./configure

but when I do the automake, I get these error messages:

fiammy@dx6100-003:~/Programming/codeblocks> automake
configure.in: required file `./install-sh' not found
configure.in: required file `./missing' not found
src/plugins/astyle/Makefile.am: required file `./depcomp' not found
Makefile.am: required file `./INSTALL' not found


could it be that some files are missing at the moment from CVS?

Thanks
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 15, 2005, 08:47:42 am
Nothing 's missing, AFAIK.
As soon as you check out from CVS, you must run ./bootstrap ;)
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 15, 2005, 03:47:38 pm
That's right. Sorry.
That part works now.
I seem to have another problem. When I try to execute make with the standard vanilla SuSE 9.3 wxWidgets (2.5.3), I guess it is compiled with unicode included. Is there a way to tell the configure script to add (experimental, I know) support for unicode?

Thank you,
David
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 15, 2005, 06:01:48 pm
It should detect it automatically. To guess wxWidgets settings, it's using wx-config after all...
If you 're having trouble, please post the output of 'configure' or 'make', whichever gives you problems.
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 15, 2005, 07:09:26 pm
Well, I did make a 2.6.1 version, but I 'deinstalled' it, because I want to see what a vanilla SuSE installation can do with Code::Blocks. If it installs easily in that environment, you're more likely to get users that when you need to do some strange voodoo ritual to have 2 coexisting wxWidgets releases...

I think I removed all the files the wxWidgets 2.6.1 installation added to my system (sorry, 'our' system as my girlfriend expects me to say :-) ), so there's no wx-config any more... It detects the wxWidgets release 2.5.3 during configure :
---- snip ----
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 for wx-config... /usr/bin/wx-config
checking for wxWindows version >= 2.4.2... ls: wx*-2.4-config: No such file or directory
ls: wx*-2.4-config: No such file or directory

  Warning: No config found to match: /usr/bin/wx-config --static --libs
           in /usr/lib64/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.

yes (version 2.5.3)
configure: Configuring Code::Blocks...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/sdk/Makefile
config.status: creating src/sdk/tinyxml/Makefile
config.status: creating src/sdk/wxscintilla/Makefile
config.status: creating src/sdk/resources/Makefile
config.status: creating src/sdk/resources/lexers/Makefile
config.status: creating src/src/wxDockit/Makefile
config.status: creating src/src/resources/Makefile
config.status: creating src/src/resources/icons/Makefile
config.status: creating src/src/resources/images/Makefile
config.status: creating src/src/resources/images/16x16/Makefile
config.status: creating src/src/Makefile
config.status: creating src/plugins/Makefile
---- snip ----

But, alas, it still fails :-(
-- snip ---
LES -MT wxscintilla.lo -MD -MP -MF ".deps/wxscintilla.Tpo" -c -o wxscintilla.lo `test -f 'src/wxscintilla.cpp' || echo './'`src/wxscintilla.cpp; \
then mv -f ".deps/wxscintilla.Tpo" ".deps/wxscintilla.Plo"; else rm -f ".deps/wxscintilla.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src/sdk -I/usr/lib64/wx/include/gtk2-unicode-release-2.5 -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I./include -I./src/scintilla/include -I./src/scintilla/src -DSCI_LEXER -DLINK_LEXERS -DGTK -I/usr/lib64/wx/include/gtk2-unicode-release-2.5 -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -g -O2 -O2 -ffast-math -I/usr/lib64/wx/include/gtk2-unicode-release-2.5 -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -MT wxscintilla.lo -MD -MP -MF .deps/wxscintilla.Tpo -c src/wxscintilla.cpp  -fPIC -DPIC -o .libs/wxscintilla.o
src/wxscintilla.cpp: In member function `wxCharBuffer
   wxScintilla::GetCurLineRaw(int*)':
src/wxscintilla.cpp:2815: error: no matching function for call to `wxCharBuffer
   ::wxCharBuffer()'
/usr/include/wx-2.5/wx/buffer.h:96: error: candidates are:
   wxCharBuffer::wxCharBuffer(const wxCharBuffer&)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(long unsigned int)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(const char*)
src/wxscintilla.cpp: In member function `wxCharBuffer
   wxScintilla::GetLineRaw(int)':
src/wxscintilla.cpp:2827: error: no matching function for call to `wxCharBuffer
   ::wxCharBuffer()'
/usr/include/wx-2.5/wx/buffer.h:96: error: candidates are:
   wxCharBuffer::wxCharBuffer(const wxCharBuffer&)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(long unsigned int)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(const char*)
src/wxscintilla.cpp: In member function `wxCharBuffer
   wxScintilla::GetSelectedTextRaw()':
src/wxscintilla.cpp:2841: error: no matching function for call to `wxCharBuffer
   ::wxCharBuffer()'
/usr/include/wx-2.5/wx/buffer.h:96: error: candidates are:
   wxCharBuffer::wxCharBuffer(const wxCharBuffer&)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(long unsigned int)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(const char*)
src/wxscintilla.cpp: In member function `wxCharBuffer
   wxScintilla::GetTextRangeRaw(int, int)':
src/wxscintilla.cpp:2857: error: no matching function for call to `wxCharBuffer
   ::wxCharBuffer()'
/usr/include/wx-2.5/wx/buffer.h:96: error: candidates are:
   wxCharBuffer::wxCharBuffer(const wxCharBuffer&)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(long unsigned int)
/usr/include/wx-2.5/wx/buffer.h:96: error:
   wxCharBuffer::wxCharBuffer(const char*)
make[4]: *** [wxscintilla.lo] Error 1
make[4]: Leaving directory `/home/fiammy/Programming/codeblocks/src/sdk/wxscintilla'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/fiammy/Programming/codeblocks/src/sdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/fiammy/Programming/codeblocks/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/fiammy/Programming/codeblocks/src'
make: *** [all-recursive] Error 1
--- snip ---

Any help would be appreciated :-)

Thanks
Title: Re: Missing files to compile with Autotools
Post by: grv575 on September 15, 2005, 11:13:33 pm
Well it needs wx-config.  You still have the one from SUSE wx2.5?  See you shouldn't install wx2.6.1 over wx2.5 to the same directory.  Instead, it would have been better to leave the SUSE wx under the /usr root (/usr/bin/wx-config, /usr/lib/libwx......) and then install wx2.6.1 under a different tree:
./configure --prefix=/opt/wx26
Then you just edit /etc/ldconfig to point to the lib directory in use (/usr/lib or /opt/wx26/lib) and run ldconfig and also edit your path to include the wx bin directory in use.

So, try to repair the suse wx.  or just install 2.6.1 in /opt/wx26 and use that.  or try just copying the /opt/wx26/bin/wx-config file over to your wx25 directory (/usr/bin/wx-config) and hope it works :)

Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 16, 2005, 09:10:01 am
OK. I'll try that. I reinstalled the SuSE RPM after deinstalling the 2.6.1, but there's always something one forgets ...
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 16, 2005, 05:05:58 pm
Sadly :-(  I have to report a failure. I get the same messages. I have the right wx-config after the installation of the SuSE RPM, but I get the same error messages. Would that be something that isn't in 2.5.3, but is available in 2.6.1? I'll have a look later this evening.

David
Title: Re: Missing files to compile with Autotools
Post by: grv575 on September 17, 2005, 09:01:21 am
Sorry, I misread the configure error message.

You know, it's probably missing the search path for the wx libraries (although I would expect the .rpm to do this).  So either:
a) export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
or wherever the libwx*.a library files are located (instead of /usr/local/lib)
b) edit /etc/ld.so.conf
append /usr/local/lib
(or wherever the libwx*.a library files...)
run ldconfig

then run bootstrap and configure again.

Also, what do the following 3 commands give you?
wx-config --prefix
wx-config --static --libs
wx-config --list
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 18, 2005, 09:01:56 pm
This is the output of the three commands :

kevin:/usr/lib/wx/config # wx-config --prefix
/usr
kevin:/usr/lib/wx/config # wx-config --static --libs
ls: wx*-2.4-config: Onbekend bestand of map
ls: wx*-2.4-config: Onbekend bestand of map

  Warning: No config found to match: /usr/bin/wx-config --static --libs
           in /usr/lib/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.

kevin:/usr/lib/wx/config # wx-config --list

    Default config is gtk2-unicode-release-2.5

  Default config will be used for output

  Alternate matches:
    gtk2-ansi-release-2.5
ls: wx*-2.4-config: Onbekend bestand of map
ls: wx*-2.4-config: Onbekend bestand of map


I think I should be changing the default release Code::Blocks uses to the ansi version, but I'm not sure how to do it. I'll have a look in the wxWidgets docs.
I don't know if the prefix is all right either.
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 18, 2005, 09:15:06 pm
Quote
I think I should be changing the default release Code::Blocks uses to the ansi version, but I'm not sure how to do it. I'll have a look in the wxWidgets docs.
I don't know if the prefix is all right either.

See the options you can give to configure: "./configure --help"
Especially, check --with-wxdir, --with-wx-config, --with-wx-prefix and --with-wx-exec-prefix
Title: Re: Missing files to compile with Autotools
Post by: grv575 on September 19, 2005, 01:07:53 am
also if you do:
wx-config --unicode=no
wx-config --libs

maybe this will switch to the ansi version?
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 19, 2005, 11:07:30 am
No change. Could it be that the configure needs a static library build? When I check the libs with wx-config --libs I get

-L/usr/lib64 -pthread   -L/usr/X11R6/lib64  -lwx_gtk2u_xrc-2.5 -lwx_gtk2u_html-2.5 -lwx_gtk2u_adv-2.5 -lwx_gtk2u_core-2.5 -lwx_baseu_xml-2.5 -lwx_baseu_net-2.5 -lwx_baseu-2.5

However, when I do the wx-config --static --libs, I get an error message I have been seeing a lot ;
ls: wx*-2.4-config: No such file or directory
ls: wx*-2.4-config: No such file or directory

  Warning: No config found to match: /usr/bin/wx-config --static --libs
           in /usr/lib64/wx/config
  If you require this configuration, please install the desired  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.  You may use wx-config --list to see all configs available in
  the default prefix.

wx-config --list gives me :


    Default config is gtk2-unicode-release-2.5

  Default config will be used for output

  Alternate matches:
    gtk2-ansi-release-2.5
ls: wx*-2.4-config: No such file or directory
ls: wx*-2.4-config: No such file or directory

Any further ideas would be welcome :-)
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 19, 2005, 11:30:53 am
Quote
Could it be that the configure needs a static library build?

On the contrary. Once, I had problems because it would use the static lib while codeblocks needs a shared library to link...
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 19, 2005, 12:07:50 pm
I 'm now trying to build C::B in Ubuntu Hoary using the distro-supplied wxGTK-2.5.3.
I 'll keep you posted.
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 19, 2005, 01:45:29 pm
All done. Builds and runs just fine with stock wxGTK-2.5.3 (I fixed a couple of unicode issues on the way ;) ).
This leads me to believe there's something wrong with your setup...
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 21, 2005, 05:23:34 pm
I guess there was. I've reinstalled my linux, to make sure, and I installed the RPMs from SuSE. The DVD shipped with Linux Magazine didn't contain all the needed files. There wasn't a wxGTK-2.5.3-devel included, but there is happily on the SuSE sites.

Now, everything compiles, but I've got some issues with the make install routine. It seems to be putting the files in the wrong places...

I got it to work manually, but the routine was mixing up paths and such.
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 21, 2005, 06:22:28 pm
Perhaps you could elaborate?
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 21, 2005, 09:45:42 pm
Of course. Just checking to be sure I don't say anything stupid.

I compiled code::blocks on SuSE Linux 9.3 for AMD64. Sadly, the installation instructions don't take care of the 64-bit environment, and put the library files simply in the /usr/local/lib directory, instead of the /usr/local/lib64 diretory, used by anyone else.
As far as I can see now (I got it to work, so I can't determine anymore if it is due to my poking around that the files are in the right positions), the run.sh file isn't copied in the right place. Anyhow, the paths in the run.sh file don't correspond to the paths the 'make install' command puts the files in. The run.sh command still supposes the files are under the /codeblocks/src/devel, while they are not.

Any more info, don't hesitate to ask.
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 22, 2005, 12:07:17 am
Hmm, /usr/local/lib is not our choice. It's autotools'...
Besides, what does run.sh have to do with it? It was used before the autotools build, when codeblocks would run in-place. Now, to run codeblocks, you must "make install" it and launch it just by "codeblocks" or "/usr/[local/]bin/codeblocks"...
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 22, 2005, 09:27:28 pm
when I do that, the executable complains that it can't find some dynamic libraries. Did I forget anything on the Wiki? because that were the steps I took to get the whole CVS to compile.

Cheers,
David
Title: Re: Missing files to compile with Autotools
Post by: mandrav on September 22, 2005, 10:47:53 pm
Yes, run 'ldconfig' as root
Title: Re: Missing files to compile with Autotools
Post by: doscott on September 22, 2005, 11:08:33 pm
With Fedora, and possibly others, you may need to edit the /etc/ld.so.conf file and add the library path to it:

include ld.so.conf.d/*.conf
/opt/wx/2.6/lib

or you could put the path in its own conf file and place it in ld.so.conf.d
Title: Re: Missing files to compile with Autotools
Post by: grv575 on September 22, 2005, 11:11:45 pm
There must be some configure flags to specify 64 bit library destination directories or something.  Either that or an autotools macro that says to use 64 bit directories if present or uname returns 64-bit machine or something.

As for the -devel rpms...most distros don't ship rpms containing headers and libs but break up source packages into the usual .rpm and then a -devel .rpm that you will need if you want to compile stuff against the package.  This doesn't apply if you build from source, since then a make && make install installs all headers and devel libs.  It's just a space consideration taken by a lot of distros.
Title: Re: Missing files to compile with Autotools
Post by: rickg22 on September 22, 2005, 11:55:04 pm
Um... I got the feeling we *REALLY* need to start working on the wiki because we'll receive TONS of complains about Linux installs... :(
Title: Re: Missing files to compile with Autotools
Post by: grv575 on September 23, 2005, 03:53:43 am
There's already 2 sections on the general linux wiki tutorial that covers some of it.  Of course it's not organized well, and a lot of the wiki tutorials on building should be trimmed / things taken out to remove references to STC and make -f blah on the linux side, etc.  So much polishing needed for clarity once there's a new source tarball of rc2 when it's available.

http://wiki.codeblocks.org/index.php/Compiling_Code::Blocks_in_Linux_%28applies_to_all_distros%29#wxWidgets_2.6.1_build
http://wiki.codeblocks.org/index.php/Compiling_Code::Blocks_in_Linux_%28applies_to_all_distros%29#Building_Code::Blocks (after the ... seperator)
Title: Re: Missing files to compile with Autotools
Post by: rickg22 on September 23, 2005, 06:07:13 am
Yeah but do they cover autotools?
Title: Re: Missing files to compile with Autotools
Post by: grv575 on September 23, 2005, 07:02:02 am
Could be improved :)
But second link, bottom of the page.
Title: Re: Missing files to compile with Autotools
Post by: fiammy on September 23, 2005, 11:27:35 am
I put my procedure I followed here a few days ago. It seems yours is better though.

http://wiki.codeblocks.org/index.php/Installing_Code::Blocks
Title: Re: Missing files to compile with Autotools
Post by: grv575 on September 23, 2005, 06:39:35 pm
Well feel free to merge the two.  It's useful to know what versions of linux and wxWidgets work out of the box.  I'd also move some of the stuff I put about errors you might run into at the bottom in a subsection or something so it flows better.  But don't have tons of time lately.