Author Topic: Difficulties building from SVN source or Ubuntu repository  (Read 9528 times)

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Difficulties building from SVN source or Ubuntu repository
« on: December 29, 2008, 08:21:14 pm »
I am on Ubuntu 8.10 using the synaptic release of Codeblocks 8.02 and would want to get newer version from svn or binary Ubuntu builds from Jens. I have not got very far.

For svn issued today 29 Dec 2008:
svn://svn.berlios.de/codeblocks/trunk
which caused many files to copied to a directory trunk in my home directory.

Then issued ./bootstrap from the trunk directory and got this:
[email protected]:~/trunk$ ./bootstrap
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
./bootstrap: 67: aclocal: not found
[email protected]:~/trunk$ ./configure --enable-contrib
bash: ./configure: No such file or directory

It seemed to have failed in ./bootstrap and/so the .configure command did not work. I don't know enough to figure out what is wrong.
 
Trying to get Jens Ubuntu build:
I added the follwoing to /etc/apt/sources.list :
 
 deb http://apt.jenslody.de/ any main
 deb-src http://apt.jenslody.de/ any main

Then issued apt udpate and got eorrors about lack of authentication.

I read I should add a public-key to apt's trustdb by installing the package jens-lody-debian-keyring, but don't know how to do that. Checked with Google, but to no avail.

I am stuck and would be appreciate advice.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #1 on: December 29, 2008, 08:34:45 pm »
Code: [Select]
apt-get install jens-lody-debian-keyring
You will be warned, because of missing authentication, but you should allow installation anyway.

To use the svn sources you also need to have autoconf and automake installed.

EDIT:
To use "my" sources you also need either autoconf and automake or an installed C::B.
« Last Edit: December 29, 2008, 08:47:51 pm by jens »

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #2 on: December 30, 2008, 02:19:25 pm »
Many thanks Jens.

Ubuntu install of svn=5344 now works.


However, I could not make the svn build work.
On issuing ./bootstrap there were two lines with warnings in the middle of log output:

