User forums > General (but related to Code::Blocks)

A problem about C::B svn make(Ubuntu12.04)

<< < (3/5) > >>

jdbosmaus:
Due to the incompatibility documented here:
http://www.codeblocks.org/downloads/binaries
and the fact that the package provided by pasgui is out of date, I wanted to try compiling CodeBlocks 12.11 from source on Ubuntu 12.04. (Actually Kubuntu.)

This topic was helpful, but I think the package names listed in the posts above are for RPM rather than APT packages. It took me a while to figure out the package names I needed before ./configure would run cleanly.

Here are the commands for the packages that I found I needed to install:

apt-get install libhunspell-dev
apt-get install libgamin-dev
apt-get install libboost-dev

(libboost-doc is optional, but I installed it because I expect to use Boost.)

The "make install" command adds several .so files to /usr/local/lib. Therefore, before I could run CodeBlocks, I needed to rebuild the library cache by:
sudo ldconfig
 
And now I'm running CodeBlocks 12.11 build 8629!

Jenna:
On debian-based systems (Debian, Ubuntu probably Mint, etc.) it's the best to just run dpkg-buildpackage in the sources root.
This will tell you which packages are missing on your system and what's more, you get real deb-packages that can be installed easily.
The make uninstall is not reliable (at least not if the sources have changed between make install and make uninstall).

If you do not want to create packages (or are not on debian or another supported platform liek fedora, redhat, centos, opensuse etc.), you should configure your sources with --prefix=[/path/to/installation/folder][/b] to install C::B in a seperate folder below your home-directory.
You also should do the build-process from a seperate build-folder and call configure from there with relative path.

It is easy to remove the whole build-files at once and to remove C::B before compiling a new version, both might be needed if there are changes to the directory or library layout (and that happens from time to time if using svn-sources).

jdbosmaus:

--- Quote ---On debian-based systems (Debian, Ubuntu probably Mint, etc.) it's the best to just run dpkg-buildpackage in the sources root.
This will tell you which packages are missing on your system and what's more, you get real deb-packages that can be installed easily.
The make uninstall is not reliable (at least not if the sources have changed between make install and make uninstall).

--- End quote ---

That is useful to know and I wasn't aware of it. (I'm new to Linux, though I used Unix systems about 25 years ago.)
I was using the procedure in the BUILD file that came with the sources, which is also the same on this page:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

As it turns out I am going to be setting up two other Kubuntu systems with CodeBlocks and I was wondering whether
there was an easier way to do it than to build on each machine. I knew deb-packages would work but I didn't know
how to make them. So, thank you!

cacb:
Thanks a lot to jens for his extremely useful information! I am on Kubuntu 13.04 and I've been using his repository for nightlies for years without problems (thanks for that!). I just discovered that apparently there is an incompatibility with the latest *ubuntu, so like others I decided to try to build C::B from source rather than try another repository. So far download from SVN (using Bazaar!) went well, and dpkg-buildpackage seems easy enough. Hoping to re-use the built packages on a couple of other machines.

cacb:
It seems I was a bit quick to declare this a success, I am having some issues with installing built *.deb packages built from source on Kubuntu 13.04. I hope you can help point out where I went wrong

Some things I did
- downloaded source from http://svn.code.sf.net/p/codeblocks/code/trunk/
- tried to build C::B using dpkg-buildpackage, it failed. This was probably due to me having a static build of wxWidgets 2.8 installed
- re-built wxWidgets 2.8 to shared objects and tried dpkg-buildpackage again overnight

I now got the deb files below. I am puzzled as to why they are "10.05" and a much lower svn build than expected (8324)? The trunk includes changes until may 17 2013.

--- Code: ---total 172548
-rwxrwx--- 1 ca plugdev      1770 May 19 02:32 codeblocks_10.05svn8324.dsc
-rwxrwx--- 1 ca plugdev 172167115 May 19 02:32 codeblocks_10.05svn8324.tar.gz
-rwxrwx--- 1 ca plugdev   2889928 May 19 03:59 codeblocks-common_10.05svn8324_all.deb
-rwxrwx--- 1 ca plugdev    458928 May 19 03:59 codeblocks-contrib-common_10.05svn8324_all.deb
-rwxrwx--- 1 ca plugdev    556194 May 19 04:00 codeblocks-headers_10.05svn8324_all.deb
-rwxrwx--- 1 ca plugdev    290132 May 19 04:00 codeblocks-wxcontrib-headers_10.05svn8324_all.deb
drwxrwx--- 1 ca plugdev       176 May 19 09:51 trunk
-rwxrwx--- 1 ca plugdev    314118 May 19 04:00 wxsmith-headers_10.05svn8324_all.deb
--- End code ---

If I try
sudo dpkg -i *.deb, I get dependency problems as shown below, and I don't seem to be able to resolve them


--- Code: ---(Reading database ... 339367 files and directories currently installed.)
Preparing to replace codeblocks-common 10.05svn8324 (using codeblocks-common_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-common ...
Preparing to replace codeblocks-contrib-common 10.05svn8324 (using codeblocks-contrib-common_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-contrib-common ...
Preparing to replace codeblocks-headers 10.05svn8324 (using codeblocks-headers_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-headers ...
Preparing to replace codeblocks-wxcontrib-headers 10.05svn8324 (using codeblocks-wxcontrib-headers_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-wxcontrib-headers ...
Preparing to replace wxsmith-headers 10.05svn8324 (using wxsmith-headers_10.05svn8324_all.deb) ...
Unpacking replacement wxsmith-headers ...
Setting up codeblocks-common (10.05svn8324) ...
Setting up codeblocks-contrib-common (10.05svn8324) ...
dpkg: dependency problems prevent configuration of codeblocks-headers:
 codeblocks-headers depends on codeblocks-dev (>= 10.05svn8324); however:
  Package codeblocks-dev is not installed.
 codeblocks-headers depends on codeblocks-dev (<< 10.05svn8324.1~); however:
  Package codeblocks-dev is not installed.

dpkg: error processing codeblocks-headers (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of codeblocks-wxcontrib-headers:
 codeblocks-wxcontrib-headers depends on codeblocks-wxcontrib-dev (<< 10.05svn8324.1~); however:
  Version of codeblocks-wxcontrib-dev on system is 12.11svn8832-1.

dpkg: error processing codeblocks-wxcontrib-headers (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of wxsmith-headers:
 wxsmith-headers depends on wxsmith-dev (>= 10.05svn8324); however:
  Package wxsmith-dev is not installed.
 wxsmith-headers depends on wxsmith-dev (<< 10.05svn8324.1~); however:
  Package wxsmith-dev is not installed.

dpkg: error processing wxsmith-headers (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Errors were encountered while processing:
 codeblocks-headers
 codeblocks-wxcontrib-headers
 wxsmith-headers
--- End code ---

So what have I done wrong? I may need wxWidgets 2.9? Also, I am stuck as it seems the file dpkg-buildpackage is no longer in my source directory after tonights build. Does that make sense?

Your help appreciated. Sorry for making a mess.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version