[email protected]:~/trunk$ ./bootstrap
.....
configure.in:77: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
configure.in:78: warning: macro `AM_PATH_WXCONFIG' not found in library
....


and when running ./configure the same two symbols appeared again:
[email protected]:~/trunk$ ./configure --enable-contrib
...
checking if the compiler supports precompiled headers... yes
./configure: line 20080: AM_OPTIONS_WXCONFIG: command not found
./configure: line 20081: syntax error near unexpected token `2.8.0,'
./configure: line 20081: `AM_PATH_WXCONFIG(2.8.0, wxWin=1)'

and/so makefile was not found:

[email protected]:~/trunk$ make
make: *** No targets specified and no makefile found. Stop.

How do I handle this?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #3 on: December 30, 2008, 02:28:23 pm »
You also need to install libwxgtk2.8-dev and wx-common.

EDIT:
By the way: the correct syntax to enable all contrib-plugins is:
Code: [Select]
./configure --with-contrib-plugins=all
use
Code: [Select]
./configure --help to see all options
« Last Edit: December 30, 2008, 04:34:49 pm by jens »

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #4 on: December 30, 2008, 06:42:28 pm »
I installed libwxgtk2.8-dev and wx-common and this time ./bootstrap ran ok.

./configure seemed a lot better too, but produced the following before stopping:
[email protected]:~/trunk$ ./configure --enable-contrib
....
a lot of info
....
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 2.8.9)
checking for wxWidgets static library... no
checking for wxWidgets platform... wxGTK
checking for pkg-config... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK2... configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met:

No package 'gtk+-2.0' found

and after ./configure stopping like this, the make did not run.

Could not find gtk+-2... in synaptic and do not understand how it relates to wxWidgets that has version 2.8.9.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #5 on: December 30, 2008, 07:12:13 pm »
Code: [Select]
apt-get install libgtk2.0-dev

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #6 on: December 31, 2008, 04:10:54 pm »
The svn procedure now completes without errors.

However, the IDE did not work when I tried it. It showed svn=5367 near/on-top of the code::blocks image and when I selected a project from the current-projects-list nothing happened. The IDE just exited. I fumbled around for a while and discovered that:

SVN install:
svn=5367 worked after sudo apt-get purge codeblocks and redoing the svn procedure starting from ./bootstrap step. The executable file was put in usr/local/bin and usr/local/include was updated too.

Jens Ubuntu install:
package svn=5344 for Synaptic package using Jens' Ubuntu install puts the binary in /usr/bin. However, when I ran codeblocks from the menu an alert message popped up saying that one or more plugins were not loaded listing about 20 each ending with .so. The IDE just exited when selecting from the current project list. I tried this in two ways: clicked on the executable icon in /usr/bin and clicked the menu after having put /usr/bin/codeblocks in the menu property item for Code::Blocks in Ubuntu's MainMenu. In both cases the svn reported was 5367, not 5344 as I expected.   

What do I need to do be able to to use SVN and Jens installs interchangeably back and forth with the opening IDE page showing the respective svn numbers and fixing the missing plugin problem?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #7 on: December 31, 2008, 05:17:22 pm »
Do not use standard-prefix ("/usr/local"), because it's in system-PATH before "/usr/bin", that will most likely cause the errors.
I use "~/codeblocks-tmp" as prefix for test-compiles with automake-system.
Code: [Select]
./configure --prefix=/home/jens/codeblocks-tmp --with-contrib-plugins=all
and start codeblocks with full or relative path from console ("~/codeblocks-tmp/bin/codeblocks") without any problems.

You can use any directory you have write and exe-access, of course.

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #8 on: January 01, 2009, 01:32:10 pm »
I tried
./configure --prefix=/home/ken/codeblockstmp --with-contrib-plugins=all
but it did not make any difference (yesterday 31 Dec still missing plugins)

This morning, January 1, received a codeblocks svn5368 update notification when starting Ubuntu. Installed via Synaptic and when starting codeblocks the svn was displayed as svn5367, which is the svn of the SVN build that I installed yesterday. However, the date was displayed as 'Build: Dec 30 2008, 18:32:51 (Linux,unicode)'. Also got svn5357 and same date when clicking About menu in codeblocks.

The date and svn were exactly same as above when invoking yesterday's svn build svn5367.

I could be totally misinterpreting, but it looks as if the svn displayed is the svn of the SVN build and the date is that of the Jens' Ubuntu build.

I thought the lingering effect of the SVN build in some way might be caused by the Code::Blocks menu item, so deleted the latter and reinstalled svn5368 via Synaptic. I expected the install process to create a menu item like it did the first time I installed codeblocks, but it did not.

It's getting weirder and weirder...
To verify, I deleted menuitem and reinstalled via Synaptic. Manually put command /usr/bin/codeblocks (date of executable: 30 Dec 2008, 12:02:21 GMT) into menuitem. When starting, codeblocks displayed 'svn build rev 5367 (2008-12-28 16:47:04) gcc 4.1.2 Linux/unicode'. The date Dec 30 2008, 18:32:51 was displayed when clicking About in codeblocks.

The svn build 5367 might be causing this problem. How do I totally remove it from the system including the Linux equivalent of its registry entries?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #9 on: January 01, 2009, 02:27:08 pm »
I guess you still have C::B in "/usr/local".
If you do a new build, even with other prefix, it is not removed automatically.

To get a clean system, you will have to do some handwork now:
delete the following files:
Code: [Select]
/usr/local/bin/codeblocks
/usr/local/bin/codesnippets
/usr/local/bin/cb_console_runner
/usr/local/bin/cb_share_config
/usr/local/lib/libcodeblocks.la
/usr/local/lib/libcodeblocks.so
/usr/local/lib/libcodeblocks.so.0
/usr/local/lib/libcodeblocks.so.0.0.1
/usr/local/lib/libwxsmithlib.la
/usr/local/lib/libwxsmithlib.so
/usr/local/lib/libwxsmithlib.so.0
/usr/local/lib/libwxsmithlib.so.0.0.1
/usr/local/lib/pkgconfig
/usr/local/lib/pkgconfig/codeblocks.pc
/usr/local/lib/pkgconfig/wxsmith.pc
/usr/local/share/applications/codeblocks.desktop
/usr/local/share/icons/gnome/48x48/mimetypes/gnome-mime-application-x-codeblocks-workspace.png
/usr/local/share/icons/gnome/48x48/mimetypes/gnome-mime-application-x-codeblocks.png
/usr/local/share/man/man1/cb_console_runner.1
/usr/local/share/man/man1/cb_share_config.1
/usr/local/share/man/man1/codeblocks.1
/usr/local/share/man/man1/codesnippets.1
/usr/local/share/mime/packages/codeblocks.xml
/usr/local/share/pixmaps/codeblocks.png

and the following directories:
Code: [Select]
/usr/local/include/codeblocks
/usr/local/include/wxsmith
/usr/local/lib/codeblocks
/usr/local/share/codeblocks

run
Code: [Select]
make uninstall inside your build-directory or delete the content of
Code: [Select]
/home/ken/codeblockstmp manually

purge all C::B-packages via synaptic

make sure there is no C::B-executable left on your hdd

install C::B with synaptic

C::B should start as svn 5368, svn-string (start-page) is
Code: [Select]
svn build rev 5368 (2008-12-30 11:05:44) gcc 4.1.2 Linux/unicode for 32- and 64-bit and
build-string (about-menu) is
Code: [Select]
Build:Dec 30 2008, 12:48:22 - wx2.8.9 (Linux, unicode) for 64-bit and
Code: [Select]
Build:Dec 30 2008, 11:38:15 - wx2.8.9 (Linux, unicode) for 32-bit

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #10 on: January 01, 2009, 07:55:33 pm »
Thanks a lot.

Build 5368 is now working.
Jens' answers are useful for Ubuntu beginners coming from Windows like myself, so here is a summary:

GETTING UBUNTU BINARIES

i)  enter 'sudo gedit /etc/apt/sources.list' (without the quotes) and when in editor
    add lines

     deb http://apt.jenslody.de/ any main
     deb-src http://apt.jenslody.de/ any main
     deb http://apt.wxwidgets.org/ etch-wx main

    at the end of /etc/apt/sources.list

    OR

    select Software Sources from the GUI Administration menu, select Third Party Software
    and add the three lines above
 
 ii)  enter 'apt-get install jens-lody-debian-keyring' from terminal

 iii) enter 'wget -q http://apt.wxwidgets.org/key.asc -O-  | sudo apt-key add -' from
      terminal

 iv)  use apt-get update and apt-get install codeblocks OR use update and install
      via Synaptic manager       

     
BUILDING FROM SOURCE

One-time preparation:
   - install libtools via synaptic
   - install autoconf and automake via synaptic

i)   enter svn://svn.berlios.de/codeblocks/trunk from commandline

ii)  install libwxgtk2.8-dev and wx-common via synaptic

iii) install sudo apt-get install libgtk2.0-dev from terminal

iv)  issue the following from the command line in the trunk directory
      ./bootstrap
      ./configure --enable-contrib
      make
      sudo make install


However, with Jens' frequent Ubuntu binary builds there is probably little need to build from source.

Again many thanks.

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #11 on: January 05, 2009, 04:54:04 pm »
1) SVN code contains errors (it's ok - development code)
2) 8.02 is too old.
3) Nightly builds only for windows.

I'm using Linux. How I can get new version of codeblocks??? Not daily version, just relative new??? HOW???

2009 Jan 5 -> SNV -> Error:
Code: [Select]
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT HexEditPanel.lo -MD -MP -MF .deps/HexEditPanel.Tpo -c HexEditPanel.cpp  -fPIC -DPIC -o .libs/HexEditPanel.o
HexEditPanel.cpp: In member function ‘void HexEditPanel::OnDrawAreaKeyDown(wxKeyEvent&)’:
HexEditPanel.cpp:924: error: ‘class wxKeyEvent’ has no member named ‘GetUnicodeKey’
make[4]: *** [HexEditPanel.lo] Error 1
make[4]: Leaving directory `/home/s/my/codeblocks/trunk/src/plugins/contrib/HexEditor'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/s/my/codeblocks/trunk/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/s/my/codeblocks/trunk/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/s/my/codeblocks/trunk/src'
make: *** [all-recursive] Error 1

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #12 on: January 05, 2009, 05:14:08 pm »
It seems you try to build C::B against an ansi-release of wxWidgets or you use at least headers of an ansi-version ("-I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 ") , that will most likely not work.


Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #13 on: January 05, 2009, 06:06:01 pm »
It seems you try to build C::B against an ansi-release of wxWidgets or you use at least headers of an ansi-version ("-I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 ") , that will most likely not work.
Oh, thanks for fast reply! I'll try to rebuild my wxW to unicode.
One more question plz ^_^
I building this at home. And I want to move compiled codeblocks to my work. And to second computer :) How to move compiled fresh C:B?

P.S.
I found "debian - nightlies and wxWidgets (msw-)cross-build libs for "i386" and "amd64" : http://apt.jenslody.de/" =) I'm using Ubuntu 8.10 (Debian derivative) - can I use your packages? Is there some rootkits? Backdoors? ^_^

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #14 on: January 05, 2009, 06:17:16 pm »

I found "debian - nightlies and wxWidgets (msw-)cross-build libs for "i386" and "amd64" : http://apt.jenslody.de/" =) I'm using Ubuntu 8.10 (Debian derivative) - can I use your packages? Is there some rootkits? Backdoors? ^_^

You should be able to use them, and no there aren't any rootkits (as far as I know).

And if there would be any, do you believe, that I would say the truth ?

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Difficulties building from SVN source or Ubuntu repository
« Reply #15 on: January 05, 2009, 07:23:40 pm »
You should be able to use them
Thank you very much! After recompile wxWidgets to unicode - codeblocks SVN compiled successfully.
How to move this compiled version of codeblocks to different Linux PC? How to build .deb from compilation results?

P.S.
I want to help improve Code::Blocks. I must use this SVN version? I never commited any patches with SVN before, only used SVN to compile some recent soft...
« Last Edit: January 06, 2009, 02:53:11 am by tuXXX »